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

Chapters list: Make sticky, can potentially scroll independently #341

Closed
jasmussen opened this issue Nov 6, 2023 · 3 comments
Closed

Chapters list: Make sticky, can potentially scroll independently #341

jasmussen opened this issue Nov 6, 2023 · 3 comments
Labels
Milestone

Comments

@jasmussen
Copy link
Collaborator

Extracting from this comment, the chapters list, just like the Table of Contents, is a useful anchoring point and context for when you are reading a particular document. To that end, it would be useful to have it be sticky and scroll with you down the page, like so:

280230428-fb4a8568-849c-479b-845e-5442a875e16e

The main challenge in making this happen is to handle the case where the viewport is small, and a very long chapter list (perhaps made longer through multiple nodes being expanded) is too long for the viewport.

Instead of using JS to measure the height and then un-sticking the chapters list, another solution is to allow the chapters list to scroll independently. Potentially this could also be simpler from an implementation perspective; have the chapters list always span the full 100% available height of the viewport, and then apply scrollbars as needed. The comment here has a code snippet that could potentially help accomplish this in a light-weight way.

This is not urgent or a blocker for the refresh, but would be nice to have.

@jasmussen jasmussen added the [Type] Enhancement New feature or request label Nov 6, 2023
@jasmussen
Copy link
Collaborator Author

Addendum, in an earlier design, we had a bottom border below the search bar, like so:

maybe remove the border

This border, upon reflection, was actually a not needed, sorry about that, so we can go with this:

maybe

This is also relevant to #336 (comment) CC: @adamwoodnz

@fcoveram
Copy link

fcoveram commented Nov 6, 2023

Coming to reinforce Joen's comment.

@adamwoodnz
Copy link
Contributor

Done in #469

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants