Closed Bug 980360 Opened 11 years ago Closed 11 years ago

Fade in tab titles and close buttons when opening a tab

Categories

(Firefox :: Tabbed Browser, defect)

30 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 995626
Tracking Status
firefox29 --- affected
firefox30 --- affected
firefox31 --- affected

People

(Reporter: phlsa, Assigned: jaws)

References

Details

(Whiteboard: [Australis:P3-])

Attachments

(1 file, 5 obsolete files)

Attached patch Patch v1 (obsolete) — Splinter Review
Part of the spec for tab opening[1] is to fade in the tab titles and close buttons. This makes the entire opening process look smoother and also removes the jumpiness caused by the ellipsis overflow. This patch does exactly that. Not sure about the performance implications though. Gijs offered to push this to try for me. [1] http://phlsa.github.io/ff-tab-opening
Attachment #8386837 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8386837 [details] [diff] [review] Patch v1 >+.tab-label, >+.tab-close-button { >+ opacity: 1; >+ transition: opacity 200ms 200ms; >+} Remove opacity:1 > .tab-throbber:not([fadein]):not([pinned]), >-.tab-label:not([fadein]):not([pinned]), >-.tab-icon-image:not([fadein]):not([pinned]), >-.tab-close-button:not([fadein]):not([pinned]) { >+.tab-icon-image:not([fadein]):not([pinned]) { > display: none; > } Does this regress bug 713287?
Comment on attachment 8386837 [details] [diff] [review] Patch v1 Clearing review, please get review from Dão when this has finished: Baseline: remote: https://tbpl.mozilla.org/?tree=Try&rev=f641160142bb Post-patch: remote: https://tbpl.mozilla.org/?tree=Try&rev=1dc0d13360e4 When those have finished, please retrigger the "s" and "o" things on TBPL at least 4 times each (so that there's 5 runs of each, on both things), and check out: http://perf.snarkfest.net/compare-talos/index.html?oldRevs=f641160142bb&newRev=1dc0d13360e4&submit=true (if you need help with that, ping me IRL/here when the first ones have appeared)
Attachment #8386837 - Flags: review?(gijskruitbosch+bugs)
Blocks: 979938
(In reply to Dão Gottwald [:dao] from comment #1) > Comment on attachment 8386837 [details] [diff] [review] > Patch v1 > > .tab-throbber:not([fadein]):not([pinned]), > >-.tab-label:not([fadein]):not([pinned]), > >-.tab-icon-image:not([fadein]):not([pinned]), > >-.tab-close-button:not([fadein]):not([pinned]) { > >+.tab-icon-image:not([fadein]):not([pinned]) { > > display: none; > > } > > Does this regress bug 713287? I do see a slight jump towards the end of the close animation, but not any more than in the current Nightly. Not sure where I could find the error message mentioned in that bug. I'm deferring uploading anything new until the try builds are finished.
> I do see a slight jump towards the end of the close animation, but not any > more than in the current Nightly. Not sure where I could find the error > message mentioned in that bug. The error message was a red herring, it's unrelated.
Whiteboard: [Australis:P-]
Whiteboard: [Australis:P-] → [Australis:P3-]
(In reply to :Gijs Kruitbosch from comment #2) > Comment on attachment 8386837 [details] [diff] [review] > Patch v1 > > Clearing review, please get review from Dão when this has finished: > > Baseline: remote: https://tbpl.mozilla.org/?tree=Try&rev=f641160142bb > Post-patch: remote: https://tbpl.mozilla.org/?tree=Try&rev=1dc0d13360e4 > > When those have finished, please retrigger the "s" and "o" things on TBPL at > least 4 times each (so that there's 5 runs of each, on both things), and > check out: > > http://perf.snarkfest.net/compare-talos/index. > html?oldRevs=f641160142bb&newRev=1dc0d13360e4&submit=true > > (if you need help with that, ping me IRL/here when the first ones have > appeared) The TART section here looks terrible. :-( http://perf.snarkfest.net/compare-talos/index.html?oldRevs=f641160142bb&newRev=1dc0d13360e4&submit=true
(In reply to :Gijs Kruitbosch from comment #5) > The TART section here looks terrible. :-( > > http://perf.snarkfest.net/compare-talos/index. > html?oldRevs=f641160142bb&newRev=1dc0d13360e4&submit=true It does :( I do have one idea for improving that, that I'd like to try. Will post a patch soon.
No longer blocks: 979938
Hardware: x86 → All
Attached patch Slightly different patch (obsolete) — Splinter Review
baseline: https://tbpl.mozilla.org/?tree=Try&rev=9980f293152e with patch: https://tbpl.mozilla.org/?tree=Try&rev=11b2bd00d55a compare-talos: http://compare-talos.mattn.ca/?oldRevs=9980f293152e&newRev=11b2bd00d55a&server=graphs.mozilla.org&submit=true I used the same time measurements from Philipp's original patch. Dao, what do you think about these TART changes?
Assignee: philipp → jaws
Attachment #8386837 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8401961 - Flags: review?(dao)
Comment on attachment 8401961 [details] [diff] [review] Slightly different patch The patch above has an 8.69% regression on OSX. I think the only way to do this and keep display:none on the tab title during the animation is to introduce a setTimeout that will set an attribute triggering the fadein of the title after 200ms.
Attachment #8401961 - Flags: review?(dao)
Attached patch Patch (new approach) (obsolete) — Splinter Review
Gijs, what do you think about this? It works pretty well for me. Pushing to tryserver now.
Attachment #8401961 - Attachment is obsolete: true
Attachment #8404986 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8404986 [details] [diff] [review] Patch (new approach) Review of attachment 8404986 [details] [diff] [review]: ----------------------------------------------------------------- This looks OK, but can't we make the _fullyOpen property on the tabbrowser tab reflect the attribute value (ie, define a property with getter/setter on the tabbrowser-tab binding)? That way, if anyone messes with the property later, they don't have to remember to do the attribute too (or risk them getting out of sync). ::: browser/base/content/browser.css @@ +150,2 @@ > .tab-throbber:not([fadein]):not([pinned]), > +.tab-label:not([fullyopen]), I'm assuming you didn't leave the :not([pinned]) because pinned tabs have their label hidden anyway? However, we do that with width:0, and I'm not sure that we shouldn't keep that the way it is, as the consequences of width:0 and display:none aren't the same for accessibility. If you agree, please leave the :not([pinned]) bit here.
Attachment #8404986 - Flags: review?(gijskruitbosch+bugs) → review+
Attached patch Alternative patch v1.1 (obsolete) — Splinter Review
Attachment #8404986 - Attachment is obsolete: true
Attachment #8405028 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8405028 [details] [diff] [review] Alternative patch v1.1 Review of attachment 8405028 [details] [diff] [review]: ----------------------------------------------------------------- LGTM codewise! ::: browser/base/content/tabbrowser.xml @@ +4063,5 @@ > <body><![CDATA[ > if (tab.parentNode != this) > return; > tab._fullyOpen = true; > + tab.scrollTop; Nit: add a comment here saying you're flushing layout to get the transition for the fullyopen attribute to happen. @@ +4772,5 @@ > + this.setAttribute("fullyopen", "true"); > + } else { > + this.removeAttribute("fullyopen"); > + } > + return !!val; Huh, interesting, a lot of these setters seem to not have a return statement. Anyway, this works for me. :-)
Attachment #8405028 - Flags: review?(gijskruitbosch+bugs) → review+
(In reply to :Gijs Kruitbosch from comment #13) > Huh, interesting, a lot of these setters seem to not have a return > statement. Anyway, this works for me. :-) I just tested and it's not necessary. var a = tab._fullyOpen = 6; will have a == 6 while tab._fullyOpen == true. Kinda weird, but maybe that is more expected?
As an aside, yeah that should be more expected since it can be expanded to var a = 6; tab._fully open = 6;
Comment on attachment 8405028 [details] [diff] [review] Alternative patch v1.1 So... this patch adds a second transition after the tab width transition is completely done, effectively doubling the overall animation time. This feels significantly more heavyweight and is different from what was prototyped at http://phlsa.github.io/ff-tab-opening/. It doesn't seem like an overall improvement. I should note that without this patch, I have a hard time seeing any jumpiness (not even sure what this means in this context) caused by the ellipsis. Is this maybe worse on OS X than on Windows and Linux? Bottom line is, I don't think we should take this patch and I certainly don't think it should be on the fast track to Firefox 29. With the other tweaks we've made (e.g. bug 979938), we should be at least on par with if not in a better shape than pre-Australis. I'm not sure how this bug ended up being a priority this late in the game.
Attachment #8405028 - Flags: feedback-
Philipp, can you try out the build at http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/jwein@mozilla.com-aa0ed1a9e560/try-macosx64/ and let us know if this patch is close enough to your intended goal?
Flags: needinfo?(philipp)
Attached patch Alternative patch v1.2 (obsolete) — Splinter Review
This is the most up-to-date patch that fixes the tab-close regression. Carrying forward r+ from Gijs, but still awaiting feedback from Philipp as to if this approach is acceptable visually.
Attachment #8405028 - Attachment is obsolete: true
Attachment #8405521 - Flags: review+
I got feedback from Stephen over IRC. He said that he agreed with Dao that the above patch felt too slow, but he liked the following: > <shorlander> jaws: this feels pretty decent to me: https://pastebin.mozilla.org/4784887 .tab-close-button[fadein], .tab-label[fadein] { transition: opacity 70ms; } .tab-close-button[fullyopen]:not([fadeinlabel]), .tab-label[fullyopen]:not([fadeinlabel]) { visibility: hidden; opacity: .6; } http://logs.glob.uno/?c=mozilla%23fx-team&s=11+Apr+2014&e=11+Apr+2014#c129117
Flags: needinfo?(philipp)
Whiteboard: [Australis:P3-] → [Australis:P3-][fixed-in-fx-team]
Attachment #8405521 - Attachment is obsolete: true
Depends on: 995626
Whiteboard: [Australis:P3-][fixed-in-fx-team] → [Australis:P3-]
Duping forward to bug 995626 since it fixes the same bug but with a different approach.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: