Skip to content

Allow sections to be collapsed/expanded with a chevron-icon button #79

@PhilippMDoerner

Description

@PhilippMDoerner

The Feature Suggestion

Allow the entries in the sidebar to be "folded in" and "out".

Motivation for this feature

Take this sidebar:
image

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:
image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions