Skip to content

feat: add floating scroll-to-top button#153

Open
Shri-Ananth wants to merge 1 commit into
suresh1319:masterfrom
Shri-Ananth:feat/scroll-to-top-button
Open

feat: add floating scroll-to-top button#153
Shri-Ananth wants to merge 1 commit into
suresh1319:masterfrom
Shri-Ananth:feat/scroll-to-top-button

Conversation

@Shri-Ananth
Copy link
Copy Markdown

Description

What does this PR do?

This PR introduces a reusable Scroll-to-Top button that improves navigation on long pages by allowing users to quickly return to the top with a single click.

Changes Made

  • Added a reusable ScrollToTopButton component.
  • Button becomes visible only after the user scrolls beyond a defined threshold.
  • Implemented smooth scrolling back to the top.
  • Added support for both light and dark themes using existing CSS variables.
  • Included hover animations and transition effects for better user experience.
  • Positioned the button at the bottom-right corner without affecting existing layouts.
  • Used Lucide React's ArrowUp icon for visual consistency.

Benefits

  • Improves navigation and accessibility on long pages.
  • Keeps the interface clean by showing the button only when needed.
  • Provides a consistent experience across different themes.
  • Enhances overall user experience with smooth interactions.

###Screenshots

Light mode
image

Dark mode
image

Testing

  • Button appears after scrolling down.
  • Button hides when near the top of the page.
  • Smooth scroll-to-top functionality works correctly.
  • Verified in light mode.
  • Verified in dark mode.
  • Responsive positioning tested.

Closes #146

@entelligence-ai-pr-reviews
Copy link
Copy Markdown
Contributor


Confidence Score: 5/5 - Safe to Merge

Safe to merge — this PR introduces a floating scroll-to-top button feature with no identified issues across all three changed files. The implementation appears clean, with no logic bugs, missing validations, security concerns, or runtime risks surfaced during review. All changed files were covered in the analysis and returned no flagged patterns.

Key Findings:

  • All 3 changed files were reviewed and no substantive issues were identified — no null-safety gaps, event listener leaks, or accessibility oversights were flagged in the scroll-to-top button implementation.
  • No pre-existing unresolved comments exist in this PR, and no new review comments were generated, indicating the implementation is consistent with codebase standards.
  • The feature scope (a floating UI button with scroll behavior) is low-risk and self-contained, with no interaction with authentication, data persistence, or critical application state.

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.

UI/UX [Enhancement]: Add Scroll-to-Top Button for Improved Navigation

1 participant