refactor(web): page skeleton as Tailwind utilities
Decks, page bars, sections, heads, status slots and group notes move out of components.css into Deck, PageBar, Section, Rows and friends. The theme gains the geometry tokens and the container widths. Refs #280 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5528ac8aa8
commit
db22e4a1d2
+27
-16
@@ -19,7 +19,18 @@ import {
|
||||
ruleLabel,
|
||||
type WaiveOutcome,
|
||||
} from "./releases";
|
||||
import { Chip, Control, DeckHead, Disclosure, EmptyRow, Row, SkeletonRows, useNote } from "./ui";
|
||||
import {
|
||||
Chip,
|
||||
Control,
|
||||
DeckHead,
|
||||
Disclosure,
|
||||
EmptyRow,
|
||||
Row,
|
||||
Rows,
|
||||
Section,
|
||||
SkeletonRows,
|
||||
useNote,
|
||||
} from "./ui";
|
||||
|
||||
export type Bucket = "eligible" | "waived" | "rejected";
|
||||
|
||||
@@ -138,13 +149,13 @@ function CollapsedBucket({
|
||||
}) {
|
||||
const [open, setOpen] = useState(false);
|
||||
return (
|
||||
<section className="deck-group" hidden={releases.length === 0}>
|
||||
<Section hidden={releases.length === 0}>
|
||||
<DeckHead as="h4" label={label} count={releases.length === 0 ? "" : releases.length}>
|
||||
<Disclosure count={releases.length} open={open} onToggle={() => setOpen(!open)} />
|
||||
</DeckHead>
|
||||
<div hidden={!open}>
|
||||
<Colhead />
|
||||
<ul className="deck-rows">
|
||||
<Rows>
|
||||
<Paged
|
||||
items={releases}
|
||||
keyOf={(release) => release.id}
|
||||
@@ -157,9 +168,9 @@ function CollapsedBucket({
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</ul>
|
||||
</Rows>
|
||||
</div>
|
||||
</section>
|
||||
</Section>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -171,17 +182,17 @@ export function Buckets({ state, actions }: { state: DeckState; actions: Release
|
||||
if (state.kind !== "releases") {
|
||||
return (
|
||||
<div className="buckets">
|
||||
<section className="deck-group" hidden={state.kind === "none"}>
|
||||
<Section hidden={state.kind === "none"}>
|
||||
<DeckHead as="h4" label="eligible" count="" />
|
||||
<Colhead />
|
||||
<ul className="deck-rows">{state.kind === "skeleton" && <SkeletonRows count={4} />}</ul>
|
||||
</section>
|
||||
<section className="deck-group" hidden>
|
||||
<Rows>{state.kind === "skeleton" && <SkeletonRows count={4} />}</Rows>
|
||||
</Section>
|
||||
<Section hidden>
|
||||
<DeckHead as="h4" label="below policy" count="" />
|
||||
</section>
|
||||
<section className="deck-group" hidden>
|
||||
</Section>
|
||||
<Section hidden>
|
||||
<DeckHead as="h4" label="rejected" count="" />
|
||||
</section>
|
||||
</Section>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -206,10 +217,10 @@ function PaintedBuckets({
|
||||
const forceable = rejected.filter(overridable).length;
|
||||
return (
|
||||
<div className="buckets">
|
||||
<section className="deck-group">
|
||||
<Section>
|
||||
<DeckHead as="h4" label="eligible" count={eligible.length} />
|
||||
<Colhead />
|
||||
<ul className="deck-rows">
|
||||
<Rows>
|
||||
{eligible.length === 0 ? (
|
||||
<EmptyRow
|
||||
text={
|
||||
@@ -232,8 +243,8 @@ function PaintedBuckets({
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
</ul>
|
||||
</section>
|
||||
</Rows>
|
||||
</Section>
|
||||
<CollapsedBucket
|
||||
label="below policy"
|
||||
releases={waived}
|
||||
|
||||
Reference in New Issue
Block a user