Watch
0
0
Fork
You've already forked hyperhive
0

frontend: one tone vocabulary for badges, hints, banners and toasts

Part of the unification order in the UI sweep issue (step b).

A badge named its tones positive/warning/negative, a hint muted/warn/error/ok,
a banner info/warning/error and a toast info/ok/error. They now all take the
shared Tone: neutral, info, ok, warn, error (a badge adds accent for a selected
choice). Warn is amber everywhere (a hint used yellow), info is cyan everywhere
(a toast used purple). A test pins the list against each component's CSS.
This commit is contained in:
iris 2026-11-25 21:43:23 +01:00
commit 25965341e0
2 changed files with 164 additions and 86 deletions

View file

@ -117,6 +117,15 @@ stylesheet names a role and never a number:
Stacking inside one component (1 or 2) stays a plain number. A new floating box
uses `--z-popover` and `--shadow-pop`.
## Status tones
A badge, a hint, a banner and a toast all take one of five tones, defined in
`shared/src/tone.ts`: `neutral` (no signal), `info` (cyan), `ok` (green), `warn`
(amber) and `error` (red). A badge adds `accent` for a selected or active choice.
A banner takes `info`, `warn` or `error`, and a toast takes the four that carry a
signal. A component that shows a status takes a `Tone` and doesn't invent a
fifth spelling.
## Common mistakes
The Catppuccin colour names **don't** map 1:1 to the variable names.

View file

@ -999,7 +999,7 @@ restricted, log or unrestricted. Selecting it lists the three modes; picking one
`PUT` of the mode with the stored permissions beside it.
The **repositories** row is how many repositories the agent's forge account may
create: a badge reading none or `up to N`, in the warning tone above 0. Selecting
create: a badge reading none or `up to N`, in the `warn` tone above 0. Selecting
it opens a number box, 0 to 100, and **save** does a `PUT` of `max_repos` with the
stored permissions beside it. A `PUT` that leaves `max_repos` out, and the `DELETE`
of **use the default**, keep it. Nothing stored means 0, and the box warns that an