discuitnet / discuit

A free and open-source community discussion platform.
https://discuit.net
GNU Affero General Public License v3.0
384 stars 40 forks source link

[Feature] Implement Scroll-to-Top Button for Enhanced User Navigation #81

Open pizofreude opened 1 month ago

pizofreude commented 1 month ago

Feature Description

I would like to suggest the addition of a scroll-to-top button on the Discuit.net platform. This feature would be a floating button that appears when the user scrolls down a page and, upon clicking, smoothly scrolls the user back to the top. It would be particularly useful for long threads or articles, enhancing the user experience by providing quick navigation. Even Reddit lacks this feature, thus making it a differentiator for Discuit.

Benefits

Technical Consideration

Given Discuit.net's tech stack with Go and React, this feature can be implemented as a React component that uses state hooks to show or hide based on the scroll position. The backend would not require changes as this is a client-side feature.

Suggested Implementation

A React component (ScrollToTopButton.js) can be created to manage the visibility and action of the button. The button can be styled using CSS to fit the design language of Discuit.net and can be made to appear after the user scrolls past a certain point (e.g., 200px from the top).

Additional Context

This feature is common in modern web applications and is expected by many users. It improves the overall usability of the platform and can contribute to a more polished and user-friendly interface.

Thank you for considering this feature request. I believe it would make a great addition to Discuit.net and enhance the browsing experience for all users.

monu-simon commented 1 month ago

Can i pick this feature ?