diff --git a/client/src/components/Assistant/cards/packing/checklistParts.tsx b/client/src/components/Assistant/cards/packing/checklistParts.tsx index e689437a7..4ccd77143 100644 --- a/client/src/components/Assistant/cards/packing/checklistParts.tsx +++ b/client/src/components/Assistant/cards/packing/checklistParts.tsx @@ -20,7 +20,16 @@ import { ROW_GLYPH, type RowChange } from './checklistModel'; * list, and the rows of a run of changes with their include choice. */ -/** A group's head: its colour, its name, a badge, and who looks after it (the ones a change drops faded). */ +/** The band behind a group's head: its colour faint over the card's grey, the grey alone without one. */ +function bandOf(color: string): string { + return color ? `color-mix(in srgb, ${color} 12%, var(--bg-secondary))` : 'var(--bg-secondary)'; +} + +/** + * A group's head as a section of the list: a full width band in its colour, + * the colour dot, its name, and at the end its badge (how many it holds) and + * who looks after it, the ones a change drops faded. + */ export function ChecklistHead({ color, name, @@ -38,14 +47,17 @@ export function ChecklistHead({ lead?: ReactNode; }) { return ( -
+
{lead ?? } - + {name} - {badge} - {(people.length > 0 || removed.length > 0) && ( - + {(badge || people.length > 0 || removed.length > 0) && ( + + {badge} {/* The people a change takes off, faded; the card says "No longer" in words under the head. */} {removed.length > 0 && ( diff --git a/client/src/components/Assistant/cards/packing/packingParts.tsx b/client/src/components/Assistant/cards/packing/packingParts.tsx index e8240a58c..36f33b5f0 100644 --- a/client/src/components/Assistant/cards/packing/packingParts.tsx +++ b/client/src/components/Assistant/cards/packing/packingParts.tsx @@ -58,13 +58,13 @@ function BagSwatch({ bag, size = 'row' }: { bag: PackingCardBag | undefined; siz /** A row's quantity and weight: quiet figures at its end, no frame each. */ const QUIET = 'text-caption tabular-nums text-content-muted'; -/** How many rows a group holds, quiet beside its name. */ +/** How many rows a group holds, a white pill at the end of its band. */ function GroupCount({ count }: { count: number }) { const { t } = useTranslation(); return ( {count} @@ -231,7 +231,7 @@ function BagHead({ }) { const { t } = useTranslation(); if (!bag) { - const badge = inChange ? undefined : ; + const badge = ; const lead = ; return ; } @@ -298,7 +298,7 @@ export function PackingGroup({ } + badge={} people={group.assignees} removed={group.assigneesRemoved} />