Repository navigation
feat(gui): follow the OS reduce-motion setting - #889
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
With reduced motion on, the lyrics page and the Room lyrics column jump to each new line instead of gliding, and the CSS transitions (switch knob, folder chevron, hover slides) are turned off. Turning the setting off brings the motion back with no reload. Closes LargeModGames#839
1061e85 to
3536dad
Compare
Summary
With reduced motion on, the lyrics page and the Room lyrics column now jump to the current line instead of gliding, and the CSS transitions (the settings switch knob, the folder chevron, hover slides) are turned off. With the setting off nothing changes, and flipping it takes effect right away with no reload
A
scrollBehavior()helper readsprefers-reduced-motioninside the scroll effects, and one@media (prefers-reduced-motion: reduce)block instyle.csssetstransition: none !importantacross the GUI. No new interface text, so the Rust string table and the generated bindings stay untouchedFixes #839
Testing
In
gui/, on macOS arm64:The two tests in motion.test.ts were red first: inverting the helper's return values failed both, restored after
Additional notes
With the OS setting on, Settings switches jump instead of sliding and synced lyrics pages step line by line. With it off, behavior is identical to today
Summary by CodeRabbit