lovasoa / SQLpage

SQL-only webapp builder, empowering data analysts to build websites and applications quickly
https://sql.ophir.dev
MIT License
880 stars 62 forks source link

Add "Go to Top" Button Component #457

Open amrutadotorg opened 1 week ago

amrutadotorg commented 1 week ago

Hello,

It would be incredibly helpful to have a "Go to Top" button integrated into the SQLPage. Given the extensive reading involved in my use case, such a feature would significantly enhance user experience by allowing users to quickly navigate back to the top of the page.

The button should be clearly visible but not intrusive. It could be similar to the example from the Tabler.io website, as shown in the attached screenshot. Screenshot 2024-06-24 at 19 48 02

lovasoa commented 6 days ago

Maybe we could add a "position" attribute to the button component that could be set to inline (the default) or "(top|bottom) (right|left)" ?

And for scrolling to the top, we would just make a button that targets #sqlpage_header.

Pull request welcome !

amrutadotorg commented 4 days ago

I’m not sure if a standard button is sufficient. The concept of a ‘go to the top’ button is more complex. It remains hidden even if you scroll down slightly, only appearing when it’s truly needed.