Closed Bug 925418 Opened 6 years ago Closed 6 years ago

Decouple notion of richgrid "items" from their implementation as richgrid children

Categories

(Firefox for Metro Graveyard :: Firefox Start, defect)

x86
Windows 8
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 27

People

(Reporter: sfoster, Assigned: sfoster)

References

Details

Attachments

(1 file)

The 1:1 relationship of items to child nodes blocks us from implementing some transitions and managing and reusing grid slots. I propose that consumers of the richgrid binding refer always to .items and the various methods for manipulating the items collection, and only reference .children internally in the binding where this relationship is defined.
Steering consumers of the richgrid binding away from messing directly with the child nodes. This is a stepping stone towards the grid slots in progress for bug 925425. In particular I want to let the richgrid decide what clearAll means and what exactly happens when we insert and remove items. I tightened up a couple of things while in there. Tests pass locally.
Assignee: nobody → sfoster
Attachment #815619 - Flags: review?(mbrubeck)
Comment on attachment 815619 [details] [diff] [review]
items-not-children

Review of attachment 815619 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/metro/base/tests/mochitest/browser_tiles.js
@@ +417,5 @@
>      doc.defaultView.removeEventListener("selectionchange", handler, false);
>    }
>  });
>  
> +     // implements a getItemAtIndex method (or grid.items[idx] ?)

This comment seems kind of lonely hanging out down here.  Should we remove it, or prefix it with "TODO"?
Attachment #815619 - Flags: review?(mbrubeck) → review+
That comment got detached from its context, it and the test it belongs with are implemented earlier in the test. 
Landed on fx-team: https://hg.mozilla.org/integration/fx-team/rev/8406b4a9ed0d
https://hg.mozilla.org/mozilla-central/rev/8406b4a9ed0d
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 27
You need to log in before you can comment on or make changes to this bug.