Skip to content

Reduce motion: Drawer.CollapsedItem, BottomNavigation.Bar and an animated IconButton show their start state for a few frames #5298

Open

Description

@Doberjohn

Current behaviour

With reduce motion on (the device setting, or reduceMotion="on" on PaperProvider), three components show their start state for one or more frames before they jump to the end state:

  • Drawer.CollapsedItem: when it becomes active without a press, its indicator is drawn at half width first.
  • BottomNavigation.Bar: when navigationState.index changes, the active pill starts at its narrow width.
  • IconButton with animated: when icon changes, the old and the new icon are drawn on top of each other at full opacity.

Nothing moves, but the start state flashes: 2 to 5 frames (33 to 119 ms) on an Android 13 emulator, one frame on iOS. Each component starts its zero-duration animation in an effect after the render that already shows the new state (DrawerCollapsedItem.tsx, BottomNavigationBar.tsx, CrossFadeIcon.tsx). Without reduce motion the same gap shows once as a short pause before the animation. 6.0.0-alpha.3 runs the same zero-duration timings.

Expected behaviour

Under reduce motion the first frame of the new state is the end state, as Badge, Surface, Menu and the FAB components already do.

How to reproduce?

  1. Turn on the device's reduce motion (Android: Settings, Accessibility, Remove animations; iOS: Settings, Accessibility, Motion, Reduce Motion), or pass reduceMotion="on" to PaperProvider.
  2. Render <Drawer.CollapsedItem focusedIcon="star" unfocusedIcon="star-outline" label="Starred" active={active} /> and set active to true from a timer; or change navigationState.index of a BottomNavigation.Bar; or change icon on <IconButton animated icon={icon} onPress={onPress} />.
  3. Record the screen and step through the frames.

Your Environment

software version
ios 27.2 (simulator)
android 13 (emulator)
react-native 0.88.1 (New Architecture)
react-native-paper 6.0.0-alpha.4 (main at 7ab2640)
expo sdk 58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions