Skip to content

frontend(fix): keep design-page hover nudges still under reduced motion - #580

Merged
Ducksss merged 1 commit into
mainfrom
claude/reduced-motion-hover-followup
Sep 30, 2026
Merged

Ducksss merged 1 commit into
mainfrom
claude/reduced-motion-hover-followup

Conversation

@Ducksss

@Ducksss Ducksss commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

This follow-up to #573 addresses its last CodeRabbit thread: decorative hover nudges now respect prefers-reduced-motion.

  • /docs/design principle glyphs: the hover transitions and transforms (key, lift, caret, stamp) now sit inside @media (prefers-reduced-motion: no-preference) in docs.css.
  • Hover arrows: these now use motion-safe: for both the transition and the translate utilities:
    • the decision-ledger receipts
    • the case study's "Browse the catalog" and "Read the design philosophy" links
    • the /about link to the case study

Before, the global reduced-motion guard only shortened the transition, so reduced-motion visitors still saw each part jump on hover. Now it stays put.

Verification

  • pnpm test:release, not run in full locally; CI runs the gate. Run locally:
    • Prettier, eslint, and pnpm exec tsc --noEmit pass.
    • tests/int/fumadocs-site.int.spec.ts passes 39/39.
    • Measured in headless Chromium with motion allowed, hover moves the glyph key by (-3, -3), the receipt arrow by 1px -1px, and the case-study arrow by 8px. With reducedMotion: 'reduce', all three computed transforms are none.

Registry Checklist

  • Registry changes keep generated public/r output out of git. (No registry changes.)
  • Component changes update source, manifest, docs, and installer tests together. (No component changes.)
  • Payload target code keeps Local API and hook examples transaction-safe. (No target code touched.)

Notes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Accessibility
    • Hover and arrow animations now respect visitors’ reduced-motion preferences across case study, design, and documentation pages.

Wraps the /docs/design glyph hover transitions and transforms in
prefers-reduced-motion: no-preference. It also prefixes the hover-arrow
utilities on the decision receipts, the case-study "Browse the catalog"
and "Read the design philosophy" links, and the /about case-study link
with motion-safe:. Before this, the global guard only zeroed the
transition, so reduced-motion visitors still saw each part jump.

Verified in Chromium. With motion allowed, glyphs translate (-3, -3),
receipt arrows translate 1px -1px, and the case-study arrow translates
8px. Under reduced motion all three stay at none.

Addresses CodeRabbit review on #573.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
payload-components Ready Ready Preview Sep 30, 2026 3:24pm UTC
payload-components-97bf Ready Ready Preview Sep 30, 2026 3:24pm UTC

Copilot AI balanced review requested due to automatic review settings September 30, 2026 15:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Ducksss/payload-components/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 3269d845-6f61-40a7-91c8-62c569b6c05c

📥 Commits

Reviewing files that changed from the base of the PR and between 74aa4ce and 13a76bc.

📒 Files selected for processing (5)
  • src/app/[locale]/about/page.tsx
  • src/app/[locale]/docs/docs.css
  • src/components/site/case-study/CaseOutro.tsx
  • src/components/site/case-study/CaseWork.tsx
  • src/components/site/design/DesignEditorial.tsx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Hover transitions and translations on arrows and documentation glyphs now depend on motion preference. They do not apply for visitors who prefer reduced motion.

Changes

Motion preference handling

Layer / File(s) Summary
Condition hover effects on motion preference
src/app/[locale]/about/page.tsx, src/app/[locale]/docs/docs.css, src/components/site/case-study/CaseOutro.tsx, src/components/site/case-study/CaseWork.tsx, src/components/site/design/DesignEditorial.tsx
Arrow transitions and hover translations use motion-safe: variants. Documentation glyph transitions and hover transforms apply only when prefers-reduced-motion is no-preference.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 13a76

The requested reduced-motion changes are in place for the effects in this PR’s scope; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 4 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: keeping design-page hover nudges still when reduced motion is enabled.
Description check ✅ Passed The description includes all required template sections. It explains the reduced-motion changes, lists verification results, states that the full release test was not run locally, and completes the re…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 4 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@Ducksss
Ducksss merged commit ac916f5 into main Sep 30, 2026
13 checks passed
@Ducksss
Ducksss deleted the claude/reduced-motion-hover-followup branch September 30, 2026 16:03

This branch was successfully deployed

2 active deployments
Preview – payload-components — 13a76bc0 Deployed Sep 30, 2026 by vercel[bot]
Preview – payload-components-97bf — 13a76bc0 Deployed Sep 30, 2026 by vercel[bot]
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.

2 participants