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:
parent
c205c6115b
commit
25965341e0
2 changed files with 164 additions and 86 deletions
|
|
@ -45,13 +45,13 @@ interface HiveStatus {
|
|||
}
|
||||
|
||||
// One tone + label per freshness value. `unknown` (reporting but absent
|
||||
// from the roster) reads `negative` — it's the one case this endpoint
|
||||
// from the roster) reads `error` — it's the one case this endpoint
|
||||
// cannot vouch for at all, per `status.rs`'s doc comment.
|
||||
const FRESHNESS: Record<Freshness, { tone: BadgeTone; label: string }> = {
|
||||
fresh: { tone: "positive", label: "fresh" },
|
||||
stale: { tone: "warning", label: "stale" },
|
||||
fresh: { tone: "ok", label: "fresh" },
|
||||
stale: { tone: "warn", label: "stale" },
|
||||
never_reported: { tone: "neutral", label: "never reported" },
|
||||
unknown: { tone: "negative", label: "unknown" },
|
||||
unknown: { tone: "error", label: "unknown" },
|
||||
};
|
||||
|
||||
const COLUMNS: TableColumn<HiveStatus>[] = [
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ export function SwarmPage() {
|
|||
icon="🔔"
|
||||
hint={
|
||||
<>
|
||||
<Badge tone="warning" value="beta" /> forge events routed to agents,
|
||||
as flows
|
||||
<Badge tone="warn" value="beta" /> forge events routed to agents, as
|
||||
flows
|
||||
</>
|
||||
}
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in a new issue