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 a back to top button on docs page #16932
Comments
Hi @Tanujkanti4441, thanks for creating the issue. On the Desktop, we have a sticky table of contents on the right. So it's easy to scroll to the top with just one click. However, on Mobile, the table of contents is at the top only. So, users will have to scroll all the way up to the top. I don't have a strong opinion here. I would not be against adding a back-to-top button for mobile/tablets. I'd like to know what the @eslint/website-team thinks about this change. |
This sounds convincing enough for me if we want to implement it in the mobile/tablet view. But we might have to handle this in all pages across the documentation
|
We could also consider TOC sticky on mobile, but this may require some design tweaks. |
my regular screen size (1366px) doesn't have this sticky table i think this is only for above and equal to 1400px screen size. Is it same for you as well? |
Oh yes! I see it is available only for screen size >= 1400. In that case, we should improve this. |
I mean to keep it always on top, even after sliding. |
I got it. I just mean that even if we make the table of contents sticky, we have left an another navigation (for navigating to different pages of docs) that is also in the top. so for that navigation we also need to scroll up the screen if we are in the bottom of a page. and we can't make both TOC and navigation sticky. |
No objections if anyone wants to try this out. I would say that it should be consistent across all documentation pages, so if we have it as part of the headings that's fine so long as they're in the same spot for all headings. |
@nzakas would you please clear this part more. Is it just for the example's sake that how the solution should be or you indicating the TOC specifically. If it is not about sticky TOC can i try to implement a back-to-top arrow. |
My only point is that it should be consistent across all docs pages, that's all. I'll leave it to the @eslint/website-team to decide on specifics. |
I feel like sticky TOC can be a overkill for long pages. At this point a back to top button should suffice. |
I'm ok with back to top button approach. As harish mentioned sticky TOC can be overkill. |
It seems we are in agreement to add a back to top button. @Tanujkanti4441 Would you like to submit a PR for this? |
Yes |
Can we do the same in the eslint.org repo as well? Shall I re open this issue and transfer it? |
ESLint version
v8.34.0
What problem do you want to solve?
In all docs page the navigation links to the different topics of the page is on the top but some pages have too many material on it. so it is a tedious task to scroll to the top again in devices like tablet or phones. and for small screen size the main navigation of docs (navigation links for different pages of docs) is also on the top.
What do you think is the correct solution?
A back to top button would be a good idea to make the scrolling easy.
something like this.
Participation
Additional comments
No response
The text was updated successfully, but these errors were encountered: