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

BACK TO TOP appears as soon as the UI scrolls 1px #10

Closed
blackfalcon opened this issue Aug 3, 2023 · 2 comments · Fixed by #8
Closed

BACK TO TOP appears as soon as the UI scrolls 1px #10

blackfalcon opened this issue Aug 3, 2023 · 2 comments · Fixed by #8
Assignees

Comments

@blackfalcon
Copy link
Member

blackfalcon commented Aug 3, 2023

Is your feature request related to a problem? Please describe.

The code you have displays the BACK TO TOP button as soon as the UI scrolls 1px. Is that desired? Typically you see a button like this appear when the user scrolls part way down the page.

We could set a higher value on line 115 and then set lastKnownScrollPostion to LESS THAN topOfPageYPos.

Or.. we could calculate the total height of the page and then use a percentage of the page to set when the button appears. There is a great example on CSS-Tricks https://css-tricks.com/how-i-put-the-scroll-percentage-in-the-browser-title-bar/

Originally posted by @blackfalcon in #8 (comment)

Describe the solution you'd like

I'd like to review the current assessment of the scrolling feature and understand its decision and discuss why this is different from what is commonly used across the internet.

Exit criteria

Review and discuss options. Create new issues if needed for code/design updates

@blackfalcon blackfalcon changed the title The code you have displays the BACK TO TOP button as soon as the UI scrolls 1px. Is that desired? Typically you see a button like this appear when the user scrolls part way down the page. BACK TO TOP appears as soon as the UI scrolls 1px Aug 7, 2023
@blackfalcon blackfalcon linked a pull request Aug 8, 2023 that will close this issue
6 tasks
@blackfalcon
Copy link
Member Author

Meeting with @leeejune and she has agreed to review the demo more closely and make recommendations post that review of this work in progress.

@jason-capsule42
Copy link
Member

Per review with @leeejune the scroll position for when to show the button will be changed to 400px.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants