Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plain JS scroll up button #66

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

ev-sc
Copy link
Member

@ev-sc ev-sc commented Feb 7, 2023

Fixes STW-28

Simple plain JS solution for this request

  • Fades in an arrow icon button when a page extends beyond 2x the height of the viewport
  • Scrolls to the top of the page on click and fades out

Screencast from 2023-02-07 19-27-20

@ev-sc ev-sc requested a review from conatus February 7, 2023 18:21
@linear
Copy link

linear bot commented Feb 7, 2023

STW-29 Infinite repetition of items on scroll, on several pages

The Advice page demonstrates this most clearly, as there are only a couple of items on the page:

https://www.stop-watch.org/what-we-do/advice/

Also happens on the RAW Project

https://www.stop-watch.org/what-we-do/projects/raw/2022-schedule/

And the Research page

https://www.stop-watch.org/what-we-do/research/

and potentially others, but hard to tell on pages with lots of items to scroll through.

72424820-6a0b-434a-98c7-97e104b8b3b4

STW-28 add a 'return to top of page' icon on all pages

by extension, we don't have a 'return to top of page' icon that web users can click on (like this, compatible with the stopwatch look: https://www.dreamstime.com/scroll-up-page-symbol-blue-vector-icon-arrow-to-top-back-classic-flat-image141999140). it'd be great to have one appear at the bottom right hand side of a page as a web user who has scrolled down a webpage beyond the fold.

Originally posted by @HabKadSW in https://github.com/commonknowledge/stopwatch/issues/35#issuecomment-1237077434

Copy link
Member

@conatus conatus left a comment

Choose a reason for hiding this comment

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

Gets it done with the minimum of fuss.

@ev-sc ev-sc merged commit 20b32de into main Feb 7, 2023
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.

2 participants