Skip to content

Sidebar status is not correctly preserved between page changes, and other small sidebar improvements #2665

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
njor opened this issue Apr 15, 2025 · 0 comments · May be fixed by #2666
Open
Labels
C-bug Category: A bug, incorrect or unintended behavior

Comments

@njor
Copy link

njor commented Apr 15, 2025

Problem

Hello, there is a small bug, and some possible improvements of the sidebar:

  1. there is a bug where the visibility of the sidebar is not correctly kept between page changes/navigation, when the browser window was smaller than 1080 pixels wide (even if you explicitly clicked to show the sidebar, if you refresh or change page, it will disappear again)
  2. the sidebar width could be saved as well as its visibility status
  3. the sidebar “configuration” could be saved in sessionStorage instead or localStorage. Rationale: if you open multiple browser windows that have different sizes, you may want different configurations for the sidebar for each window.
  4. when the page is first opened, the sidebar is either shown or hidden (by default) depending on the browser window’s width, but if you don’t interact with the sidebar visibility button, this default will not be stored anywhere, so if the user resizes the window then refreshes the page, the sidebar might unexpectedly disappear.

These all are minor issues, but annoying, and they can be fixed/improved relatively easily.

I actually worked on a fix for all that (I started working on it before I read the contributing guidelines and its warning to not work on a pull request before submitting an issue, sorry 😔 so I decided to finish), so I’ll still link a PR just in case.

Steps

  1. open a window smaller than 1080 pixels horizontally
  2. click the “Toggle table of contents” button to show the sidebar
  3. hit F5 to refresh the page
  4. the sidebar has disappeared again

Possible Solution(s)

No response

Notes

No response

Version

v0.4.48
@njor njor added the C-bug Category: A bug, incorrect or unintended behavior label Apr 15, 2025
@njor njor linked a pull request Apr 15, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: A bug, incorrect or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant