Repository navigation
One-row toolbar, a floating glass foot for the legend and summary, and extraction said on the stage - #65
One-row toolbar, a floating glass foot for the legend and summary, and extraction said on the stage#65agorischek wants to merge 10 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved UI regressions show ineligible playback controls, hide recovery controls when comparisons fail, and dismiss the projection switcher with keyboard focus loss during resizing.
3 open issues
What changed in this PR
Prototypes a toolbar layout on top of #58’s utility area: modes and scope stay at the start, tools stay at the end, and the viewer title centres when space permits or moves onto its own line.
Changes:
- Adds title-aware toolbar plans and placement options to the default UI.
- Moves viewer header content into the toolbar, with canvas detection and URL overrides.
- Enables stage playback and pane chips in VS Code projection tabs, with supporting styles, documentation and tests.
| File | Description |
|---|---|
| tools/storybook/stories/vscode/view.stories.tsx | Adds a utility-area projection-tab story. |
| packages/integrations/vscode/src/webview/views.ts | Enables the utility area in projection tabs. |
| packages/host/vscode-ui/src/view/toolbar-content.ts | Suppresses toolbar playback for utility-area renderer views. |
| packages/host/vscode-ui/src/view/stage.tsx | Adds stage playback and pane chips. |
| packages/host/vscode-ui/src/view/props.ts | Documents the VS Code utility-area option. |
| packages/host/vscode-ui/src/view.tsx | Passes the utility-area option to the renderer stage. |
| packages/host/vscode-ui/src/styles/controls.css | Styles floating playback controls. |
| packages/host/vscode-ui/src/stage-notice.tsx | Positions notices below stage overlays. |
| packages/host/inspector/src/viewer/theme.ts | Uses the toolbar background for status-bar colour. |
| packages/host/inspector/src/viewer/sides.tsx | Selects title placement and assembles viewer chrome. |
| packages/host/inspector/src/viewer/mount.tsx | Integrates the new viewer chrome. |
| packages/host/inspector/src/viewer/chrome.tsx | Adds the toolbar title block and standalone stopped veil. |
| packages/host/inspector/src/mount.tsx | Exposes and forwards title options. |
| packages/host/inspector/src/app/props.ts | Adds Inspector title properties. |
| packages/host/inspector/src/app/page.tsx | Passes title options to the presented view. |
| packages/host/inspector/src/app/inspector-app.tsx | Forwards title options for bare utility-area views. |
| packages/host/core/test/toolbar-layout.test.mjs | Tests sides-layout plan ordering and title placement. |
| packages/host/core/src/ui/view/toolbar.tsx | Integrates the sides toolbar and shares control blocks. |
| packages/host/core/src/ui/view/toolbar-sides.tsx | Implements centred and separate-line title layouts. |
| packages/host/core/src/ui/view/props.ts | Defines public title content and placement options. |
| packages/host/core/src/ui/toolbar-plans.ts | Adds title placement to toolbar plans. |
| packages/host/core/src/ui/toolbar-layout.ts | Incorporates title placement into plan selection. |
| packages/host/core/src/ui/index.ts | Exports the title placement type. |
| docs/design/utility-area.md | Documents the sides-layout prototype. |
Review effort: Balanced
5075b12 to
eefc3eb
Compare
3a9c705 to
f3242d0
Compare
46befea to
19e63ec
Compare
f3242d0 to
a09a9cc
Compare
b63d271 to
23f77b3
Compare
3b7d5ca to
9973399
Compare
6e1f7fb to
58c2646
Compare
aa26fea to
95bcb8d
Compare
21c12e1 to
992d59a
Compare
169f80b to
34b506e
Compare
0835415 to
64ff64c
Compare
b1d2c11 to
ab04f5c
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The overlay and canvas-fitting changes require human cross-browser validation of progress scrubbing, narrow layouts, and zoomed scrolling that could not be performed in this environment.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
ab04f5c to
9002427
Compare
9002427 to
254aef7
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-host overlay geometry and fitted/scrolled framing still require real-host visual validation, particularly at narrow widths and for iframe rendering and Safari’s fallback, which static review cannot establish.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
254aef7 to
8584252
Compare
…on said on the stage The default view's toolbar never centres its mode region: the host's picker (the projection switcher), the mode switch and Changes / All lead the row (at its left inset when the host puts nothing there), and the tools sit at its end, the row collapsing within itself. With the utility area it keeps one row. A surface that already names what is compared says so (`InspectorHost.revisionsNamed`) and the viewer doesn't repeat it. VS Code's tab takes the utility area's chips, and its playback while it plays. The renderer's legend and the summary bar float at the stage's foot as one centred overlay, 12px from its bottom and sides: the legend's row over the summary's, one rule between them, one edge and radius, as wide as the longer row, on whole pixels. The summary fits to the room the foot may grow to, its "…" at the row's end and its popover above the foot, with full-width rows whose counts line up in columns. The stage's overlays (playback bar, chips, foot, "Updating…") are glass: the toolbar's surface at 70%, blurred 8px, solid in WebKit and without backdrop-filter. The foot covers the frames as the utility area does: the stage sends what lies in a frame's bottom half as the new optional `stage-inset-bottom` token. The kit pads `pk-stage` content by it, and fitted canvases keep clear of the foot only where their fit would reach it (`coveredBottom`), and by the inset once they scroll (`useScrolledBottom`); the graph canvas and the dependency injection renderer do both. The viewer's header no longer says "Extracting…": a first load says so in the stage, and a re-extraction over the last drawing floats "Updating…" at the stage's top right. While both panes of side by side or swipe load, one status is centred on the stage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- VS Code's toolbar leads its row with the modes too: centring is opt-in (`centreModes`), off by default. - The stage's foot stays mounted (hidden) while empty, so a legend that arrives later is measured and sent as a cover at once. - Too narrow for even the summary's "…" beside its fixed content, the bar is tight: the scope's words give way with an ellipsis and the "…" keeps its room, so nothing overlaps it. The fixed content is measured at its full width. - Specs: one loading status centred on the stage while both panes load; the viewer's playback is on the stage; the Copilot canvas's pane labels are chips edged in the app's divider. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…out empty-list intermediates Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The summary fit reserves the trail's padding and the bar's gaps. The popover finds the legend in a composing host's scoped root. Graph and DI padding keep clear of stage-inset-bottom without a cover, and the graph's footer strip reserves it under its content. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ilt-in views; reference docs The summary fit reads the bar's unrounded width, with half a pixel to spare, and counts gaps only between the bar's own items (not the fixed content or the '…', counted with them). The Updating chip shows while a table or text view keeps the last result. Regenerated the kit's reference page. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Without the summary, what the Changes scope hides is the foot's last row rather than a pill floating over the legend; the built-in views pad their end for it. The detail card spec measures the view from its own top, since the story's evidence above it wraps as the selection changes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
8584252 to
05a5719
Compare

Stacked on #58 (the utility area); #77 stacks on this. The stack is rebased onto main (2314c82), each PR one commit. What it ships, as the user decided:
One-row toolbar
InspectorHost.revisionsNamed, a pull request page) doesn't repeat it.The stage's foot: legend and summary, floating, centred, glass
SummaryBaritself), the popover opens above the legend's band rather than over it.--ph-utility-bg,--ph-utility-backdrop). Muted text keeps 4.7:1 over the DI graph in both themes. WebKit (Safari, every iOS browser) doesn't blur a renderer's iframe behind an overlay, so there, and whereverbackdrop-filteris missing, the fill is solid.Renderers keep clear of the foot:
stage-inset-bottomstage-inset-bottom(the top half staysstage-inset-top).pk-stagecontent by it (--pk-stage-padding-bottom). A fitted canvas raises its bottom only where its fit would reach the foot (coveredBottom, viauseCoveredPadding), so a flat graph doesn't move, and by at least the inset once it scrolls (useScrolledBottom), so its last row can scroll clear. The graph canvas and the dependency injection renderer do both.Extraction is said on the stage
Removed: the prototypes' centred title and title-on-its-own-line, and the viewer's
?title=,?utility=offand?overlay=flags.Tests
cover.test.mjs); the kit'scoveredBottom(a flat drawing keeps its bottom, a tall one clears the foot by 8 px, and top and bottom covers don't move each other's edge); the viewer's status line.viewer.spec.tschecks the foot in the viewer. CI runs the rest.Screenshots (DI hero demo, 630237f3 → 6af8d471, Chromium)
The "…" popover at 760, a row hovered:

The stacked after pane scrolled to its end, its last row clear of the foot:
"Updating…" in Diff, Animated at 760 (below the bar) and Side by side (below the after chip):