Repository navigation
Conversation
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #17.
Stop the testimonials requestAnimationFrame loop when
prefers-reduced-motion: reducematches, and listen for preference changes while the page stays open. Cancel the pending frame when stopping and reset the frame timestamp when resuming so a long pause does not jump the track.Keep previous/next navigation available. Normalize negative offsets before rendering the transform: pressing Previous from the initial position previously produced the invalid CSS
translateX(--420px). The existing reduced-motion CSS continues to remove the manual transition.Related implementation: #22. This independently prepared change also fixes Previous at the initial position and includes a live-preference-change regression test. The full browser suite result is linked below for review.
Validation
pnpm build,pnpm lintandpnpm typecheck: passed on Node 24.19.0 / pnpm 11.1.2.git diff --check: passed. The fullpnpm format:checkflags three unchanged files:packages/tokens/src/tokens.css,src/BackToTop.tsxandtsconfig.json.Full hosted Chromium suite: 17 passed (50.2s), including both new motion-preference scenarios and the existing navigation, modal, mobile and overflow checks. Successful run. This test-only workflow lives on a separate fork validation branch and is outside this PR.
Prepared with AI assistance (Codex).