Skip to content

Conversation

@kriSH-cD
Copy link

@kriSH-cD kriSH-cD commented Nov 25, 2025

Feature: Add Scroll-to-Top Button (Fixes #1279)
Description

This PR introduces a Scroll-to-Top button to improve page navigation on long content pages.
The button becomes visible once the user scrolls past a certain point and allows them to return to the top smoothly with a single click.

Why This Is Useful

Enhances user experience and accessibility

Reduces manual scrolling effort

Improves navigation especially on long or content-heavy pages

Implementation Details

Button remains hidden initially and appears after scrolling beyond a defined threshold

Smooth scrolling animation added for seamless experience

Positioned unobtrusively at the bottom-right corner

Styled to match the existing UI theme

Testing

Verified that button visibility toggles correctly on scroll

Confirmed smooth scroll behavior on click

Tested responsiveness across different screen sizes and devices

Checked compatibility across major browsers

Preview (video)
https://github.com/user-attachments/assets/d247f22f-f72e-4e10-8118-cb79df0397f8

Here is the video of button working.

@choo121600
Copy link
Contributor

The preview video was attached incorrectly.
Please update it with the correct preview.

Comment on lines 26 to 29

<!-- Scroll to Top Button -->
<button id="scrollToTopBtn"></button>

Copy link
Contributor

Choose a reason for hiding this comment

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

I don’t think this code should be added here.

Copy link
Author

Choose a reason for hiding this comment

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

Okay , can i add new section for this button ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I think it would be best to implement it in a way similar to "Suggest a change on this page" button.

Copy link
Author

Choose a reason for hiding this comment

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

Hey @choo121600 i have added new section for the button . please review it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the scrollToTop button belongs in landing-pages/site/layouts/partials/suggest-change.html.
since they serve different functions.

@kriSH-cD kriSH-cD requested a review from choo121600 November 25, 2025 10:19
Copy link
Contributor

@choo121600 choo121600 left a comment

Choose a reason for hiding this comment

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

There are still unnecessary changes(License, .. etc)
And please follow the design consistency.

Comment on lines 26 to 29

<!-- Scroll to Top Button -->
<button id="scrollToTopBtn"></button>

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the scrollToTop button belongs in landing-pages/site/layouts/partials/suggest-change.html.
since they serve different functions.

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.

Add Scroll-to-Top Button

2 participants