feat(ui): sidebar toggles in the Ribbon, keyboard chords, and drag-to-hide - #78
Merged
Merged
Conversation
…-hide Hiding or restoring a sidebar required the View menu; nothing on the always-visible chrome showed the current layout or offered a fast path. The Ribbon task row gains an always-visible toggle pair whose glyphs mirror the window layout — the side band fills while that sidebar is shown, so the buttons double as a live layout indicator. Cmd+B / Cmd+Shift+B (the VS Code convention) bind the existing TogglePrimarySidebar / ToggleSecondarySidebar commands as the fast path. Dragging a sidebar's resize edge well past its minimum width (a 60 px slack so overshooting a fast resize does not hide it by accident) also hides it, and the status bar names the command that brings it back. Hidden panels burn one egui auto-id slot and the central workspace renders inside a globally salted scope, so sibling container ids do not shift when a sidebar toggles — widget state (scroll positions, collapses) survives layout changes. The shortcut reference, UI overview, and quick tour document the new surfaces (EN + zh-CN).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hiding or restoring a sidebar required the View menu; nothing on the always-visible chrome showed the current layout or offered a fast path.
The Ribbon task row gains an always-visible toggle pair whose glyphs mirror the window layout — the side band fills while that sidebar is shown, so the buttons double as a live layout indicator. Cmd+B / Cmd+Shift+B (the VS Code convention) bind the existing
TogglePrimarySidebar/ToggleSecondarySidebarcommands as the fast path. Dragging a sidebar's resize edge well past its minimum width (a 60 px slack, so overshooting a fast resize does not hide it by accident) also hides it, and the status bar names the command that brings it back.Hidden panels burn one egui auto-id slot and the central workspace renders inside a globally salted scope, so sibling container ids do not shift when a sidebar toggles — widget state (scroll positions, collapses) survives layout changes.
Validation
cargo pr-checkpasses on currentmain(fmt, source sizes, dependency policy, default-frontends build, clippy-D warnings, reference-backend test suite).npm run buildindocs/passes.UI display logic
CommandId+describe) and are searchable in the command palette. (Reuses the registeredTogglePrimarySidebar/ToggleSecondarySidebarcommands; the chords and Ribbon buttons are new bindings/surfaces for them.)disabled_reasonthat says how to unblock. (The toggle pair is always visible; its width is budgeted in the task-row compaction estimate.)docs/(English and zh-CN) for user-visible behavior. (Shortcut reference, UI overview, and quick tour in both languages.)