Skip to content

Stage: pane label bands take their inline inset from CSS variables - #119

Merged
agorischek merged 5 commits into
mainfrom
pane-band-inset
Nov 21, 2026
Merged

agorischek merged 5 commits into
mainfrom
pane-band-inset

Conversation

@agorischek

Copy link
Copy Markdown
Collaborator

Stacked on #117. This is item G10 of the headless-host plan ("stage styling hooks"), and only its part that has evidence.

Why

The core stage is styled inline from theme tokens, which is good: there's no stylesheet to load. But one inline length had no hook, the pane label band's padding: '0 10px' (stage/labels.tsx, PaneBand). The Playground's Primer UI lines its labels up with its renderers' content in flow layouts, so it overrides the band with !important (hosted/host-primer/src/styles.css:1075-1089, three rules).

Everything else Primer restyles in the stage already has a variable, --ph-swipe-edge and --ph-swipe-fill for the swipe divider.

What changed

  • The band reads padding-inline-start: var(--pj-pane-band-inset-start, var(--pj-pane-band-inset, 10px)), and the same for -end. It renders exactly as before by default.
  • docs/guides/host-core.md lists the band's variables (-bg, -fg, -rule, which were only in a code comment, and the new insets) next to the chip's.

Follow-up

After the pin bump, a private PR replaces Primer's three !important rules with these variables.

Run locally: tools check --fast: pass. tsc for core: pass.

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.

🟢 Approval recommended

No active review issues were identified for the configurable pane-label spacing hooks and accompanying documentation.

No open issues 🎉

What changed in this PR

Adds CSS-variable hooks for pane-label spacing in the core stage, allowing hosts to align labels with their layouts without !important overrides.

Changes:

  • Supports shared and separate inline-start/end insets, retaining the default 10px spacing.
  • Documents the new inset hooks alongside the existing band color and divider variables.
File Description
packages/​host/​core/​src/​stage/​labels.tsx Replaces fixed horizontal padding with configurable logical insets.
docs/​guides/​host-core.md Documents pane-band styling variables and where to apply them.

Review effort: Balanced

@agorischek
agorischek force-pushed the revision-labels branch 2 times, most recently from 00bcebb to f438e6f Compare November 21, 2026 01:08
@agorischek
agorischek force-pushed the pane-band-inset branch 2 times, most recently from a3aaa45 to 747c30e Compare November 21, 2026 01:37
@agorischek
agorischek force-pushed the revision-labels branch 2 times, most recently from 21cc803 to 52cbc8f Compare November 21, 2026 18:28
@agorischek
agorischek force-pushed the pane-band-inset branch 2 times, most recently from 243349f to 7c92224 Compare November 21, 2026 19:07
agorischek and others added 4 commits November 21, 2026 12:34
The rule for when a running job's indicator shows (after 300 ms, then for at least 400 ms) lived in the VS Code UI,
so the default UI's "Updating…" chip showed for every job, however short. The rule is now the core's:
`runningIndicator` and its constants at `@githubnext/projections-host/running` (no React or DOM, for the VS Code
extension host), and `useRunningIndicator`, which the default UI's chip and the VS Code UI's summary bar both use. The
VS Code UI's `./running` entry re-exports it, so the extension is unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The running indicator's minimum started while a loading pane kept the chip hidden, so a chip revealed as the renderer
became ready could vanish at once. The latch now lives only while no pane is loading.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The Inspector wrote revision labels as `name · detail · when`, and four places read them back by splitting on ` · `
with their own rules: the default UI's and the VS Code UI's pair pickers (one trimmed, one didn't), the pane chips
(with an age heuristic) and the pane label bands. The core now owns the format: `formatRevisionLabel`,
`parseRevisionLabel`, `revisionLabelName` and `revisionAge` (the Inspector's `age`, moved). Every reader and the
Inspector's writer use them; `shortRevisionLabel` and the Inspector's `age` keep their names.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The pane label band (side by side's and swipe's revision headers) set `padding: 0 10px` inline, so a host lining its
labels up with its own layout had to override the band with `!important`, as the Playground's Primer UI does. The band
now reads `--pj-pane-band-inset` (10px by default), or `--pj-pane-band-inset-start` and `-end` apart, beside its
existing `--pj-pane-band-bg`, `-fg` and `-rule`.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Base automatically changed from revision-labels to main November 21, 2026 21:47
@agorischek
agorischek merged commit 19b5ceb into main Nov 21, 2026
48 checks passed
@agorischek
agorischek deleted the pane-band-inset branch November 21, 2026 22:29
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