fix: let the docked bucket keep its height so it can expand

A shrinkable bucket stayed one row tall however far it was expanded, which
reads as "cannot expand". The bucket no longer gives up height; it scrolls
past its cap, and the expanded default-workspace list below absorbs the
shrink instead.
This commit is contained in:
qyh15 2026-10-28 20:52:45 +08:00
parent a119358fb3
commit 932e652bad
4 changed files with 10 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -110,13 +110,14 @@
border-top:1px solid var(--dsw-alias-border-l2,#7f7f7f47); border-top:1px solid var(--dsw-alias-border-l2,#7f7f7f47);
} }
/* The docked bucket gives up height only down to one full row, never below it /* The docked bucket never gives up height: it must be able to open its own
(a shorter bucket would clip its own row in half); past its cap it scrolls, children (a shrinkable bucket stays one row tall however far it is expanded,
so a big pile cannot swallow the tree. */ which reads as "cannot expand"). Past its cap it scrolls, so a big pile still
cannot swallow the tree; the session list below is what gives way. */
.wgDockBucket { .wgDockBucket {
flex:0 1 auto; flex:0 0 auto;
min-width:0; min-width:0;
min-height:32px; min-height:0;
max-height:min(240px,38vh); max-height:min(240px,38vh);
padding:4px 8px 0; padding:4px 8px 0;
overflow-x:hidden; overflow-x:hidden;

View File

@ -65,7 +65,8 @@ assert.match(block('.wgDock'), /flex:0 1 auto/, 'the dock gives way to the tree
assert.match(block('.wgDock'), /min-height:84px/, 'the dock has a pixel floor so its rows always fit') assert.match(block('.wgDock'), /min-height:84px/, 'the dock has a pixel floor so its rows always fit')
assert.doesNotMatch(block('.wgDock'), /min-height:min-content/, 'a min-content floor would beat max-height and swallow the tree') assert.doesNotMatch(block('.wgDock'), /min-height:min-content/, 'a min-content floor would beat max-height and swallow the tree')
assert.match(block('.wgDefaultWorkspaceBar'), /overflow:hidden/, 'the bar clips its own content instead of painting over the bucket') assert.match(block('.wgDefaultWorkspaceBar'), /overflow:hidden/, 'the bar clips its own content instead of painting over the bucket')
assert.match(block('.wgDockBucket'), /min-height:32px/, 'the bucket never shrinks below one full row') assert.match(block('.wgDockBucket'), /flex:0 0 auto/, 'the bucket keeps its height so it can open its own children')
assert.match(block('.wgDockSessions'), /flex:1 1 auto/, 'only the session list gives up height')
assert.match(block('.wgDockBucket'), /overflow-y:auto/, 'a long bucket scrolls on its own') assert.match(block('.wgDockBucket'), /overflow-y:auto/, 'a long bucket scrolls on its own')
assert.match(block('.wgDockBucket'), /max-height:min\(240px,38vh\)/, 'the bucket is capped so it cannot swallow the tree') assert.match(block('.wgDockBucket'), /max-height:min\(240px,38vh\)/, 'the bucket is capped so it cannot swallow the tree')
assert.match(block('.wgDockSessions'), /overflow-y:auto/, 'an expanded default workspace scrolls inside the dock') assert.match(block('.wgDockSessions'), /overflow-y:auto/, 'an expanded default workspace scrolls inside the dock')

View File

@ -67,7 +67,7 @@ const dock = rule('.wgDock')
assert.ok(dock.includes('border-top:'), 'the dock is separated from the tree') assert.ok(dock.includes('border-top:'), 'the dock is separated from the tree')
assert.ok(dock.includes('max-height:') && dock.includes('overflow:hidden;'), 'the dock is capped and clips its own overflow') assert.ok(dock.includes('max-height:') && dock.includes('overflow:hidden;'), 'the dock is capped and clips its own overflow')
const bucket = rule('.wgDockBucket') const bucket = rule('.wgDockBucket')
assert.ok(bucket.includes('min-height:32px;'), 'the bucket never shrinks below one full row') assert.ok(bucket.includes('flex:00auto;'), 'the bucket keeps its height so it can open its own children')
assert.ok(bucket.includes('overflow-y:auto;') && bucket.includes('max-height:'), 'a long bucket scrolls on its own') assert.ok(bucket.includes('overflow-y:auto;') && bucket.includes('max-height:'), 'a long bucket scrolls on its own')
assert.ok(rule('.wgDock').includes('min-height:84px;'), 'the dock keeps a pixel floor and a real cap') assert.ok(rule('.wgDock').includes('min-height:84px;'), 'the dock keeps a pixel floor and a real cap')
assert.ok(!rule('.wgDock').includes('min-content'), 'a min-content floor would defeat the dock cap') assert.ok(!rule('.wgDock').includes('min-content'), 'a min-content floor would defeat the dock cap')