Closed Bug 1716209 Opened 3 years ago Closed 3 years ago

Animate the opening/closing of the Address lists

Categories

(Thunderbird :: Theme, task)

Tracking

(thunderbird_esr78 wontfix, thunderbird_esr91 wontfix, thunderbird92 wontfix)

RESOLVED FIXED
91 Branch
Tracking Status
thunderbird_esr78 --- wontfix
thunderbird_esr91 --- wontfix
thunderbird92 --- wontfix

People

(Reporter: Paenglab, Assigned: aleca)

References

Details

(Whiteboard: [tb-new-addrbook])

Attachments

(2 files, 2 obsolete files)

We can make the opening/closing of the address lists on the left more modern with animating them.

What do you think about this?

I'm doing the twisty animation in another bug which ports the M-C icon de-duplication (bug 1699586). Both will have the same animation time.

Assignee: nobody → richard.marti
Status: NEW → ASSIGNED
Attachment #9226696 - Flags: review?(alessandro)
Comment on attachment 9226696 [details] [diff] [review]
1716209-animate-address-list.patch

Review of attachment 9226696 [details] [diff] [review]:
-----------------------------------------------------------------

I like the goal and I think we should definitely do it, but unfortunately this is not the correct approach.
It's not recommended to animate fixed properties like `width` or `height` as animating those causes multiple reflow calls and consequential repaints and this can be very CPU heavy.

The approach for this would be to animate the `transform` properties, which use the GPU for processing, and have a mix of JS + CSS to handle everything.
Kinda like we did in the OpenPGP key wizard.
Attachment #9226696 - Flags: review?(alessandro) → review-

The twisty animation should also be done here as there are scaling issues on aleca's PC.

Assignee: richard.marti → nobody
Status: ASSIGNED → NEW

I can try to find some time to work on this later this week.

Assignee: nobody → alessandro

Setting this to be left open so we can land an initial improvement from Richard.
Pinging darktrojan to let him know we're slightly changing the markup of the twisty.

Flags: needinfo?(geoff)
Keywords: leave-open
Attachment #9226696 - Attachment is obsolete: true
Target Milestone: --- → 91 Branch

Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/c1227ffbc658
[New Address Book] Animate the Address book twisty. r=aleca

Ooh, fancy!

Flags: needinfo?(geoff)
Summary: [New AB] Animate the opening/closing of the Address lists → Animate the opening/closing of the Address lists
Whiteboard: [tb-new-addrbook]
Status: NEW → ASSIGNED
Keywords: leave-open

Patch created to animate the show/hide of the child container.
I ended up needing to use the height attribute to animate, as it wasn't possible to use GPU based animation.

This shouldn't be too bad as I'm removing the fixed height once the animation is completed, so we don't stumble upon issues where the container doesn't properly resize if more content is added, or the font size is changed.

For now, this animation is relegated to the addressbook CSS, but since the JS is generic for every tree listbox, we could maybe expand this solution to be CSS agnostic and work everywhere.

This is a purely visual improvement, but it might impact the CPU usage for long lists, so better not uplifting it to 91 and test it properly.

Depends on: 1724843
Attachment #9235701 - Attachment is obsolete: true

Let's not check this in, it breaks a test: mail/components/addrbook/test/browser/new/browser_directory_tree.js. You'll need to change this bit, in the first case check the height is 0, in the second check it isn't 0. There's no cases where open is false, so you could simplify a bit.

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/0a89ac0edc9a
Animate the revealing and collapsing of the addressbook tree listbox. r=darktrojan,ui-r=Paenglab

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: