Skip to content
This repository was archived by the owner on Jan 25, 2021. It is now read-only.

Comments

adds ability to have scrollable back to top#168

Closed
N6REJ wants to merge 14 commits intojoomla:developmentfrom
N6REJ:scrolltotop
Closed

adds ability to have scrollable back to top#168
N6REJ wants to merge 14 commits intojoomla:developmentfrom
N6REJ:scrolltotop

Conversation

@N6REJ
Copy link
Contributor

@N6REJ N6REJ commented Oct 3, 2020

Pull Request for Issue # .

Summary of Changes

Adds ability for "smart" back to top where...

  1. back to top = on & scroll = off : button is in footer within container.
  2. back to top = off & scroll ( doesn't matter ) : no button displayed
  3. back to top = on & scroll = on : button moved out of container and scrolls with viewport.
    button is hidden until content is scrolled.

Testing Instructions

check that backtotop button works in footer and turns on/off
load pr
run npm ci
check that button states are as listed above.

Expected result

backend
image

desktop
image

iphone11
image

note8
![image](https://user-images.githubusercontent.com/1850089/94995659-49a02580-0565-11eb-8b15-000bed189603.jpg

Actual result

image
image

Documentation Changes Required

none

@brianteeman
Copy link
Contributor

what is the difference between back to top and scroll to top?

@N6REJ
Copy link
Contributor Author

N6REJ commented Oct 3, 2020

guess I should include backend screen shot... back to top is stuck in footer

@brianteeman
Copy link
Contributor

I meant what is the difference so that we need two

@N6REJ
Copy link
Contributor Author

N6REJ commented Oct 3, 2020

if they choose back-to-top its a sticky that is ONLY in the footer container. Never leaves footer.
if they choose "scroll" then it scrolls with page and is not part of the footer itself.

@brianteeman
Copy link
Contributor

Thank you for the explanation - my 2c I would only offer one

@N6REJ
Copy link
Contributor Author

N6REJ commented Oct 3, 2020

Thank you for the explanation - my 2c I would only offer one

I agree but having a back-to-top that doesn't stay in the viewport is very non traditional and what they wanted as default state.

@N6REJ
Copy link
Contributor Author

N6REJ commented Oct 3, 2020

I wish I could hide when above the fold but w/o javascript thats not possible afaik

@brianteeman
Copy link
Contributor

You can do it with just css https://moderncss.dev/pure-css-smooth-scroll-back-to-top/

@richard67
Copy link
Member

Thank you for the explanation - my 2c I would only offer one

100% agree. It makes no sense to have both of them, and it may even confuse the user.

N6REJ and others added 7 commits October 4, 2020 05:35
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
@brianteeman
Copy link
Contributor

brianteeman commented Oct 4, 2020

please fix the code style issues with the last commit

image

@N6REJ
Copy link
Contributor Author

N6REJ commented Oct 4, 2020

@brianteeman @richard67 thanks guys, idk how that stuff slipped past me.

@hans2103
Copy link
Collaborator

hans2103 commented Oct 5, 2020

@N6REJ
Back-to-top Link = YES
Scroll-to-top = YES

When I scroll to the bottom of the page I see the following styling:

Schermafbeelding 2020-10-05 om 17 00 49

@hans2103
Copy link
Collaborator

hans2103 commented Oct 5, 2020

@N6REJ I've tried to create a PR on yours, but failed. Therefor I have created a new PR #169

@N6REJ
Copy link
Contributor Author

N6REJ commented Oct 5, 2020

@hans2103 I'll just let you run with it then... You've changed it quite a bit.

@N6REJ N6REJ closed this Oct 5, 2020
drmenzelit added a commit that referenced this pull request Oct 7, 2020
…totop

move backToTop outside of footer and apply styling
@N6REJ N6REJ deleted the scrolltotop branch October 12, 2020 21:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants