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

Respect reduced motion and animate-sidebar in compact mode #5026

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

sjwall
Copy link

@sjwall sjwall commented Feb 7, 2025

Currently the compact mode is not respecting the system reduced motion setting.

This PR adds overrides to transition to disable animations when prefers-reduced-motion is set and for the sidebar it also overrides when zen.view.compact.animate-sidebar is set to false

I have noticed some other places that need reduced motion handling and can update those in follow up PRs if happy with how this change works

@sjwall sjwall requested a review from mauro-balades as a code owner February 7, 2025 12:18
@mauro-balades
Copy link
Member

Framer already respects motion preferences though

@JSGRD22
Copy link
Contributor

JSGRD22 commented Feb 8, 2025

#5048

@sjwall
Copy link
Author

sjwall commented Feb 8, 2025

Framer already respects motion preferences though

That's my understanding as well. It looks like these animations are CSS rather than Framer. I tested by removing all the transition from zen-compact-mode.css and the animations didn't happen, regardless of motion preference

CSS being used rather than Framer is also shown by the zen.view.compact.animate-sidebar config option. In the Framer animation code it is used to disable the animation but changing this value doesn't stop the animation

I don't know the zen code well enough yet to understand the usage of Framer vs CSS

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants