Closed
Bug 578927
Opened 14 years ago
Closed 14 years ago
Re-order tabs in a group in Tab Candy doesn't reflect on the tab bar
Categories
(Firefox Graveyard :: Panorama, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: raymondlee, Assigned: raymondlee)
Details
Attachments
(1 file)
2.86 KB,
patch
|
iangilman
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce: 1) Go to tab candy interface 2) Re-order tabs in a group 3) Zoom into a tab in that group 4) The order of tabs on tab bar isn't in the same order as in the tab candy
Updated•14 years ago
|
Assignee: nobody → raymond
Updated•14 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•14 years ago
|
||
Attachment #457799 -
Flags: review?(ian)
Comment 2•14 years ago
|
||
Comment on attachment 457799 [details] [diff] [review] Patch Looks good, except the original creation of visibleTabs: it uses "for each", which we've recently discovered is not guaranteed to maintain order. Can you rewrite that to use [].forEach and then apply the patch?
Attachment #457799 -
Flags: review?(ian) → review+
Assignee | ||
Comment 3•14 years ago
|
||
Applied http://hg.mozilla.org/users/edward.lee_engineering.uiuc.edu/tabcandy-central/rev/a4de92ecd044 Removed the "for each" http://hg.mozilla.org/users/edward.lee_engineering.uiuc.edu/tabcandy-central/rev/bc7f40208dbf
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 4•14 years ago
|
||
Raymond, thanks for removing the for each. Unfortunately now the routine modifies the "tabs" argument directly, which is a bad situation waiting to happen. Can you please fix that?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 5•14 years ago
|
||
Ah, I wasn't aware that we shouldn't modify the tabs argument passed into the showOnlyTheseTabs() Patched: http://hg.mozilla.org/users/edward.lee_engineering.uiuc.edu/tabcandy-central/rev/651983832b51 Ian: please mark this bug as resolved if everything is OK.
Comment 6•14 years ago
|
||
1.7 + var visibleTabs = []; 1.8 + 1.9 + tabs.forEach(function(tab) { 1.10 + visibleTabs.push(tab.tab.raw); 1.11 + }); Curious, why not let visibleTabs = tabs.map(function(tab) tab.tab.raw); ?
Assignee | ||
Comment 7•14 years ago
|
||
(In reply to comment #6) Thanks Mardak. http://hg.mozilla.org/users/edward.lee_engineering.uiuc.edu/tabcandy-central/rev/5516aa00bc27
Comment 8•14 years ago
|
||
(In reply to comment #5) > Ah, I wasn't aware that we shouldn't modify the tabs argument passed into the > showOnlyTheseTabs() I think it's a good general rule that you should never modify an argument unless it's an explicit part of the function. In other words, addStuffTo(obj) should modify obj, but tellMeAbout(obj) should not. In this particular case, the array passed into showOnlyTheseTabs() is just meant to guide the operation, not be the result of the operation, so modifying it shouldn't be a side effect. In fact, in a number of cases, the routine is called with a group's master list of children, so modifying the array would have disastrous effects. Anyway, thanks for the fix... looks good!
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
Comment 9•14 years ago
|
||
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: -- → ---
Version: unspecified → Trunk
Updated•8 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•