Skip to content

Conversation

@Coding-Alchemist-Abhijay

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

Description

This PR introduces a Scroll-to-Top button that enhances user navigation on pages with extensive content. The button appears once the user scrolls beyond a defined threshold and allows users to return to the top with a smooth scrolling effect.
It closes Issue - #1279


Why This Is Useful

  • Improves navigation on long pages
  • Enhances overall user experience and accessibility
  • Reduces the need for manual scrolling

Implementation Details

  • Button becomes visible after the user scrolls past a specific vertical offset
  • Smooth scrolling behavior added for seamless user experience
  • Positioned unobtrusively at the bottom-left corner
  • Styled to blend with the existing UI

Testing

  • Verified the button appears and disappears based on scroll depth
  • Confirmed smooth scroll-to-top functionality
  • Checked responsiveness across multiple screen sizes and devices

Preview (video)

Recording.2025-11-20.010825.1.1.mp4

Copy link
Contributor

Choose a reason for hiding this comment

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

why was this part added?

Choose a reason for hiding this comment

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

Hi, thank you for reviewing my PR @choo121600 .

I accidentally added that extra data while trying to debug an issue on my local environment. My CSS files weren’t loading because there was a space in the directory path on my device, so I temporarily modified that file while troubleshooting. After moving the project out of that path, everything worked — but I mistakenly forgot to revert those changes before pushing the PR.

I apologize for the confusion. I’m still new to open-source contributions and learning the proper workflow. I will make the corresponding changes to this existing PR.

Thank you for your patience and guidance.

@choo121600
Copy link
Contributor

It seems to be inconsistent with the design of the ‘Suggest a change on this page’ button. (backgroud color, shadow)

Comment on lines 67 to 70
<!-- Scroll to Top Button -->
<button id="scroll-to-top" class="scroll-to-top" aria-label="Scroll to top">
<span class="scroll-to-top__arrow"></span>
</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 think it’s strange for this code to be placed below the footer. Couldn’t we implement it in the same way as the ‘Suggest a change on this page’ button?

Choose a reason for hiding this comment

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

Hi, thank you for the suggestions @choo121600 .

I will implement the changes as mentioned by you , according to the “Suggest a Change on This Page” Issue . I’ll make sure to match the background color, button color, shadow, and hover animations exactly as shown there. I will also restructure my files so that the layout follows the same pattern as the 'Suggest a change on this page' button.

I just need a little more time to make these adjustments properly, and I’ll update the PR soon.

Thank you for your guidance and patience.

Copy link
Member

Choose a reason for hiding this comment

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

Nice. Looking forward

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

3 participants