Closed Bug 583414 Opened 11 years ago Closed 9 years ago
separate Group into "model" and "view"
Currently the Tab Candy Group objects take care of both the notion of groups (the model) and also their visual display in the Tab Candy UI (the view). As it turns out, we're going to need the model in a number of places where we don't want the overhead of the view (such as managing tabs in the tab bar, which you can think of as another view on the same model). I propose we split groups.js into 2 files: groups.js and groupitems.js. groups.js will contain Group and Groups objects, which will handle the model, and groupitems.js will contain GroupItem and GroupItems, which will handle the view. The model should depend on as little of the Tab Candy code as possible, and it should relate to xul:tabs as needed, not TabItems. A Group object shouldn't communicate directly with a GroupItem, but instead send out events (or use Subscribable). GroupItem objects should keep a reference to the Group they represent, make changes to the Group as needed, and respond to events from the Group. The eventual goal should be groups.js to be a js module independent of any window, but for now I think it should be a regular js file attached to the Tab Candy UI (one step at a time).
Mitcho, perhaps you can take a whack at this?
(In reply to comment #1) > Mitcho, perhaps you can take a whack at this? On it like a bonnet.
Technically, should you be in a bonnet?
Aza, Ian: Keeping everything straight in groups.js as I try to do this has turned out to be quite error-prone, and I haven't had much success. After a few false starts over a few hours, I'm going to let go of this for the time being. I'm happy to help out on this task, but I'd feel more comfortable going over what exactly the division of labor between Group and GroupItem will be, and what the external interface will be (will the UI create Group's or GroupItem's?) with Ian first. If you guys want to see some of the diffs of the work I tried to do, I do have them for posterity.
I'll take a whack at this.
Assignee: nobody → ian
Mass moving all Tab Candy bugs from Mozilla Labs to Firefox::Tab Candy. Filter the bugmail spam with "tabcandymassmove".
Product: Mozilla Labs → Firefox
Target Milestone: -- → ---
Punting to the future. This is most likely appropriate to do when revisiting bug 578512.
Priority: -- → P3
Target Milestone: --- → Future
Removing myself from this bug. Time will tell if it's something we even still want to do.
Assignee: ian → nobody
I don't think we still want this.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.