Skip to content

Sidebar improvements #2666

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

njor
Copy link

@njor njor commented Apr 15, 2025

Sidebar status is now moved to sessionStorage instead of localStorage.

Fix: sidebar visibility was not correctly loaded from storage when the browser window was smaller than 1080 pixels wide.

Sidebar width is now saved too.

Remove too large try-catch block that would hide some errors.

Resolves #2665

Jor added 5 commits April 15, 2025 12:30
Sidebar status is now moved to sessionStorage.

Fix: sidebar visibility was not correctly loaded from storage
when the browser window was smaller than 1080 pixels wide.

Sidebar width is now saved too.

Remove too large try-catch block that would hide some errors.
Fix: actually in the original code, only two entries were stripped of
their (potential) quotes: "mdbook-theme" and "mdbook-sidebar". Since
now we store sidebar config in sessionStorage, and it cannot contain
legacy values, only "mdbook-theme" needs to be stripped of its quotes,
and if getConfig() is meant to be used more generally, it must not
silently do that to *every* value it reads.
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sidebar status is not correctly preserved between page changes, and other small sidebar improvements
2 participants