Back to top button added#481
Conversation
✅ Deploy Preview for github-spy ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughA new ChangesBack-to-Top Button Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Suggested labels
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.
🎉 Thank you @Souradeep858 for your contribution. Please make sure your PR follows https://github.com/GitMetricsLab/github_tracker/blob/main/CONTRIBUTING.md#-pull-request-guidelines
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@src/components/Backtotop.tsx`:
- Around line 7-21: The visibility toggle only runs on scroll events, so if the
page mounts at a scrolled position the BackToTop button may remain hidden;
inside the useEffect that defines toggleVisibility (the function that calls
setIsVisible based on window.scrollY), call toggleVisibility() once immediately
after adding the scroll listener (or before) so the initial visibility state is
initialized on mount, keeping the existing window.addEventListener("scroll",
toggleVisibility) and cleanup removeEventListener intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f8ffd84f-404c-403f-ac9e-23df8f47c535
📒 Files selected for processing (4)
src/components/Backtotop.tsxsrc/pages/Contributors/Contributors.tsxsrc/pages/Home/Home.tsxsrc/pages/Tracker/Tracker.tsx
|
@mehul-m-prajapati sir it's done , you can check |
|
@mehul-m-prajapati sir it would be better if you look at the pr and review it. |
|
🎉🎉 Thank you for your contribution! Your PR #481 has been merged! 🎉🎉 |
Related Issue
#478
Description
Added a reusable Back to Top button component using React TypeScript and Tailwind CSS.
The button appears after scrolling down the page and smoothly scrolls the user back to the top when clicked.
Features added:
Smooth scroll-to-top functionality
Responsive fixed positioning
Green themed UI styling
Lucide React arrow icon integration
Integrated component into the Home page
How Has This Been Tested?
Verified button visibility after scrolling down
Tested smooth scrolling functionality on click
Checked responsiveness on different screen sizes
Confirmed proper rendering with existing page layout
Screenshots (if applicable)
Type of Change
Summary by CodeRabbit