Merge master into v8-branch (edge group size preservation, #1495)#1499
Merged
Conversation
The ShellManager installs its own ResizeObserver on the shell element to drive the edge-group splitview layout. Unlike the Resizable base class, it did not guard against the element being hidden or detached from the DOM. When a nested dockview's `onlyWhenVisible` host panel is deactivated the shell element collapses to (0, 0), so the observer laid the splitview out at zero and clamped the low-priority edge groups down to their minimum size — losing the user's sizing when the panel was later reactivated. Skip resize events when the shell has no offsetParent (display: none on it or an ancestor) or is no longer in the document, mirroring the existing guard in Resizable. Fixes #1495 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018axBKCULSaEET94Tefd1Ru
fix(core): preserve edge group size when nested dockview host is hidden
Brings in the edge-group resize-observer visibility guard (#1495): preserve edge group size when a nested dockview's onlyWhenVisible host panel is hidden.
|
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
Brings
masterintov8-branch. The only change master has thatv8-branchdidn't already contain is the edge-group resize-observer visibility guard from #1495 (merged to master in #1498).What #1495 fixed:
ShellManagerinstalls its ownResizeObserveron the shell element. Unlike theResizablebase class — which guards against hidden/detached elements viaoffsetParentandisInDocument— this observer had no such guard. When a nested dockview'sonlyWhenVisiblehost panel is deactivated, the shell element collapses to0×0, so the observer firedlayout(0, 0)and clamped the low-priority edge group to its minimum size (not recovered on reactivation). The fix skips resize events while the shell is hidden or detached.v8-branch'sShellManagerhad evolved (auto-hide,autoReveal, cached-visible-size serialization) but the constructor's resize-observer callback was byte-identical to master's and had the same missing guard — so the bug was present here too. The fix merged in cleanly with no conflicts.Type of change
Affected packages
dockview-coreHow to test
Nest a Dockview inside an outer Dockview panel (default
onlyWhenVisiblerenderer), add an Edge Group and resize it above its minimum, switch to another outer tab and back — the Edge Group keeps its size.Automated:
dockviewShell.spec.tsresize observer visibility guard (#1495)block covers the hidden (offsetParent === null) and detached-from-document cases.Checklist
yarn testpasses (dockview-core: 1269 tests green on v8-branch)biome format/biome lintclean on the changed filestsc --noEmit) with 0 errors🤖 Generated with Claude Code
Generated by Claude Code