Skip to content

impv: animations cleanup#119

Closed
tansawit wants to merge 3 commits intomainfrom
impv/animations-cleanup
Closed

impv: animations cleanup#119
tansawit wants to merge 3 commits intomainfrom
impv/animations-cleanup

Conversation

@tansawit
Copy link
Copy Markdown
Contributor

@tansawit tansawit commented Jan 22, 2026

Summary

  • Add prefers-reduced-motion media queries to disable CSS animations when users prefer reduced motion
  • Use useReducedMotion hook from react-spring to make spring transitions immediate
  • Reduce modal translateY from 24px to 8px for subtler animation

Test plan

  • Enable "Reduce motion" in system accessibility settings
  • Verify animations are disabled across modals, toasts, accordions, drawers, loaders, and skeletons
  • Verify react-spring transitions (page transitions, toast, animated height) skip animation when reduced motion is enabled

Note

Cursor Bugbot is generating a summary for commit 4bf1441. Configure here.

Summary by CodeRabbit

  • New Features
    • Enhanced accessibility with comprehensive support for system-level reduced motion preferences. Animations and transitions across all components and pages now automatically disable when users enable reduced motion in their operating system settings, creating a more comfortable experience for individuals sensitive to motion.

✏️ Tip: You can customize this high-level summary in your review settings.

@tansawit tansawit marked this pull request as draft January 22, 2026 14:15
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jan 22, 2026

Deploying interwovenkit-testnet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 452144a
Status: ✅  Deploy successful!
Preview URL: https://2ef507f5.interwovenkit-testnet.pages.dev
Branch Preview URL: https://impv-animations-cleanup.interwovenkit-testnet.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jan 22, 2026

Deploying interwovenkit with  Cloudflare Pages  Cloudflare Pages

Latest commit: 452144a
Status: ✅  Deploy successful!
Preview URL: https://3e00f0e0.interwovenkit.pages.dev
Branch Preview URL: https://impv-animations-cleanup.interwovenkit.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jan 22, 2026

Deploying interwovenkit-staging with  Cloudflare Pages  Cloudflare Pages

Latest commit: 452144a
Status: ✅  Deploy successful!
Preview URL: https://3dc208d7.interwovenkit-staging.pages.dev
Branch Preview URL: https://impv-animations-cleanup.interwovenkit-staging.pages.dev

View logs

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 22, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

This PR adds accessibility support for users who prefer reduced motion. It introduces the useReducedMotion() hook from @react-spring/web in several React components to skip animations immediately, and adds @media (prefers-reduced-motion: reduce) CSS media queries across multiple stylesheet modules to disable animations.

Changes

Cohort / File(s) Summary
React Components with Reduced Motion Hook
packages/interwovenkit-react/src/components/AnimatedHeight.tsx, Toast.tsx
packages/interwovenkit-react/src/pages/deposit/Deposit.tsx, Withdraw.tsx
Import useReducedMotion() from @react-spring/web, call hook to obtain reducedMotion flag, pass immediate: reducedMotion to spring/transition configs to skip animations when reduced motion is active
Component CSS Modules with Prefers-Reduced-Motion
packages/interwovenkit-react/src/components/Loader.module.css, Modal.module.css, Skeleton.module.css, WidgetAccordion.module.css, WidgetTooltip.module.css
packages/interwovenkit-react/src/public/app/Drawer.module.css
Add @media (prefers-reduced-motion: reduce) queries that disable animations (animation: none, transition: none) for affected elements when reduced motion is preferred
Page/Route CSS Modules with Prefers-Reduced-Motion
packages/interwovenkit-react/src/pages/bridge/BridgePreviewRoute.module.css
packages/interwovenkit-react/src/pages/wallet/components/ChainSelect.module.css
Add media queries to disable animations and transitions under reduced-motion preference
Portfolio Section CSS Modules with Prefers-Reduced-Motion
packages/interwovenkit-react/src/pages/wallet/tabs/portfolio/AppchainPositionGroup.module.css, AssetGroup.module.css, InitiaPositionGroup.module.css, LiquiditySection.module.css, PositionSection.module.css, VipSection.module.css
Add @media (prefers-reduced-motion: reduce) to disable collapsibleContent animations when reduced motion is active

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~18 minutes

Poem

🐰 A hop through motion's gentle grace,
Reducing speed to set the pace,
With media queries, smooth and kind,
We leave the spinning ways behind,
For every user, calm and still,
Accessibility is our will!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The PR title 'impv: animations cleanup' is vague and generic, using non-descriptive terms that don't convey the actual main change, which is adding accessibility support for reduced motion. Revise the title to be more specific and descriptive, such as 'feat(a11y): add prefers-reduced-motion support' to clearly communicate the accessibility improvement being implemented.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Fix all issues with AI agents
In
`@packages/interwovenkit-react/src/pages/wallet/tabs/portfolio/AppchainPositionGroup.module.css`:
- Around line 119-123: The reduced-motion rule for .collapsibleContent is lower
specificity than the component's existing selector so it never applies; update
the media query to use the same composite selector as the collapsible component
(e.g., .collapsibleRoot .collapsibleContent) or otherwise match the original
selector used elsewhere so specificity is equal (refer to .collapsibleContent
and .collapsibleRoot) and keep animation: none inside that more specific
selector.

In
`@packages/interwovenkit-react/src/pages/wallet/tabs/portfolio/AssetGroup.module.css`:
- Around line 151-155: The reduced-motion media query is less specific than the
original rules because those use [data-state] attribute selectors; update the
media query to target the exact same selectors (including the [data-state="..."]
attribute variants) that style .collapsibleContent (e.g., replicate the
selectors that include [data-state] and .collapsibleContent) so the override has
equal specificity and animation: none takes effect; do not use global
!important—match the original attribute-including selectors inside the `@media`
(prefers-reduced-motion: reduce) block.

In
`@packages/interwovenkit-react/src/pages/wallet/tabs/portfolio/InitiaPositionGroup.module.css`:
- Around line 119-123: The reduced-motion media query selector is less specific
than the original rules so it doesn't override them; update the media query to
target the exact attribute-specific selectors used elsewhere (e.g.,
.collapsibleContent[data-state="open"] and
.collapsibleContent[data-state="closed"]) and set animation: none on those
selectors (or add the same [data-state] attribute to the media query selector)
so the reduced-motion preference actually disables the animations for
.collapsibleContent.

In
`@packages/interwovenkit-react/src/pages/wallet/tabs/portfolio/LiquiditySection.module.css`:
- Around line 225-228: The reduced-motion media query currently targets
.collapsibleContent but is less specific than the existing [data-state="open"] /
[data-state="closed"] animation rules, so update the media query to target those
data-state selectors directly (e.g. [data-state="open"] .collapsibleContent and
[data-state="closed"] .collapsibleContent) and set animation: none; (or
animation: none !important if you prefer) so the animations on
.collapsibleContent are reliably disabled when prefers-reduced-motion is set.

In
`@packages/interwovenkit-react/src/pages/wallet/tabs/portfolio/VipSection.module.css`:
- Around line 195-199: The reduced-motion media query is using
.collapsibleContent with lower specificity than the selector that sets the
animation, so the override won't apply; update the media query to use the exact
same selector (or match its specificity) that originally defines the animation
(for example, replicate the full selector used elsewhere like .<parentSelector>
.collapsibleContent or the modifier selector used when the animation is
declared) and set animation: none; there — ensure the selector inside `@media`
(prefers-reduced-motion: reduce) exactly matches the original animation rule (or
increase specificity by repeating the class) so the override takes effect.

@tansawit tansawit changed the title feat(a11y): add prefers-reduced-motion support impv: animations cleanup Jan 22, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on February 4

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Respect user's motion preferences across all animated components:
- Add prefers-reduced-motion media queries to disable CSS animations
- Use useReducedMotion hook for react-spring transitions
- Reduce modal translateY for subtler animation
@tansawit tansawit force-pushed the impv/animations-cleanup branch from 4bf1441 to a3f7477 Compare January 22, 2026 14:20
@tansawit tansawit closed this Feb 18, 2026
@simcheolhwan simcheolhwan deleted the impv/animations-cleanup branch February 25, 2026 10:30
Sign up for free to 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.

1 participant