Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: shared Hint, ActionRow, Toolbar, EmptyState, ExternalLink and ExpandableCard replace per-page copies

Hint, ActionRow, Toolbar, EmptyState and ExternalLink replace the muted
text, button row, refresh bar, empty line and _blank anchor that each page
restyled under its own class. ExpandableCard (with a loading twin) holds the
builds and recent-runs cards, which had identical head and body CSS. The
create form's raw checkbox becomes CheckboxField. The components page shows
each new piece.
This commit is contained in:
iris 2026-11-06 17:54:24 +01:00 • committed by mara
commit 8a2e5203ad
2 changed files with 689 additions and 427 deletions

View file

@ -32,13 +32,3 @@
margin-bottom: 0.5em;
font-weight: 600;
}
.ui-classifier-settings-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.75em;
}
.ui-classifier-settings-note {
margin: 0;
color: var(--muted);
}

View file

@ -9,7 +9,9 @@
import { useEffect, useState } from "preact/hooks";
import { ApiErrorPanel } from "@hive/shared/api-error-panel.js";
import { readApiError, type ProblemDetails } from "@hive/shared/api-error.js";
import { ActionRow } from "../../ui/action-row/ActionRow.js";
import { Button } from "../../ui/button/Button.js";
import { Hint } from "../../ui/hint/Hint.js";
import { Disclosure } from "../../ui/disclosure/Disclosure.js";
import { SelectField } from "../../ui/select-field/SelectField.js";
import { TextField } from "../../ui/text-field/TextField.js";
@ -237,7 +239,7 @@ export function ClassifierSettings() {
problem={saveError}
/>
) : null}
<div class="ui-classifier-settings-actions">
<ActionRow>
<Button
variant="primary"
type="submit"
@ -246,14 +248,12 @@ export function ClassifierSettings() {
{saving ? "saving…" : "save"}
</Button>
{justSaved ? (
<span class="ui-classifier-settings-note" role="status">
<Hint as="span" role="status">
Saved.
</span>
</Hint>
) : null}
</div>
{problem !== null ? (
<p class="ui-classifier-settings-note">{problem}</p>
) : null}
</ActionRow>
{problem !== null ? <Hint>{problem}</Hint> : null}
</form>
) : null}
</Disclosure>