Skip to content

fix: add reduced-motion support to chats and modals#683

Open
saurabhhhcodes wants to merge 1 commit into
knoxiboy:mainfrom
saurabhhhcodes:main
Open

fix: add reduced-motion support to chats and modals#683
saurabhhhcodes wants to merge 1 commit into
knoxiboy:mainfrom
saurabhhhcodes:main

Conversation

@saurabhhhcodes

@saurabhhhcodes saurabhhhcodes commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Closes #556\n\n### What changed\n- Added a global override to minimize animations, transitions, and smooth scrolling\n- Disabled motion-heavy utility animations when users prefer reduced motion\n- Switched reply modal auto-scroll behavior to when reduced motion is enabled\n\n### Validation\n- \n-

nextjs-boilerplate-1@0.1.0 lint
next lint could not be completed in this shell because is not installed locally\n-
nextjs-boilerplate-1@0.1.0 build
next build could not be completed in this shell because is not installed locally\n\n### Notes\nThis is intentionally scoped to the app-wide motion behavior and one modal interaction that directly affects user comfort.

Summary by CodeRabbit

  • Improvements
    • Enhanced accessibility support for reduced motion preferences. The app now respects this system-level setting, automatically disabling all animations and smooth scrolling when enabled. Changes apply throughout the interface, including chat features and interactive elements.

@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Karan Mani Tripathi 's projects Team on Vercel.

A member of the Team first needs to authorize it.

@codeant-ai

codeant-ai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Skipping CodeAnt AI review — this PR is a back-merge between long-lived branches (mainmain). The diff here has already been reviewed when the underlying commits landed on the source branch, so re-running analysis would produce duplicate findings on already-reviewed code.

If you want to analyze this anyway (e.g. you resolved conflicts with new logic), comment @codeant-ai : review and CodeAnt will start a review.

@github-actions github-actions Bot added size/s gssoc'26 GSSoC program issue level:intermediate Intermediate level task type:bug Bug fix labels Jun 20, 2026
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 54b1f24c-348f-4320-a748-5e07886f823f

📥 Commits

Reviewing files that changed from the base of the PR and between 6d05b3e and 9f34ae1.

📒 Files selected for processing (2)
  • app/globals.css
  • components/DoubtRepliesModal.tsx

Walkthrough

Adds prefers-reduced-motion support in two places: a CSS @media block in globals.css that disables animations and forces instant scrolling, and a useEffect in DoubtRepliesModal.tsx that listens to the media query and passes "auto" or "smooth" to scrollIntoView.

Changes

Reduced Motion Accessibility

Layer / File(s) Summary
CSS global override and conditional scroll behavior
app/globals.css, components/DoubtRepliesModal.tsx
globals.css gains a @media (prefers-reduced-motion: reduce) block that sets scroll-behavior: auto and suppresses .animate-spin, .animate-pulse, and .animate-bounce. DoubtRepliesModal adds a prefersReducedMotion state backed by a window.matchMedia listener and switches scrollIntoView behavior between "auto" and "smooth" based on that state.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • knoxiboy/DoubtDesk#480: Applies reduced-motion overrides in the same app/globals.css file, directly overlapping with this PR's @media (prefers-reduced-motion: reduce) block.

Suggested labels

level:intermediate, quality:clean

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding reduced-motion support to chats and modals, which directly matches the changeset.
Linked Issues check ✅ Passed All coding requirements from issue #556 are met: global animations disabled via CSS media query, smooth scrolling disabled for reduced-motion users, and motion-heavy utilities handled appropriately.
Out of Scope Changes check ✅ Passed All changes directly support the reduced-motion accessibility feature; no unrelated modifications are present in the changeset.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch main

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.

❤️ Share

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

@github-actions

Copy link
Copy Markdown

@coderabbitai review

@knoxiboy knoxiboy added merge-conflict PR has merge conflicts that need resolution gssoc:ai-slop labels Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:ai-slop gssoc'26 GSSoC program issue level:intermediate Intermediate level task merge-conflict PR has merge conflicts that need resolution review-needed size/s type:bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add Support for Reduced Motion

2 participants