prevent scroll-to-top button from shifting near footer#6101
Conversation
|
@JaivPatel07 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
📦 Next.js Bundle Size Report (Gzipped Sizes)✨ No significant bundle size changes detected. 📊 Summary of Totals
|
Aamod-Dev
left a comment
There was a problem hiding this comment.
Review Summary
Labels applied:
- level:beginner — Straightforward one-variable removal fix in components/ReturnToTop.tsx:31-45. Removes �tBottom state, the setAtBottom call, and the dynamic �ottom-6/�ottom-24 conditional class. Minimal cognitive complexity.
- quality:clean — The core fix in ReturnToTop.tsx is cleanly scoped — removes exactly the code causing the footer-shift bug without touching anything else. The package-lock.json changes are noisy (from peer: true removals during the
ext upgrade), but the source change is surgically precise. - type:bug — Fixes a UI jump where the scroll-to-top button shifted downward when the footer entered the viewport.
Mentor: Aamod007
Assessment: Clean bug fix. The root cause was straightforward — the button position was dynamically switching between �ottom-6 and �ottom-24 based on footer proximity, and removing the conditional always keeps it fixed at �ottom-24.
One minor note: the PR title doesn't follow the conventional commit format (ix: ...), but the commit message itself may be fine. The package-lock.json noise is an unavoidable side effect of the
ext version bump, though ideally dependency bumps would be in a separate PR to keep diffs cleaner.
Approved! 🚀
|
🎉 Congratulations @JaivPatel07! Your PR has been successfully merged. 🚀 Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.
Keep building! 💻✨ |
Description
Fixes #6098
Changes Made
Pillar
Visual Preview
Before
The scroll-to-top button shifted downward when the footer entered the viewport, causing a noticeable UI jump.
After
The scroll-to-top button remains fixed in its intended position throughout scrolling, including when the footer is visible.
Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.