Repository navigation
resizable: Skip hidden panels when resizing - #4064
Merged
madcodelife merged 2 commits intoNov 21, 2026
Merged
Conversation
huacnlee
reviewed
Nov 21, 2026
huacnlee
left a comment
Member
There was a problem hiding this comment.
❌ Blocking: the new resizable test doesn't compile, so the PR's own test command fails.
Reviewed at 651a514.
crates/base/src/resizable/mod.rs:906usesAxis::Horizontal, butAxisis not imported in thetestsmodule (cargo test -p gpui-base --lib resizable→ E0433). AddAxisto the test module'suse gpui::{...}.- With that one-line fix applied locally, all 25
resizabletests pass on Linux. - Logic looks right: neighbours are the nearest visible panels, hidden panels keep index and preferred size, no public API change. CI has not run yet (workflows awaiting approval).
huacnlee
approved these changes
Nov 21, 2026
huacnlee
left a comment
Member
There was a problem hiding this comment.
✅ LGTM: the missing Axis import is fixed; the test module compiles and the hidden-panel fix is sound.
Reviewed at 48b9830. Ran cargo test -p gpui-base --lib resizable (25 passed) and rustfmt --check on the changed file (clean). CI still needs a maintainer to approve the workflow run.
madcodelife
approved these changes
Nov 21, 2026
Member
|
Thank you! |
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.
Description
When a panel between two visible panels is hidden, the resize handle can still use that hidden panel as its neighbor. The hidden panel can also be counted when the group redistributes space.
Use the nearest visible panels on either side of the handle. Calculate the size change from the measured bounds and respect the minimum and maximum sizes of the panels involved. A fixed panel can still be resized from its own handle, but dragging another handle won't take space from it.
Hidden panels keep their index and preferred size.
ResizableState::sizes()reports zero for a hidden panel until it becomes visible again.How to Test
cargo test -p gpui-base --lib resizable::tests. The new tests cover hidden panel state, measured bounds, and size limits.