Skip to content

Ensure left bar trigger and collapsed state stay in sync #16748

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 1 commit into
base: 3.x
Choose a base branch
from

Conversation

smg6511
Copy link
Collaborator

@smg6511 smg6511 commented May 24, 2025

What does it do?

Note that this is an alternative to #16741 that addresses a couple other nuances. Like @rtripault did, I moved the add/remove class logic for the trigger elsewhere (but into the upper collapse/expand blocks for the west region). Alterations were also made to the toggleLeftBar method.

Why is it needed?

As the original PR stated, the trigger state was not changing when toggleLeftBar was called; this method is exclusively used for the keyboard shortcut (which is ctrl-shift-h). A couple other things get resolved with this alternate solution:

  1. The initial internal state is correct now. Before, the first time you trigger toggleLeftBar nothing happens (or the wrong thing happens); this issue was already present before (not caused by the referenced PR).
  2. There were issues when using the shortcut (triggering toggleLeftBar), then actually clicking the trigger icon (or vice versa). This PR ensures the correct state and behavior no matter how you open/close the left bar.

How to test

Open and close the left bar by using both the trigger (arrow icon) and using the keyboard shortcut (ctrl-shift-h), in various combinations. Additionally navigate around a bit to verify the correct state is carried through from page to page.

Related issue(s)/PR(s)

None, as mentioned this is an alternate to #16741.

Fix left bar visibility behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant