Repository navigation
feat(ui): let the right sidebar widen and narrow to the room - #156
Merged
Merged
Conversation
The right sidebar had a fixed 560 px drag cap. It now grows until the center is 480 px wide, like bb's side panel: about 59% of a 1920 px window with the left sidebar open, 72% with it closed. main.right-width now takes 240 to 3840 (decision 272).
A wide saved right width used to hide the whole right sidebar when the left one opened or the window shrank. It is now drawn at the room left, down to its 240 px minimum, and keeps the saved width for when the room comes back. The left sidebar is a fixed panel, so dragging the right one wide no longer squashes it to 200 px. gpui-kit is re-pinned to kagan-sh/gpui-kit fix/resizable-ranges, which drops stale drawn widths when a panel is added or removed (decision 272).
Dragging the left sidebar beside a narrowed right one saved the narrowed width, so the right came back narrower when the room returned.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The right sidebar can now be dragged as wide as bb's side panel: it stops only where the center reaches its 480 px minimum, about 59% of a 1920 px window with the left sidebar open and 72% with it closed. The fixed 560 px cap is gone.
main.right-widthtakes 240 to 3840.A wide saved width no longer hides the right sidebar. When the window or an opened left sidebar leaves less room, the right sidebar is drawn at the room it has and keeps its saved width for when the room comes back. It hides only below 240 px of room.
fixedpanel, so dragging the right one wide no longer squashes it to 200 px.52a9c4db). That fork change stops a resize just after a panel is added from reading the new panel as 0 px wide. Re-pin to the merged commit if that PR is squash-merged.docs/behaviour.mdandbook/src/window.mdare updated.Tests (each fails on the code before the change):
the_right_sidebar_drags_wide_until_the_center_minimumthe_right_sidebar_shrinks_to_the_room_before_it_hidesdragging_the_left_beside_a_narrowed_right_keeps_the_right_widthChecked in an isolated offscreen app (1120 px window, saved right width 1300): left open gives left 256, center 480, right 336; left hidden gives center 480, right 592; left shown again gives 336 back, and the saved width stays 1300.