Skip to content

One-row toolbar, a floating glass foot for the legend and summary, and extraction said on the stage - #65

Open
agorischek wants to merge 10 commits into
utility-areafrom
toolbar-sides
Open

agorischek wants to merge 10 commits into
utility-areafrom
toolbar-sides

Conversation

@agorischek

@agorischek agorischek commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • The default view's toolbar keeps one row: the host's picker (the projection switcher on a pull request), the mode switch and Changes / All at its start, the tools (zoom, Find, Settings, About, full screen) at its end. Short of room it collapses within the row (the modes into a menu, the tools into More), never adding a line.
  • The mode region is never centred, in any host: with no picker (a gallery, the viewer) it starts at the toolbar's left inset. Centre the mode and scope switches in the toolbar; playback on a row of its own #25's centred cluster and its plans are gone; hosts without the utility area keep playback's second row, with the modes left.
  • The CLI viewer and the Copilot canvas keep their header row (mark, title and projection menu, what is compared) above it, as decided in Centre the mode and scope switches in the toolbar; playback on a row of its own #25. A surface that already names what is compared (InspectorHost.revisionsNamed, a pull request page) doesn't repeat it.
  • VS Code's projection tabs take the utility area: Animated playback floats on the stage, Side by side and Swipe use the stage chips.

The stage's foot: legend and summary, floating, centred, glass

  • The renderer's legend and the summary bar float over the stage's foot as one overlay, 12 px from its bottom and sides, centred: the legend's row over the summary's, one 1 px rule between them, one edge and radius around both, as wide as the longer row (the shorter centred in it), on whole pixels. Either row alone is the whole foot; over the table and text views only the summary shows, and they pad their end clear of it.
  • The summary fits its figures to the room the foot may grow to; what doesn't fit moves into a "…" at the row's end, whose popover opens above the whole foot. Its figures are full-width rows: hover highlights a figure's total and counts together, and the counts of each kind line up in columns. In a banded summary bar (a host composing SummaryBar itself), the popover opens above the legend's band rather than over it.
  • Glass is the stage's overlay look (playback bar, chips, foot, "Updating…"): the toolbar's surface at 70%, blurred 8 px behind (--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 wherever backdrop-filter is missing, the fill is solid.
  • The VS Code tab keeps its own status-bar summary and band legend.

Renderers keep clear of the foot: stage-inset-bottom

  • The foot is a stage cover like the utility area. The stage sends the rectangles in a frame's bottom half as a new optional layout token, stage-inset-bottom (the top half stays stage-inset-top).
  • The kit pads pk-stage content by it (--pk-stage-padding-bottom). A fitted canvas raises its bottom only where its fit would reach the foot (coveredBottom, via useCoveredPadding), 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

  • The viewer's header no longer says "Extracting…". A first load says so in the stage's own loading state, centred; while both panes of Side by side or Swipe load, one status is centred on the stage.
  • Re-extracting with the last drawing still shown floats an "Updating…" chip at the stage's top right, in the chips' look, below whatever already floats at that corner.

Removed: the prototypes' centred title and title-on-its-own-line, and the viewer's ?title=, ?utility=off and ?overlay= flags.

Tests

  • Unit: the toolbar plan's order; the cover's top and bottom insets and tokens (cover.test.mjs); the kit's coveredBottom (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.
  • Browser (host core, chromium-desktop, 25 run locally): the foot floats 12 px above the stage, centred, on whole pixels; the summary is its last row; the legend is its first row with no fill or edge of its own; the "…" popover's rows are full width with aligned counts; cap-height centring in the summary; chips and utility area. viewer.spec.ts checks the foot in the viewer. CI runs the rest.

Screenshots (DI hero demo, 630237f3 → 6af8d471, Chromium)

Animated, 1440 Side by side, 1440 Animated, 760 Side by side, 760
Light viewer, animated, light, 1440 viewer, side by side, light, 1440 viewer, animated, light, 760 viewer, side by side, light, 760
Dark viewer, animated, dark, 1440 viewer, side by side, dark, 1440 viewer, animated, dark, 760 viewer, side by side, dark, 760

The "…" popover at 760, a row hovered: popover, light popover, dark

The stacked after pane scrolled to its end, its last row clear of the foot: scrolled to the end, dark

"Updating…" in Diff, Animated at 760 (below the bar) and Side by side (below the after chip): Updating chip

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

@agorischek
agorischek force-pushed the toolbar-sides branch 5 times, most recently from 5075b12 to eefc3eb Compare November 20, 2026 02:50
@agorischek
agorischek force-pushed the toolbar-sides branch 2 times, most recently from 3b7d5ca to 9973399 Compare November 20, 2026 15:20
@agorischek
agorischek force-pushed the toolbar-sides branch 2 times, most recently from aa26fea to 95bcb8d Compare November 20, 2026 16:21
@agorischek agorischek changed the title Prototype the toolbar's sides layout: modes at the start, tools at the end, the title centred or on its own line One-row toolbar, a floating glass foot for the legend and summary, and extraction said on the stage Nov 20, 2026
@agorischek
agorischek marked this pull request as ready for review November 20, 2026 17:55
@agorischek
agorischek requested a balanced review from Copilot November 20, 2026 17:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved layout and playback-gating defects can cause content overlaps and empty utility bars, while Edge on iOS incorrectly bypasses the solid-background fallback.

4 open issues
3 resolved since last review

Review effort: Balanced

Comment thread packages/host/core/src/ui/view/glass.ts Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The centring assertion misses leftward alignment regressions because it checks a signed difference rather than the absolute difference between the two insets.

1 open issue
1 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

With summary disabled, the Changes scope notice overlaps and obscures the new legend-only footer, so the bottom overlays need coordinated positioning.

1 open issue

Review effort: Balanced

Comment thread packages/host/core/src/ui/view.tsx Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Cross-host overlay and canvas-framing changes require real-browser validation at narrow widths, during scrubbing, and in WebKit, which this source-only review could not perform.

No open issues 🎉

Review effort: Balanced

agorischek and others added 10 commits November 20, 2026 20:29
…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>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants