Repository navigation
test: wait for hero motion preference events - #1428
Conversation
|
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Record and await preference changes tests/hero-media.test.ts |
The test records the reduced-motion match state in a document dataset attribute. It waits for the matching state after enabling and restoring the preference. This replaces checks that ran without waiting for the change events. |
Priority:
Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Other
Possibly related PRs
- TanStack/tanstack.com#1424: Adds the same reduced-motion change listener and waits to the same browser test.
- TanStack/tanstack.com#1425: Adds the browser test and the HeroPalmMedia reduced-motion behavior that the test checks.
Suggested reviewers: benjavicente
Merge Risk: 
Minimal · up to a1a3d
-
The test synchronization change is narrowly scoped and introduces no established merge-blocking risk.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tanstack-com | a1a3dd9 | Commit Preview URL Branch Preview URL |
Oct 26 2026, 06:11 AM |
The hero media browser test could observe Chrome pausing hidden autoplay video before the reduced-motion change event reached the component. Switching the preference back immediately could then coalesce the events and fail the assertion that playback stays paused.
Wait for each media-query change event before advancing the test. This restores the synchronization from the earlier Redact branch that was absent from its final rewritten commit. Production code and existing playback assertions are unchanged.
Validation: full
pnpm testpassed, including TypeScript, lint, unit, chat and desktop checks. The hero browser fixture passed.git diff --checkpassed.Summary by CodeRabbit