website icon indicating copy to clipboard operation
website copied to clipboard

Scroll back up button

Open Ainali opened this issue 1 year ago • 10 comments

The feature

As some of our pages are really long, especially country pages, it would be nice with a button that brings you back to the top on those.

Why?

It could save time and also increase accessibility somewhat. Also, implemented right it looks kind of cool.

Examples and inspiration

I stumbled upon this neat and dynamic solution using only CSS:

  • https://codepen.io/chriscoyier/pen/NWmzZXo

It shows the button only after have started scrolling down a bit. For us, it could be when you have scrolled past the country info box.

Ainali avatar Apr 16 '24 06:04 Ainali

I'm interested in adding this work to your website, I'm open to be assigned the case and I would be happy to solve it.

MarcosApodaca avatar May 04 '24 23:05 MarcosApodaca

I'm interested in adding this work to your website, I'm open to be assigned the case and I would be happy to solve it.

@MarcosApodaca: There is already a PR for this issue (linked just above your comment). Your review on that one is welcome.

Ainali avatar May 05 '24 08:05 Ainali

I saw it, but in the web it is not implemented yet, enter in the section of countries, and when you scroll the names, the scroll does not appear to take you to the top of the page.

MarcosApodaca avatar May 05 '24 13:05 MarcosApodaca

but in the web it is not implemented yet

@MarcosApodaca Because the PR has not yet been merged with the main branch....

RVA2869 avatar May 05 '24 13:05 RVA2869

@MarcosApodaca As RVA2869 said, it hasn't been merged yet. Which means that this is a great opportunity for you to set up your local environment, and switch to that branch and see if it works locally for you. That will give you a flying start for another issue too.

Ainali avatar May 05 '24 13:05 Ainali

As someone who runs desktop Firefox on my phone, is this for other mobile browsers which do not have this builtin nowadays?

Abbe98 avatar May 21 '24 19:05 Abbe98

As someone who runs desktop Firefox on my phone, is this for other mobile browsers which do not have this builtin nowadays?

I was mostly thinking about this as a desktop feature.

But now that I tried it on Firefox on my phone, I don't see anything like this. Is it not enabled by default?

Ainali avatar May 21 '24 19:05 Ainali

But now that I tried it on Firefox on my phone, I don't see anything like this. Is it not enabled by default?

I'm not sure about Android and iOS browsers. Edit, on iOS you just press the statusbar.

On desktop I think "all" browsers support pressing <home>, and in many you can just click the active tab.

Abbe98 avatar May 22 '24 07:05 Abbe98

On desktop I think "all" browsers support pressing <home>, and in many you can just click the active tab.

Clicking the active tab does nothing on Firefox or Chrome on desktop for me. The home button works, but is a two-hand combination on my laptop keyboard (need to be combined with Fn (function)), so I need to let go of the mouse to use it.

Ainali avatar May 24 '24 13:05 Ainali

I'm convinced, on Android does accelerated scroll work and if so should we hide it on mobile?

Abbe98 avatar May 25 '24 19:05 Abbe98