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

[Feature Proposal] Expand only active sidebar group #4211

Open
4 tasks done
davestewart opened this issue Sep 17, 2024 · 0 comments
Open
4 tasks done

[Feature Proposal] Expand only active sidebar group #4211

davestewart opened this issue Sep 17, 2024 · 0 comments
Labels

Comments

@davestewart
Copy link

davestewart commented Sep 17, 2024

Is your feature request related to a problem? Please describe.

I've added an app level enhancement to my docs site which ensures only the active sidebar group is open when navigating through the site:

The iles framework has the same functionality.

It's pretty nice when you have long sections that would cause the menu to get overly-long and start scrolling.

Describe the solution you'd like

If you click a sidebar group header, or navigate to a page, the active sidebar group would open, and the others would close.

If you click a sidebar group toggle, the group would open / close, without affecting other groups.

The developer would opt-in to this functionality in themeConfig.sidebar.

Describe alternatives you've considered

I've used enhanceApp(), a router handler, and some custom code to achieve this on my own site.

Additional context

Happy to look at PRing this.

It seems that the sidebar composable is the place to start digging around.

Validations

@davestewart davestewart changed the title Expand sidebar navigation to the current section only, when navigating Flag to expand only active sidebar group Sep 17, 2024
@davestewart davestewart changed the title Flag to expand only active sidebar group [Feature Proposal] Flag to expand only active sidebar group Sep 17, 2024
@davestewart davestewart changed the title [Feature Proposal] Flag to expand only active sidebar group [Feature Proposal] Expand only active sidebar group Sep 17, 2024
@github-actions github-actions bot added the stale label Oct 26, 2024
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

1 participant