Closed Bug 622835 Opened 15 years ago Closed 15 years ago

Stacked group display is broken if restored after firefox restart

Categories

(Firefox Graveyard :: Panorama, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Firefox 4.0b10

People

(Reporter: ttaubert, Assigned: ttaubert)

References

Details

(Keywords: ux-userfeedback, Whiteboard: [visual][polish])

Attachments

(1 file, 7 obsolete files)

When TabCandy gets loaded after restarting Firefox all stacked groups that contain more than 6 items are 'broken' (see attached screenshot).
Assignee: nobody → tim.taubert
Attached patch patch v1 (obsolete) — Splinter Review
I removed _randRotate() and _stackAngles completely because I couldn't see how they are needed. 1.) 'parseInt((Math.random()-.5)*1)' gives always '0' so _randRotate() is not as 'random' as it is named. parseInt() receives values in the range of [-0.5, 0.5[ so parseInt() truncates it to always '0' - or am I missing something here? 2.) For this simple calculation we don't need to store the angles in _stackAngles, do we?
Attachment #501023 - Flags: feedback?(mitcho)
Status: NEW → ASSIGNED
If i see correctly, already filed Bug 619161 can be duped against this one, no?
Comment on attachment 501023 [details] [diff] [review] patch v1 Needs a test, but otherwise f+.
Attachment #501023 - Flags: feedback?(mitcho) → feedback+
(In reply to comment #1) > Created attachment 501023 [details] [diff] [review] > patch v1 > > I removed _randRotate() and _stackAngles completely because I couldn't see how > they are needed. Just to elaborate: I agree that randRotate was not as random as it was supposed to be but, even then, I don't think we want to randomly fan out the stack to have a "I just threw these tabs on the desk" look any more. CC: faaborg, in case he'd like to weigh in from a ux perspective.
Keywords: ux-feedback
Whiteboard: [visual][polish]
(In reply to comment #2) > If i see correctly, already filed Bug 619161 can be duped against this one, no? I didn't find this bug when I searched for this issue. The terms just differ completely from mine :) I think this bug can be duped against this one because we already have a patch here. Should I add 619385 as blocked by this bug?
Blocks: 619385
Attached patch patch v2 (added testcase) (obsolete) — Splinter Review
Pushed to try. Passed.
Attachment #501016 - Attachment is obsolete: true
Attachment #501023 - Attachment is obsolete: true
Attachment #501636 - Flags: review?(ian)
Comment on attachment 501636 [details] [diff] [review] patch v2 (added testcase) >+ let url = getBrowserURL(); >+ let opts = 'chrome,all,dialog=no,height=800,width=800'; >+ let charset = 'charset=' + window.content.document.characterSet; >+ >+ let win = window.openDialog(url, '_blank', opts, 'about:blank', charset, >+ null, null, true); Why do you specify a height and width and why are you messing with the charset?
(In reply to comment #8) > Why do you specify a height and width and why are you messing with the charset? Well, you're right this is unnecessary. Copied that code from another test.
Attachment #501636 - Flags: review?(ian)
Attached patch patch v3 (cleaned up test) (obsolete) — Splinter Review
Attachment #501636 - Attachment is obsolete: true
Attachment #501638 - Flags: review?(ian)
(In reply to comment #9) > (In reply to comment #8) > > Why do you specify a height and width and why are you messing with the charset? > > Well, you're right this is unnecessary. Copied that code from another test. Well, let's not reinvent the wheel. bug 610242 will land newWindowWithTabView into head.js which can be used in any group. Please use that function. Note, Dāo, this function, newWindowWithTabView, has to specify a window bounds as it's used in tests which have to do with geometric layout and allowing the window size to vary based on the test machine resulted in inconsistent results.
Depends on: 610242
Attachment #501638 - Attachment is obsolete: true
Attachment #501785 - Flags: review?(ian)
Attachment #501638 - Flags: review?(ian)
>Just to elaborate: I agree that randRotate was not as random as it was supposed >to be but, even then, I don't think we want to randomly fan out the stack to >have a "I just threw these tabs on the desk" look any more. > >CC: faaborg, in case he'd like to weigh in from a ux perspective. What was the advantage to using randRotate? Just that it looks more natural and organic?
v4 + v2.6 from bug 610242 pushed to try today. Passed.
(In reply to comment #13) > What was the advantage to using randRotate? Just that it looks more natural > and organic? I think that was the idea.
Comment on attachment 501785 [details] [diff] [review] patch v4 (test prepared for bug 610242) The fix looks good, but the test doesn't really test the bug as described. We can't actually restart the browser as part of a test, but we can simulate it by creating a window and either stuffing it full of session data as in these 2 tests: browser_tabview_bug598600.js browser_tabview_bug589324.js ... or closing it and then restoring it, as in this test: browser_tabview_bug597248.js The former is probably the most straight-forward, and should be fine for our purposes. Note also that we don't need to test that the arrangement doesn't change... just that it's not in a broken state.
Attachment #501785 - Flags: review?(ian) → review-
(In reply to comment #15) > (In reply to comment #13) > > What was the advantage to using randRotate? Just that it looks more natural > > and organic? > > I think that was the idea. Yeah, that's leftover from a design exploration from a long time ago.
(In reply to comment #16) > Comment on attachment 501785 [details] [diff] [review] > patch v4 (test prepared for bug 610242) > > The fix looks good, but the test doesn't really test the bug as described. Well, when I reported the bug I made a false assumption about the cause of this problem. When fixing this I found out that the first arrange() call for stacked groups after initializing the TabView was buggy. So the test just mimics a restored stacked group and then calls arrange(). So generating session data in the test is not really necessary I think? > Note also that we don't need to test that the arrangement doesn't change... > just that it's not in a broken state. You're right but it's very difficult to check whether the arrangement is broken. So it was much easier to check that the result of the first arrange() call matches the result after the second arrange() call. If you have any good idea how to check this please let me know.
Comment on attachment 501785 [details] [diff] [review] patch v4 (test prepared for bug 610242) (In reply to comment #18) > Well, when I reported the bug I made a false assumption about the cause of this > problem. When fixing this I found out that the first arrange() call for stacked > groups after initializing the TabView was buggy. So the test just mimics a > restored stacked group and then calls arrange(). So generating session data in > the test is not really necessary I think? Fair enough. You've got a problem then: the resumeArrange call does an arrange already, so your two arrange calls are too late. > You're right but it's very difficult to check whether the arrangement is > broken. So it was much easier to check that the result of the first arrange() > call matches the result after the second arrange() call. If you have any good > idea how to check this please let me know. Wouldn't it be as easy as checking if the rotation value of any of the tabs is above a certain threshold? At any rate, given what the bug really was, this test is fine (once you fix the resumeArrange/arrange bit).
Attachment #501785 - Flags: review- → review+
Depends on: 624953
No longer depends on: 610242
Attached patch patch v5 (all issues fixed) (obsolete) — Splinter Review
Fixed the resumeArrange() thing (see bug 624953). Rewrote the test to check if the 7th item is directly positioned under the 6th and therefore hidden.
Attachment #501785 - Attachment is obsolete: true
Attachment #503045 - Flags: approval2.0?
Attached patch patch v5b (minor test cleanup) (obsolete) — Splinter Review
Attachment #503045 - Attachment is obsolete: true
Attachment #503048 - Flags: approval2.0?
Attachment #503045 - Flags: approval2.0?
Comment on attachment 503048 [details] [diff] [review] patch v5b (minor test cleanup) a=beltzner
Attachment #503048 - Flags: approval2.0? → approval2.0+
Passed try (together with patch from bug 624953).
Still waiting for bug 624953 to land.
Attachment #503048 - Attachment is obsolete: true
Ready for checkin. Please do only land together with/after bug 624953.
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b10
Status: RESOLVED → UNCONFIRMED
Ever confirmed: false
Resolution: FIXED → ---
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Blocks: 613605
verified with minefield build of 20110217
Status: RESOLVED → VERIFIED
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: