Closed Bug 1017222 Opened 12 years ago Closed 12 years ago

Use gaia-grid component in search app

Categories

(Firefox OS Graveyard :: Gaia::Search, defect)

x86
macOS
defect
Not set
normal

Tracking

(b2g-v2.0 fixed)

RESOLVED FIXED
2.0 S3 (6june)
Tracking Status
b2g-v2.0 --- fixed

People

(Reporter: kgrandon, Assigned: daleharvey)

References

Details

(Whiteboard: [p=2],[systemsfe])

Attachments

(1 file)

As we are refreshing the visual style of the search app, we should use our new gaia-grid component so we can have a single set of styles shared between the homescreen and search app. A simple example using the gaia-grid: https://github.com/mozilla-b2g/gaia/blob/master/shared/elements/gaia_grid/examples/example.js#L6
Component: Gaia::Homescreen → Gaia::Search
Dale - is this something you would be able to work on? If you don't have time/interest let me know and I will gladly take it. Thanks!
Flags: needinfo?(dale)
Yeh sorry meant to file this today
Assignee: nobody → dale
Flags: needinfo?(dale)
Having problems implementing this https://github.com/daleharvey/gaia/commit/8b98cac996f7277357d3249c485d42c5e2a2db57 give and end result of http://i.imgur.com/vmhsrjB.png Any ideas kevin?
Flags: needinfo?(kgrandon)
I think the problem is that gaia-grid is not taking the full width of the viewport. You need to give gaia-grid and all if it's parents to <body> a width of 100%. In your current code this would be section.apps, section#search-results, and body. I think we should probably get rid of div.apps, and roll the containers of the other objects into gaia-grid. We may need to augment gaia-grid further because it's rather dumb when it comes to clearing elements.
Flags: needinfo?(kgrandon)
The grid is taking up the full width, theres only block level elements holding it, found the problem, window.innerWidth is 0 on startup (https://github.com/mozilla-b2g/gaia/blob/master/shared/elements/gaia_grid/js/grid_layout.js#L21) Not quite sure what the best fix is, possibly reading thses on render
https://github.com/daleharvey/gaia/commit/4d42ca142cdc943a9e84ff36a8a6707154106a00 This fixes the innerwidth issue for me, do you reckon we want to keep it that way? also is there an api for setting the zoom level that isnt events, this part seems ugly providers shouldnt take long to fix up, afaik we can remove webresults too :)
I'm fine with the width calculations for now. No api yet, it should come soon though and we need it for smart collections. Probably makes sense as some attribute of the gaia-grid? If you want, you can land with three columns for now, and we'll land the patch to go to four columns. It'll be a bit weird for a while, but we'll fix it soon.
This stripped a bunch of logic from inside the providers to the shared code in the grid, this means its shared so less likely to break, but I think we are down a few tests due to the lack of testing of the grid, will need to fix that but this looks bitrottey so put it up early
Attachment #8432826 - Flags: review?(kgrandon)
Comment on attachment 8432826 [details] [review] https://github.com/mozilla-b2g/gaia/pull/19898 Nice! I made a few notes on github, but nothing that really blocks. When the travis tests ran, the marketplace test timed out. Not sure if it's intermittent, a framework issue, or a real failure. Just make sure travis is green before landing. Thanks!
Attachment #8432826 - Flags: review?(kgrandon) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Depends on: 1019745
Target Milestone: --- → 2.0 S3 (6june)
Mass modify - set status-b2g-v2.0 fixed for fixed bugs under vertical homescreen dependency tree.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: