fix(sidebar): use the host scrollport remaining row so the dock stays at the bottom

This commit is contained in:
newbie 2026-11-12 21:30:15 +08:00
parent fb88fd2d3e
commit 71d63ced6e
3 changed files with 20 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -11,6 +11,23 @@
overflow:hidden;
}
/* The host sidebar scrollport lays its workspace region out as a max-content
grid row. That makes the whole sidebar scroll as one block, so the plugin's
own .wgRoot height cannot fill the viewport and the bottom dock ends up
right after the tree instead of pinned to the sidebar bottom. Only when our
tree is mounted, give the workspace region the remaining row; the tree body
then owns the scrolling and .wgDock stays outside it. */
[data-sidebar-scrollport]:has(> [class*="regionArea"] > .wgRoot) {
grid-template-rows:8px max-content 2px minmax(0, 1fr);
align-content:stretch;
overflow-y:hidden;
}
[data-sidebar-scrollport] > [class*="regionArea"]:has(> .wgRoot) {
min-height:0;
overflow:hidden;
}
/* Remote SSH's legacy title matcher appends a globe to the first SVG it
finds. Our row starts with a disclosure slot, so the badge can land on the
wrong icon. Suppress only that injected decoration within this tree; keep

View File

@ -61,6 +61,8 @@ const block = (selector) => {
assert.match(block('.wgRoot'), /height:100%/, 'the root consumes the sidebar slot height')
assert.match(block('.wgRoot'), /max-height:100%/, 'the root cannot grow past its slot')
assert.match(block('.wgRoot'), /overflow:hidden/, 'the root clips instead of scrolling the whole sidebar')
assert.match(css, /\[data-sidebar-scrollport\]:has\(> \[class\*="regionArea"\] > \.wgRoot\)/, 'the host scrollport is claimed only when the tree is mounted')
assert.match(css, /grid-template-rows:8px max-content 2px minmax\(0, 1fr\)/, 'the workspace region takes the remaining row instead of max-content')
assert.match(block('.wgDock'), /border-top:1px solid/, 'the dock draws the divider against the tree')
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')