Skip to content

fix: smooth drawer animation and respect animation preferences#10658

Open
jasi381 wants to merge 1 commit intothunderbird:mainfrom
jasi381:fix/drawer-animation-smooth-and-respect-preference
Open

fix: smooth drawer animation and respect animation preferences#10658
jasi381 wants to merge 1 commit intothunderbird:mainfrom
jasi381:fix/drawer-animation-smooth-and-respect-preference

Conversation

@jasi381
Copy link
Contributor

@jasi381 jasi381 commented Mar 8, 2026

Summary

  • Fixes Animation in the sidebar when changing accounts is too fast and hectic #10480 — Sidebar animation too fast/hectic
  • Increases drawer animation duration from 200ms to 300ms with FastOutSlowInEasing for a smoother feel
  • Adds isShowAnimations to DrawerConfig so the drawer respects the user's "Show animations" setting
  • When animations are disabled (via app settings or OS-wide), all drawer transitions use snap() (instant, no animation) instead of slide/fade

Test plan

  • Open sidebar and toggle the account switcher — animation should feel smooth (not jarring)
  • Go to Settings → disable "Show animations" → open sidebar and toggle account switcher — transitions should be instant (no animation)
  • Set Developer Options → Window/Transition animation scale = 0 → verify drawer transitions are instant
  • Verify folder list expand/collapse icon still works correctly
  • Verify switching between accounts animates the account name smoothly

@dani-zilla
Copy link
Contributor

The detekt issue should be a simple fix:

Task :feature:navigation:drawer:dropdown:detekt FAILED
/home/runner/work/thunderbird-android/thunderbird-android/feature/navigation/drawer/dropdown/src/main/kotlin/net/thunderbird/feature/navigation/drawer/dropdown/ui/common/AnimatedExpandIcon.kt:15:14: Parameters in a composable function should be ordered following this pattern: params without defaults, modifiers, params with defaults and optionally, a trailing function that might not have a default param.
Current params are: [isExpanded: Boolean, isShowAnimations: Boolean = true, modifier: Modifier = Modifier, tint: Color? = null] but could be [isExpanded: Boolean, modifier: Modifier = Modifier, isShowAnimations: Boolean = true, tint: Color? = null].

Basically just swapping the isShowAnimations: Boolean = true to be after the modifier param.

Besides that, would you be willing to make a screen recording of this issue? I seem to be having trouble reproducing the initial issue to test the fix.

@Alecaddd
Copy link
Member

Thank you so much for this contribution.
I would recommend to simply listen for the OS-wide animation disabled state rather than adding an extra option inside the application.
From a UX point of view, it feels weird to only have an app with disabled animations but not the OS, or vice versa, so I think this feature should be always in sync with the OS and respect the global users' choice.

@jasi381
Copy link
Contributor Author

jasi381 commented Mar 11, 2026

Thanks for the feedback!

For the animation improvements, I adjusted the drawer animation to make it smoother by increasing the duration from 200ms to 300ms and applying FastOutSlowInEasing so the motion feels less abrupt.

I'm currently addressing the Detekt parameter order issue mentioned by @dani-zilla and will push the fix shortly.

Regarding the UX suggestion from @Alecaddd, I’m also working on updating the implementation so the app respects the OS-wide animation preference instead of relying on a separate app-level option.

I've attached short screen recordings below showing the behaviour before and after the animation changes to help with reproducing the issue.

Before fix (original behaviour):

before.mp4

After animation improvement:

after.mp4

…underbird#10480)

The sidebar animation when switching between the account list and folder
list was too fast/jarring, and played even when the user disabled
animations OS-wide (Developer Options > animation scale = 0).

- Increase animation duration from 200ms to 300ms with FastOutSlowInEasing
- Read OS-wide ANIMATOR_DURATION_SCALE to detect disabled animations
- Use snap() (instant transition) when OS animations are disabled in all
  drawer animations: account selector slide, account switch, and
  expand icon rotation
@jasi381 jasi381 force-pushed the fix/drawer-animation-smooth-and-respect-preference branch from 9aceabb to e2f1c73 Compare March 14, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Animation in the sidebar when changing accounts is too fast and hectic

3 participants