You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow the entries in the sidebar to be "folded in" and "out".
Motivation for this feature
Take this sidebar:
This is likely to grow in the future, making visibility of points below "internals" (and future longer sections) difficult.
It would be nice if I could "fold in" entries of the sidebar so that it can look more like this:
I would suggest this provide the following features:
1. Expand/Collapse on click icon - button
Every section is not just a hyperlink. To the left or right of the section entry in the sidebar should be an icon-button that a user could click on to expand/collapse a section of entries. For a consistent design language, the icons used should likely be chevron icons to indicate that it is currently collapsed (chevron-up) or expanded (chevron down).
The button should highlight on hover separate from the section-hyperlink.
2. Automatically expand section when user is in an entry of that section
In this example: If I am on the page "Build Hook", I would expect the section "Internals" and "Hooks" to be expanded, but not "Adders"
3. Side-consideration: Remove sections having their own pages and make their sole purpose to expand/collapse sections
It may be worth considering maybe making sections no longer their own page but only buttons to expand/collapse sections of a sidebar. That would be a breaking change.
Alternatively, it could be considered to keep section as is and introduce a new grouping mechanism going by the name of group, that you just pass the name it should have on the sidebar and whether the group should be expanded/collapsed initially.
The text was updated successfully, but these errors were encountered:
I have not yet checked how it is implemented in the code (and when it was implemented, we might need to catch up on the templates). It would also be nice to see a real example on how this implementation looks like when it is active.
it appears it was implemented here in mdbook: rust-lang/mdBook#1027
since was before the moment nimibook was born, we might already have the feature hidden somewhere :)
anyway thanks for the input! I think it could be nice, not planning to work on this at the moment, but happy to help if someone wants to give it a try.
The Feature Suggestion
Allow the entries in the sidebar to be "folded in" and "out".
Motivation for this feature
Take this sidebar:
This is likely to grow in the future, making visibility of points below "internals" (and future longer sections) difficult.
It would be nice if I could "fold in" entries of the sidebar so that it can look more like this:
I would suggest this provide the following features:
1. Expand/Collapse on click icon - button
Every section is not just a hyperlink. To the left or right of the section entry in the sidebar should be an icon-button that a user could click on to expand/collapse a section of entries. For a consistent design language, the icons used should likely be chevron icons to indicate that it is currently collapsed (chevron-up) or expanded (chevron down).
The button should highlight on hover separate from the section-hyperlink.
2. Automatically expand section when user is in an entry of that section
In this example: If I am on the page "Build Hook", I would expect the section "Internals" and "Hooks" to be expanded, but not "Adders"
3. Side-consideration: Remove sections having their own pages and make their sole purpose to expand/collapse sections
It may be worth considering maybe making sections no longer their own page but only buttons to expand/collapse sections of a sidebar. That would be a breaking change.
Alternatively, it could be considered to keep section as is and introduce a new grouping mechanism going by the name of
group
, that you just pass the name it should have on the sidebar and whether the group should be expanded/collapsed initially.The text was updated successfully, but these errors were encountered: