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

Persist sidebar state (categories expanded state, hidden sidebar) #6319

Open
1 of 2 tasks
Josh-Cena opened this issue Jan 12, 2022 · 2 comments
Open
1 of 2 tasks

Persist sidebar state (categories expanded state, hidden sidebar) #6319

Josh-Cena opened this issue Jan 12, 2022 · 2 comments
Labels
domain: theme Related to the default theme components feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.

Comments

@Josh-Cena
Copy link
Collaborator

Have you read the Contributing Guidelines on issues?

Description

It would be useful to persist sidebar state like which categories are collapsed and if the sidebar is hidden or not in local storage (or session storage?), so that the user's navigation experience is not interrupted by, say, going to the blog briefly.

Has this been requested on Canny?

No

Motivation

Better UX

API design

Persist state in local storage / session storage and retrieve on sidebar first render. After #3811 we probably have a better way to control the collapsed state of individual categories.

Have you tried building it?

No

Self-service

  • I'd be willing to contribute this feature to Docusaurus myself.
@Josh-Cena Josh-Cena added feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. status: needs triage This issue has not been triaged by maintainers and removed status: needs triage This issue has not been triaged by maintainers labels Jan 12, 2022
@Josh-Cena Josh-Cena changed the title Persist sidebar state (categories, hidden) Persist sidebar state (categories expanded state, hidden sidebar) Jan 12, 2022
@Josh-Cena Josh-Cena added the domain: theme Related to the default theme components label Mar 29, 2022
@erikvanoosten
Copy link

On https://zio.dev/ecosystem/ the left-side navigation is pretty large. It would be nice if it automatically scrolls to the active page at load time. Is that part of this issue?

@Josh-Cena
Copy link
Collaborator Author

@erikvanoosten No, but unfortunately we had troubles with scroll-to-active features in the past: #6317, #6748, #6666 so it won't be soon that we introduce this feature to left sidebars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: theme Related to the default theme components feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Projects
None yet
Development

No branches or pull requests

2 participants