Skip to content

feat: Respect accessibility setting for animations#6

Draft
google-labs-jules[bot] wants to merge 1 commit intomainfrom
feature/respect-accessibility-animation-settings
Draft

feat: Respect accessibility setting for animations#6
google-labs-jules[bot] wants to merge 1 commit intomainfrom
feature/respect-accessibility-animation-settings

Conversation

@google-labs-jules
Copy link

This change ensures that the Mattermost mobile app respects the system-wide accessibility setting for animations.

A new utility function areAnimationsEnabled is introduced in app/utils/accessibility.ts. This function checks the isReduceMotionEnabled status from React Native's AccessibilityInfo API.

The main navigation logic in app/screens/navigation.ts has been updated to use this function. Several functions responsible for screen transitions and modal presentations have been made async to await the result of areAnimationsEnabled. Based on this result, animations are either enabled or disabled for various navigation actions, including screen pushes, modal presentations, and bottom sheets.

This change addresses the issue where animations were still present even when disabled in the device's accessibility settings.

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.

0 participants