Prototype new tab opening/closing animations

RESOLVED FIXED in Firefox 67

Status

()

P4
normal
RESOLVED FIXED
2 years ago
2 days ago

People

(Reporter: jaws, Assigned: Felipe)

Tracking

(Depends on: 1 bug, Blocks: 2 bugs)

55 Branch
Firefox 67
Points:
3
Dependency tree / graph
Bug Flags:
qe-verify +

Firefox Tracking Flags

(firefox55 affected, firefox67 fixed)

Details

(Whiteboard: [reserve-photon-animation][tabs-p1])

Attachments

(5 attachments, 3 obsolete attachments)

Posted video Tab - New.mp4 (obsolete) —
See attached video for what this should look like.
Flags: qe-verify+
Priority: -- → P2
QA Contact: jwilliams
Note: the motions use the photon motion curve
Summary: The "new tab" animation should use the photon animation curve → Implement new tab animation
Attachment #8857138 - Attachment is obsolete: true
Priority: P2 → P3
Whiteboard: [photon-animation] → [reserve-photon-animation]
Whiteboard: [reserve-photon-animation] → [reserve-photon-animation][tabs-p1]
Priority: P3 → P4
QA Contact: jwilliams → stefan.georgiev
Posted file New Tab motions
I've attached new updated versions of the new tab animations.

Folder includes motions for...

1. Tab New (1+ position away from current tab) 
2. Tab New (Next to current tab)
3. Tab New in Between Tabs (Background)
4. Tab New in Between Tabs

I also included slow motion versions of each to make the subtle details easier to catch.

Once we have someone working on these I can give a detailed walk-through of what's happening in each.
Attachment #8857137 - Attachment is obsolete: true
Attachment #8859295 - Attachment is obsolete: true
Comment on attachment 8943370 [details]
New Tab motions

Marking as obsolete since these are outdated.  Please refer to individual bugs for updated motions.
Attachment #8943370 - Attachment is obsolete: true
Comment on attachment 8943370 [details]
New Tab motions

sorry this is the most up to date file. Meant to mark a different bug's video as obsolete :)
Attachment #8943370 - Attachment is obsolete: false
(Assignee)

Updated

7 months ago
Assignee: nobody → felipc
Status: NEW → ASSIGNED
(Assignee)

Comment 7

7 months ago
I'm working on the sliding sideways effects, but I wanted to post an earlier version of the animation I had that is a simpler version of the sliding up/down from one of the specs (the "new tab 1 position away").

This build also has the same animation in reverse for the closing effect, which afaict wasn't part of any spec. But I really like how it feels to use so I wanted to let people try it.

(it still has some problem when there's enough tabs to occupy the entire tab bar but not enough to overflow)

https://tools.taskcluster.net/index/gecko.v2.try.revision.b499eb07ef71157611856b3ab277172af8d5e6de.firefox
(Assignee)

Comment 8

6 months ago
So here's a summary of where things are. I've been testing a number of approaches and going with the ones that look more promising.


For the tab opening animation, I removed the width transition such that the new tab is added immediately with its correct width in the tab strip.  Then, I translate it* and all the posterior tabs by -100%, and animate that with a transition to 0%.

* actually, for the tab being opened, I only translate the .tab-background. All other tabs are fully translated


A) This seems to work well, but the problem is that this is not a reversible animation that can be used for tab closing. The main reason is that on tab closing, the selected tab goes to the tab + 1, not the tab - 1 (except if it's at the end of the tab strip), so the animation needs to be different.

Some other problems:

B) when closing, the tab background that we'd need to animate is not the one of the tab being closed, but actually the one of the tab getting selected. This is easily doable, but paired with issue A, it seems this will lead in a path of a lot more attributes and selectors to get things right.

C) the new tab button is something that I haven't figured out yet. The problem with it is that it animates together with the tabs that are sliding, but it has a different width than the tabs, so we can't use the 100% translation on it, because that's relative to its own width.

(Although right now I'm just instantly moving the new tab button and the difference feels very hard to notice.. I'll post videos for all to see)

Another thing with the new tab button, is that in one case of the opening tab spec, we can clearly see one button fading in at the new position while another one is fading out, so it would need two buttons to implement it


I even thought about having making the tab background independent instead of being part of each tab. This would probably make the opening/close animations easier, but would cause other difficulties elsewhere (e.g, scrolling the tab strip, and multi-selected tabs), and would need some solution to keep its own width in sync with the tabs' width, so I didn't attempt to go in that direction
(Assignee)

Comment 9

6 months ago
I'll post some videos to get a feel for the animations in their current state. I'm first focusing on getting the logistics of the animations themselves right (as detailed in comment 8) before diving into how to specify all animations cases at the same time.
(Assignee)

Comment 12

6 months ago
I also wanted to post the popping up/down animation. This is in the spec as the "new tab 1 position away from the current tab", but I like how it looks in general, so I wanted to post it here for reference. This is what I had in the try build posted earlier, but with more glitches fixed.
(Assignee)

Comment 13

2 months ago
This patch implements a new, preffed-off tab opening/closing animation where the tab slides up and down in place. In addition, it adjusts some tests and code that were relying on the max-width transitionend event happening. The intent of the patch is to land it preffed-off and iterate on the design in the tree
Blocks: 1519366
(Assignee)

Comment 14

2 months ago

Updating the title to reflect that this is just the beginning of this work (and not the final animations), and to reflect the fact that the closing animations are also included here (so that I can dupe bug 135559 to this one)

Summary: Implement new tab animation → Prototype new tab opening/close animations
(Assignee)

Updated

2 months ago
Summary: Prototype new tab opening/close animations → Prototype new tab opening/closing animations
(Assignee)

Updated

2 months ago
Duplicate of this bug: 1355589
(Assignee)

Updated

2 months ago
No longer blocks: 1352117

Comment 16

2 months ago
Pushed by fgomes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5c6cdeb8648d
Implement slide-up/down tab opening/closing animation. r=dao
(Assignee)

Updated

2 months ago
Flags: needinfo?(felipc)
(Assignee)

Comment 19

2 months ago

There was a problem on the TART test in which it's not receiving the new TabAnimationEnd event for some reason. Since this would only matter after we enable the new animations by default, and at that point we'll need to re-evaluate the test anyways (bug 1522198), I just reverted the TART code to continue listening for the transitionend event (i.e., no changes were made to that test after all).

I also re-ran all tests with the patch queue and triggered several test-verify runs, and it seems ok:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=da8946c0c43e1a4374657a890dca2ee41f8b6e9a

I added the pref (defaulting to false) to firefox.js to make it easier to toggle, and I'll reland it.

Comment 20

2 months ago
Pushed by fgomes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2827b5f1530b
Implement slide-up/down tab opening/closing animation. r=dao

Comment 21

2 months ago
bugherder
Status: ASSIGNED → RESOLVED
Last Resolved: 2 months ago
status-firefox67: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Whiteboard: [reserve-photon-animation][tabs-p1] → [reserve-photon-animation][tabs-p1][qa-triaged]
QA Whiteboard: [qa-triaged]
Whiteboard: [reserve-photon-animation][tabs-p1][qa-triaged] → [reserve-photon-animation][tabs-p1]
You need to log in before you can comment on or make changes to this bug.