Skip to content

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 mr-cheffy February 7, 2025 12:18
@mr-cheffy
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