ui-kit: oc-callout variant vocabulary gap — base layer defines only --warning; --warn/--ok/--bad are hand-rolled per component #346

Closed
opened 2026-08-09 02:19:22 +00:00 by ben · 1 comment
Owner

Gap. packages/ui-kit/src/baseLayer.css defines .oc-callout and a single variant, .oc-callout--warning. But app components use a wider vocabulary — oc-callout--ok, oc-callout--warn, oc-callout--bad (e.g. JoinWithCodeScreen.vue, DeclinedScreen.vue, FoundingAccess.vue) — each carrying its own local .oc-callout style block to paint variants the kit never defined. Two spellings of the same tier (--warn vs --warning) coexist.

Why it matters. The wireframes' .co vocabulary (ADR 0122: interiors are the visual contract) has exactly three postures — accent (default), warn, bad — and the kit should own all of them once, in tokens, so they re-theme with a community's palette and every screen renders the same tier the same way. Today a screen's callout look depends on which component you're in.

Fix sketch.

  • Promote --ok, --warn/--warning (pick ONE spelling, migrate the other), and --bad into baseLayer.css, derived from --oc-status-healthy / --oc-status-warning / the destructive treatment the kit rules (nb: the kit deliberately compiles no destructive colour of its own today — baseLayer's step-status comment — so --bad's paint needs that ruling honoured or extended).
  • Delete the per-component local .oc-callout blocks that only re-implement variants.
  • Acceptance: grep shows no component-scoped .oc-callout variant definitions; both light/dark and a re-pointed community palette render all three tiers correctly.

Found during the S12 design-verify arc (merge df66d03).

**Gap.** `packages/ui-kit/src/baseLayer.css` defines `.oc-callout` and a single variant, `.oc-callout--warning`. But app components use a wider vocabulary — `oc-callout--ok`, `oc-callout--warn`, `oc-callout--bad` (e.g. `JoinWithCodeScreen.vue`, `DeclinedScreen.vue`, `FoundingAccess.vue`) — each carrying its own local `.oc-callout` style block to paint variants the kit never defined. Two spellings of the same tier (`--warn` vs `--warning`) coexist. **Why it matters.** The wireframes' `.co` vocabulary (ADR 0122: interiors are the visual contract) has exactly three postures — accent (default), `warn`, `bad` — and the kit should own all of them once, in tokens, so they re-theme with a community's palette and every screen renders the same tier the same way. Today a screen's callout look depends on which component you're in. **Fix sketch.** - Promote `--ok`, `--warn`/`--warning` (pick ONE spelling, migrate the other), and `--bad` into `baseLayer.css`, derived from `--oc-status-healthy` / `--oc-status-warning` / the destructive treatment the kit rules (nb: the kit deliberately compiles no destructive colour of its own today — baseLayer's step-status comment — so `--bad`'s paint needs that ruling honoured or extended). - Delete the per-component local `.oc-callout` blocks that only re-implement variants. - Acceptance: grep shows no component-scoped `.oc-callout` variant definitions; both light/dark and a re-pointed community palette render all three tiers correctly. Found during the S12 design-verify arc (merge `df66d03`).
Author
Owner

Done in commit 234f75a (on origin/main).

The kit now owns the callout posture vocabulary once (packages/ui-kit/src/baseLayer.css): --ok (from --oc-status-healthy), --warn (from --oc-status-warning — the ONE spelling), --bad (from the warning token too, honouring the kit's standing no-destructive-colour ruling — the same tier .oc-check--failed wears), and a neutral --muted (from --oc-ink-soft). Each recolours the strip and its tint from a single status token via color-mix, so a re-pointed community palette re-themes every screen; each posture sets border-color, so it recolours whichever edges a screen draws (the kit's left strip or a screen's full border).

Root cause found & fixed: a Vue <style scoped> selector out-specifies the kit variant, so a screen that leaned on the kit alone painted the WRONG tier — which is exactly why every screen hand-rolled its own variant. Deleted every per-component .oc-callout variant block and stripped colour from the scoped bases so the kit's variant wins (kept genuine local layout).

Collisions migrated: FoundingAccess verdict-unknown --warn → --muted (DDR 0139: never amber); BackupsOverviewScreen --limit → the default accent callout (honest-limits voice); PendingDevicesSurface --muted → kit --muted; ThisComputerScreen/UpToDateScreen base-recolours → --ok; --warning → --warn across the Founding screens.

Acceptance met: grep shows no component-scoped .oc-callout variant definitions; the tiers derive from tokens so they re-theme in light/dark and under a re-pointed palette. Pinned by packages/ui-kit/tests/unit/baseLayer.test.ts (posture vocabulary + --warning gone) and new source-scan guards app/tests/unit/calloutVocabulary.test.ts + dashboard/tests/unit/calloutVocabulary.test.ts. ui-kit 109 + dashboard 981 green; app green but for the pre-existing go-on-PATH boot.test.ts suite (environment, unrelated).

Done in commit `234f75a` (on `origin/main`). **The kit now owns the callout posture vocabulary once** (`packages/ui-kit/src/baseLayer.css`): `--ok` (from `--oc-status-healthy`), `--warn` (from `--oc-status-warning` — the ONE spelling), `--bad` (from the warning token too, honouring the kit's standing no-destructive-colour ruling — the same tier `.oc-check--failed` wears), and a neutral `--muted` (from `--oc-ink-soft`). Each recolours the strip and its tint from a single status token via `color-mix`, so a re-pointed community palette re-themes every screen; each posture sets `border-color`, so it recolours whichever edges a screen draws (the kit's left strip or a screen's full border). **Root cause found & fixed:** a Vue `<style scoped>` selector out-specifies the kit variant, so a screen that leaned on the kit alone painted the WRONG tier — which is exactly why every screen hand-rolled its own variant. Deleted every per-component `.oc-callout` variant block and stripped colour from the scoped bases so the kit's variant wins (kept genuine local layout). **Collisions migrated:** `FoundingAccess` verdict-unknown `--warn` → `--muted` (DDR 0139: never amber); `BackupsOverviewScreen` `--limit` → the default accent callout (honest-limits voice); `PendingDevicesSurface` `--muted` → kit `--muted`; `ThisComputerScreen`/`UpToDateScreen` base-recolours → `--ok`; `--warning` → `--warn` across the Founding screens. **Acceptance met:** grep shows no component-scoped `.oc-callout` variant definitions; the tiers derive from tokens so they re-theme in light/dark and under a re-pointed palette. Pinned by `packages/ui-kit/tests/unit/baseLayer.test.ts` (posture vocabulary + `--warning` gone) and new source-scan guards `app/tests/unit/calloutVocabulary.test.ts` + `dashboard/tests/unit/calloutVocabulary.test.ts`. ui-kit 109 + dashboard 981 green; app green but for the pre-existing `go`-on-PATH `boot.test.ts` suite (environment, unrelated).
ben closed this issue 2026-08-09 03:12:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#346
No description provided.