feat(#1807): prefers-reduced-motion defaults for Collapsible transitions - #1996
feat(#1807): prefers-reduced-motion defaults for Collapsible transitions#1996kotAPI wants to merge 2 commits into
Conversation
Add an SSR-safe usePrefersReducedMotion hook and disable default Collapsible height transitions when users prefer reduced motion unless transitionDuration is set explicitly.
🦋 Changeset detectedLatest commit: 98ab10e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Review limit reached
More reviews will be available in 3 minutes and 57 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Note Storybook behavior when transitionDuration is omitted and reduced motion is enabled.
CoverageThis report compares the PR with the base branch. "Δ" shows how the PR affects each metric.
Coverage improved or stayed the same. Great job! Run |
Code reviewLGTM. Matches project patterns for portal Theme refs, Floating UI prop merge, controlled-switch/lazy-mount/RTL tests, or focused bug fixes. No changes requested. |
Summary
usePrefersReducedMotionhook with tests.prefers-reduced-motion: reduceis enabled andtransitionDurationis omitted.Test plan
npm test -- --testPathPatterns=usePrefersReducedMotion|Collapsible/tests/Collapsible.testCloses #1807