Skip to content

fix: make Enable animations toggle authoritative over OS reduced-motion - #182

Merged
snekxs merged 1 commit into
OpenMouse-Project:control-panelfrom
yanhenrique-dev:fix/animation-toggle-os-override
Sep 6, 2026
Merged

fix: make Enable animations toggle authoritative over OS reduced-motion#182
snekxs merged 1 commit into
OpenMouse-Project:control-panelfrom
yanhenrique-dev:fix/animation-toggle-os-override

Conversation

@yanhenrique-dev

Copy link
Copy Markdown

Problem

The Motion card read as Reduce motion (checked = no animation), so activating the checkbox disabled animations — the opposite of what users expect. On top of that, a global prefers-reduced-motion CSS override killed transitions even when the site setting had animations enabled.

Changes

  • InterfaceSettings: card now reads Animations / Enable animations with inverted checked state (checked = motion on).
  • interface-preferences: added systemPrefersReducedMotion(); missing saved value initializes from the OS, explicit site choice always wins.
  • control.css: removed the global prefers-reduced-motion transition kill; toast reduced-motion handling now follows .reduce-interface-motion instead of the OS media query.

Verification

  • node --test src/interface-preferences.test.ts: 4 pass
  • Manual check: explicit false + OS reduce=true resolves to animations on (site wins); missing value + OS reduce=true resolves to reduced (OS respected by default).

The Motion card read as Reduce motion, so checking the box disabled
animations — the opposite of what activate means. It now reads Enable
animations with inverted checked state.
Also removes the global prefers-reduced-motion CSS override in the
control panel, which killed transitions even with animations enabled
on the site. The site preference is now the single source of truth
and is initialized from the OS setting on first load.
@snekxs
snekxs merged commit 96e27b2 into OpenMouse-Project:control-panelSep 6, 2026
3 checks passed
Sign up for freeto 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.

2 participants

@yanhenrique-dev@snekxs