quarkusio.github.io icon indicating copy to clipboard operation
quarkusio.github.io copied to clipboard

Collapsible table of content for guides

Open metacosm opened this issue 2 years ago • 8 comments

Not really a bug, more like a feature request. It would be nice to have the ToC always available regardless of the spot in the page as it is annoying to have to scroll all the way back up when exploring sections of long guides. Ideally, the ToC would be collapsible so that it could be hidden when not needed.

metacosm avatar Mar 03 '22 09:03 metacosm

Similarly, it could be interesting to have the top menu always available as well.

metacosm avatar Mar 03 '22 09:03 metacosm

/cc @insectengine We should probably move the TOC to a menu button outside of the page content itself when scrolling down.

gsmet avatar Mar 03 '22 09:03 gsmet

Ideally, the ToC should be accessible from anywhere in the page just by clicking on a collapsed element on the side of the page (so only motion required would be to move the mouse to the edge of the window and click, without having to move up or down and/or have to hit a small target).

metacosm avatar Mar 03 '22 10:03 metacosm

I'll put some thought into this and try to sort out a workable solution.

Sticky navigation can be problematic if the contents get too long and render past the viewport. To defeat this, it would require the authors to organize the content into appropriate sections for some sort of accordion/collapsable structure.

One of the advantages of using a sticky TOC would be a way finding element so the user knows where they are at any given time. This is negated if the TOC is hidden (as suggested being out of they way via a button). Using such a button would mean that the TOC would cover readable content when being used. Then this brings up another issue is what's visible by default when a user hits the page? Is the TOC open and covers the content or is it closed and the user may miss it being there and doesn't see the full scope of the doc.

I believe this is why many choose to do a side bar navigation like IBM uses: https://cloud.ibm.com/docs/cloud-infrastructure

insectengine avatar Mar 04 '22 22:03 insectengine

Whatever works as long as the navigation is constantly available without having to scroll up and down to move between sections.

metacosm avatar May 19 '22 09:05 metacosm

Any update on this, it is really annoying to have to scroll up and down all the time to access the navigation…

metacosm avatar Sep 26 '23 12:09 metacosm

Thanks for surfacing this. I'll put it on my Q4 goals for completion.

insectengine avatar Oct 05 '23 20:10 insectengine

Created a draft PR addressing this issue: https://github.com/quarkusio/quarkusio.github.io/pull/1814

insectengine avatar Oct 12 '23 21:10 insectengine