Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch's reduced motion check needs review #3498

Open
amgleitman opened this issue Mar 14, 2024 · 0 comments
Open

Switch's reduced motion check needs review #3498

amgleitman opened this issue Mar 14, 2024 · 0 comments

Comments

@amgleitman
Copy link
Member

const isReduceMotionEnabled = AccessibilityInfo.isReduceMotionEnabled;
const thumbAnimation = isReduceMotionEnabled ? { animationClass: 'Ribbon_SwitchThumb' } : null;

This was discovered while investigating turning on strict null checks everywhere.

AccessibilityInfo.isReduceMotionEnabled is a function, so thumbAnimation will always choose the "true" option. Is this really what we want? I've noticed that reduce motion doesn't seem to affect native slide switches on macOS and iOS, and the FURN switch reflects that behavior, although other platforms might be a different story. We should double check this.

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

No branches or pull requests

1 participant