fix: restore the dock height cap that swallowed the tree
A min-content floor outweighs max-height, so the dock grew to the full session list: the tree was squeezed to nothing and the dock ran past the sidebar's bottom edge, which is what read as the workspace row overlapping the bucket. The floor is a fixed length again (84px), the bar clips its own content, and the bucket may shrink only down to one row.
This commit is contained in:
parent
49ffe318f3
commit
a119358fb3
File diff suppressed because one or more lines are too long
|
|
@ -99,9 +99,10 @@
|
|||
.wgDock {
|
||||
flex:0 1 auto;
|
||||
min-width:0;
|
||||
/* Never shrink below the dock's own rows: a clipped row would look like an
|
||||
overlap. The session list is the only child allowed to give up height. */
|
||||
min-height:min-content;
|
||||
/* A plain pixel floor (bucket row + workspace row + padding). A content-based
|
||||
floor would outweigh max-height, letting the dock grow to the whole session
|
||||
list and swallow the tree, so the floor stays a fixed length. */
|
||||
min-height:84px;
|
||||
max-height:min(62vh,560px);
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
|
|
@ -109,13 +110,13 @@
|
|||
border-top:1px solid var(--dsw-alias-border-l2,#7f7f7f47);
|
||||
}
|
||||
|
||||
/* The docked bucket never gives up height to the expanded session list (a
|
||||
squeezed bucket would clip its own row in half); it scrolls on its own past a
|
||||
fixed share of the sidebar so a big pile cannot swallow the tree. */
|
||||
/* The docked bucket gives up height only down to one full row, never below it
|
||||
(a shorter bucket would clip its own row in half); past its cap it scrolls,
|
||||
so a big pile cannot swallow the tree. */
|
||||
.wgDockBucket {
|
||||
flex:0 0 auto;
|
||||
flex:0 1 auto;
|
||||
min-width:0;
|
||||
min-height:0;
|
||||
min-height:32px;
|
||||
max-height:min(240px,38vh);
|
||||
padding:4px 8px 0;
|
||||
overflow-x:hidden;
|
||||
|
|
@ -136,6 +137,7 @@
|
|||
min-height:0;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
overflow:hidden;
|
||||
padding:6px 8px 8px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,10 @@ assert.match(block('.wgDock'), /border-top:1px solid/, 'the dock draws the divid
|
|||
assert.match(block('.wgDock'), /max-height:min\(62vh,560px\)/, 'the dock is capped so the tree always keeps room')
|
||||
assert.match(block('.wgDock'), /overflow:hidden/, 'the dock clips its own overflow instead of painting over the tree')
|
||||
assert.match(block('.wgDock'), /flex:0 1 auto/, 'the dock gives way to the tree but never grows past its cap')
|
||||
assert.match(block('.wgDockBucket'), /flex:0 0 auto/, 'the bucket never gives up height, so its row is never cut in half')
|
||||
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.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'), /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('.wgDockSessions'), /overflow-y:auto/, 'an expanded default workspace scrolls inside the dock')
|
||||
|
|
|
|||
|
|
@ -67,8 +67,11 @@ const dock = rule('.wgDock')
|
|||
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')
|
||||
const bucket = rule('.wgDockBucket')
|
||||
assert.match(bucket, /flex:0\s*0\s*auto;/, 'the bucket keeps its height so its row is never halved')
|
||||
assert.ok(bucket.includes('min-height:32px;'), 'the bucket never shrinks below one full row')
|
||||
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-content'), 'a min-content floor would defeat the dock cap')
|
||||
assert.ok(rule('.wgDefaultWorkspaceBar').includes('overflow:hidden;'), 'the bar clips its own content')
|
||||
assert.ok(rule('.wgDockSessions').includes('overflow-y:auto;'), 'an expanded default workspace scrolls inside the dock')
|
||||
assert.ok(rule('.wgDefaultWorkspaceBar .wgProjectRow').includes('flex:none;'), 'the default-workspace row itself never shrinks or scrolls')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue