Hub motion tokens + reduced-motion pin — epic #499 child 1 (#512) - #514
Conversation
Motion values were scattered literals (.16s/.22s/.4s/.9s across eight transition sites). They now live as CSS custom properties on :root — --motion-fast/base/slow/draw plus --motion-ease/--motion-ease-emphatic — and every transition declaration routes through them, so later motion children (micro-interactions, view transitions) share one tuned scale. The two 0.15s sites normalize to the fast tier (a 10ms delta, under one 60fps frame). Zero visual change otherwise; the full browser suite is the parity net. The stylesheet header documents the motion budget: motion exists to make an observed state change legible; decorative loops on quiet data are prohibited; the one sanctioned continuous motion is a pulse indicating an observed ongoing state (live dot, blocked gate) — and reduced motion freezes even those. The global prefers-reduced-motion guard already existed (readiness wave) — it is now PINNED: a source test locks the guard block, and a browser test with reducedMotion:'reduce' emulation proves transitions and animations collapse (≤0.01ms) and infinite pulses stop looping. Tokens are asserted resolving via getComputedStyle and driving the nav's real transition durations. Closes #512. Part of epic #499. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Strix Security ReviewNo security issues found. Updated for Reviewed by Strix |
|
Warning Review limit reached
Next review available in: 33 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoDashboard motion tokens + pinned reduced-motion coverage
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
300 rules✅ Skills:
|
Qodo bug 1: the reduced-motion assertions parsed computed durations with a bare parseFloat, assuming seconds serialization — true in Chromium (the test passed), but engine-dependent. Parsing is now unit-aware (ms → s). Qodo bug 2: startServer registered no child 'error' handler, so a spawn failure would raise an unhandled event instead of rejecting cleanly. Handler added. The same gap exists in every copied browser harness — extracting a shared tests/browser helper is the durable fix, queued as the immediate follow-up under #502. Refs #512 (PR #514 review follow-up). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Both Qodo bugs addressed in the follow-up commit: (1) reduced-motion duration parsing is unit-aware (ms→s) instead of assuming seconds serialization — Chromium serializes seconds (the test was green), but the assertion shouldn't be engine-dependent; (2) |
Closes #512 · first implementation child of epic #499 (unblocked by #495/PR #504).
What
:root—--motion-fast/.16s,--motion-base/.22s,--motion-slow/.4s,--motion-draw/.9s,--motion-ease,--motion-ease-emphatic— and all eight existing transition sites migrated to them. One tuned scale for every later motion child. The two0.15ssites normalize to the fast tier (10ms delta, under a 60fps frame); otherwise zero visual change — the full browser suite (now 14 journeys) is the parity net.prefers-reduced-motionblock already existed (readiness wave; honest scope note on Hub motion tokens + global reduced-motion policy (epic #499, child 1) #512): it's now locked by a source test and a real-browser test withreducedMotion: 'reduce'emulation proving transitions AND animations collapse to ≤0.01ms and infinite pulses stop looping.TDD
Verified failing first: token/budget/migration tests RED on the old stylesheet (the guard pin correctly passed — it existed). Browser: tokens resolving via
getComputedStyle+ driving the nav's real transition durations; reduced-motion collapse.Verification
Core 1818/1818 · browser 14/14 (all merged waves' tests together) · lint 0 · typecheck 0 · validate 196 · security green · whitespace clean.
Zero-dep per the epic's recommended posture — the
motion-package and Rive decisions stay open for the micro-interaction children.Merging after green checks + reviewer bodies read, per the current working protocol.
🤖 Generated with Claude Code