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

Freeze left side table of contents on docs pages #324

Open
gcheadle-vmware opened this issue Jan 7, 2022 · 6 comments
Open

Freeze left side table of contents on docs pages #324

gcheadle-vmware opened this issue Jan 7, 2022 · 6 comments
Labels
enhancement This issue is a feature request

Comments

@gcheadle-vmware
Copy link
Contributor

Describe the problem/challenge you have
On some of the longer docs pages, such as the ytt openAPI schema doc, when I scroll down past the TOC, it and the search bar goes away and nothing is shown in the left hand column of the page. It can be tedious to have to scroll up to the top of the page to navigate to another page on the website.

Describe the solution you'd like
I would like the search bar and table of contents to be separate from the scrolling of the documentation being displayed. The corresponding page in the table of contents should be highlighted and in view.

@gcheadle-vmware gcheadle-vmware added enhancement This issue is a feature request carvel triage This issue has not yet been reviewed for validity labels Jan 7, 2022
@cari-lynn
Copy link
Contributor

This seems like the intent is to make things better for readers. Question:

  1. Would the sidebar scroll independently from the contents of the page? Say I were to scroll the contents of the page I'm reading to the end, would the sidebar not scroll and just not show the last few items in the list unless I hovered over it and scrolled it? (My laptop screen isn't able to list all the sidebar contents at once).

@cari-lynn cari-lynn removed the carvel triage This issue has not yet been reviewed for validity label Jan 25, 2022
@gcheadle-vmware
Copy link
Contributor Author

Would the sidebar scroll independently from the contents of the page?

I think this would have to be the case, maybe it would be good to auto-scroll the sidebar so that the page currently being viewed is also in view and highlighted in the table of contents.

@cari-lynn
Copy link
Contributor

I think independant scroll provides benefits to navigating docs and less scrolling to move to a new page. My one concern is that it would make some of the docs less discoverable.

For example, on my 16in laptop screen at 100% the table of contents shows 5 out of the 8 sections. If we have it scroll independently the other three sections won't be seen unless I hover over it and scroll on the table of contents. This also would have to be tabbed to independently to scroll if I am only using my keyboard.

There are ways we could mitigate this concern though, for example by making the scrollbar obvious.

@pivotaljohn
Copy link
Contributor

There are ways we could mitigate this concern though, for example by making the scrollbar obvious.

Yeah, great points: UX-focused thinking.

And it's absolutely do-able:

overflow: scroll;

ref: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow

@gcheadle-vmware
Copy link
Contributor Author

I found this example of Tekton, and I think it makes the scrollable contents obvious:
tekton screenshot

@joaopapereira
Copy link
Member

I tried it out in my machine and I am not 100% sure if it makes sense to have that type of scroll on the navigation if we do not make the header of the page also frozen.

Come bearing a gif
2022-01-28 10 23 16

In the previous gif I did constrain the navigation to a random height just to see what it would look like if we did not constrain the documentation itself.

Also was thinking that the footer would have to be moved only to the docs side unless we want the footer to always show up.

@aaronshurley aaronshurley moved this to To Triage in Carvel Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue is a feature request
Projects
None yet
Development

No branches or pull requests

4 participants