feat(home): add scroll-reveal animations to homepage sections#224
feat(home): add scroll-reveal animations to homepage sections#224PRODHOSH wants to merge 3 commits into
Conversation
|
@PRODHOSH is attempting to deploy a commit to the vishnukothakapu's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughA new client ScrollReveal component detects prefers-reduced-motion and uses an IntersectionObserver to toggle a visible state; it’s applied across the homepage to reveal stats items (with per-item delays), the Features header, Demo content, and the Call To Action on scroll. ChangesHomepage Scroll Reveal Animations
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/components/ScrollReveal.tsx (1)
16-20: ⚡ Quick winESLint false positive—suppress with an explanatory comment.
The ESLint warning about synchronous
setStatein an effect is a false positive here. Checkingprefers-reduced-motion(an external browser API) and syncing React state is a valid useEffect use case. Because this is a Next.js client component that pre-renders on the server, you cannot move the check touseState(() => ...)lazy initialization (window is unavailable during SSR).🔇 Suppress the warning with an inline comment
useEffect(() => { if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) { + // eslint-disable-next-line react-hooks/set-state-in-effect -- syncing external media query state on mount; alternative (lazy useState init) breaks SSR setVisible(true); return; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/components/ScrollReveal.tsx` around lines 16 - 20, The ESLint warning about setting state synchronously inside the useEffect in the ScrollReveal component is a false positive; suppress it by adding an inline ESLint disable comment immediately above the line that calls setVisible(true) (the useEffect block that checks window.matchMedia("(prefers-reduced-motion: reduce)").matches), and include a brief explanatory comment that this check runs only on the client (window unavailable during SSR) so the state update is intentional and safe; ensure the comment references the rule being disabled (e.g., the react/no-did-mount-set-state or similar) and mentions Next.js client-only behavior to document why suppression is needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@app/components/ScrollReveal.tsx`:
- Around line 16-20: The ESLint warning about setting state synchronously inside
the useEffect in the ScrollReveal component is a false positive; suppress it by
adding an inline ESLint disable comment immediately above the line that calls
setVisible(true) (the useEffect block that checks
window.matchMedia("(prefers-reduced-motion: reduce)").matches), and include a
brief explanatory comment that this check runs only on the client (window
unavailable during SSR) so the state update is intentional and safe; ensure the
comment references the rule being disabled (e.g., the
react/no-did-mount-set-state or similar) and mentions Next.js client-only
behavior to document why suppression is needed.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 395ba3bb-7a00-4a7d-bf5e-d39ea26e1d15
📒 Files selected for processing (2)
app/components/ScrollReveal.tsxapp/page.tsx
|
hii @vishnukothakapu i’ve raised this pr under gssoc’26. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
hi @PRODHOSH. pls resolve conflicts |
|
hey @PRODHOSH pls resolve conflicts |
|
resolved all the merge conflicts @vedhapprakashni |

🏢 organization
📋 summary
add a small scroll reveal wrapper and use it on each home section so they fade in on scroll
🔗 related issue
closes #142
🔄 type of change
✅ checklist
code quality
mainnpm run lintpasses with no errorsnpm run buildcompletes successfullyconsole.logstatements left in the codechanges
documentation
Summary by CodeRabbit