quasar icon indicating copy to clipboard operation
quasar copied to clipboard

Back to Top directive

Open rstoenescu opened this issue 10 years ago • 7 comments

rstoenescu avatar Oct 07 '16 23:10 rstoenescu

Can you add little description, I guess you want to add back to top button to the website correct?

BhaveshSGupta avatar Oct 08 '16 07:10 BhaveshSGupta

I want this on all platforms, not just on desktop. Haven't figured out all the details, just opened this issue as a placeholder.

Main idea: this will be a component applied to the scrolling container using Quasar's v-scroll directive on a floating button action. When user scrolled more than one-two screens (height depends on scrolling container) then this button should pop out nicely with an animation. Indeed I haven't seen this behavior on mobile platforms, so it might be just for desktop after all. But it may support a prop to tell it to show on mobile too.

Haven't figured out all the rough edges anyways. Accepting (as always) proposals/discussion on this.

rstoenescu avatar Oct 08 '16 11:10 rstoenescu

That's incredible :-) @rstoenescu Just seen now this Issue.

fsgiudice avatar Dec 27 '16 17:12 fsgiudice

@fsgiudice haha. I thought you knew! :) Will take care of the PR as soon as I can.

rstoenescu avatar Dec 28 '16 01:12 rstoenescu

Indeed I haven't seen this behavior on mobile platforms, so it might be just for desktop after all.

Facebook has something similar to this on mobile, when there are new notifications in a user's news feed. You see a "New stories" button (or something like it), which gives the users a feeling of scrolling up to the top and refreshing the page to get new stories, when it is pressed. The user only sees the button, when she starts to scroll back up the feed and after she has been on the feed for some time (looked at multiple pages). If she scrolls down again, the button goes away. The button is also shown at the top of the screen, and comes out from the top, as the user scrolls up.

Other than that, I haven't seen such a scroll to the top in mobile apps either.

Scott

smolinari avatar Dec 28 '16 05:12 smolinari

@rstoenescu and @smolinari one of articles I found: https://www.seroundtable.com/google-tests-basic-back-to-top-23061.html as mobile use. Another I saw, but opposite as back-to-bottom, is on whatsapp: when you go back throught messages in a chat, on right side appear a small grey fab to go back to last message. What I miss on popular apps (FB, Google search, ecc.) is a button to go on top without having to swipe down. As stated from @smolinari, the same effect is with "New stories" fab on top. But without an auto refresh you have to swipe or press some other buttons.

Francesco

fsgiudice avatar Dec 28 '16 18:12 fsgiudice

Went with a more efficient & as generic as possible approach. As a directive, it can be applied to ANY element, as long as that element is absolute or fixed positioned. Custom trigger scroll offset and animation duration can be set.

rstoenescu avatar Dec 30 '16 01:12 rstoenescu