refactor(ui): move 62 hand-written empty states onto EmptyState

The admin sections, the cycle, illness, medication, mood, records and
settings cards, the pickers and dialogs said nothing-here-yet in a
hand-written muted paragraph in five sizes and three alignments. List
and section states now render through EmptyState (plain, compact; the
three with a next step carry it as the action), and the six chart
bodies through ChartEmptyState at their former height. The thirteen
that stay are a field without a value or a hint inside an editor, not
a list state. The ratchet ceiling drops from 75 to 13.
This commit is contained in:
Marc-André Bombeck committed 2026-10-20 13:31:02 +02:00
1 parent fe021c0ffd
commit e7ee416e19
56 files changed
+353 -224

No files matched your search

@@ -22,6 +22,7 @@ import {
type LeafScope,
type Translate,
} from "./report-sections";
import { EmptyState } from "@/components/ui/empty-state";
/**
* Only the three stored gender values get a label. A row on a clinical
@@ -240,9 +241,11 @@ export function EmergencySection({
{t("clinicianView.sectionUnavailable")}
</p>
) : rows.length === 0 ? (
<p className="text-muted-foreground text-sm">
{t("clinicianView.sectionEmpty")}
</p>
<EmptyState
variant="plain"
size="compact"
title={t("clinicianView.sectionEmpty")}
/>
) : (
rows.map((row) => (
<StatRow
+6 -3
View File
@@ -34,6 +34,7 @@ import {
type ReportLeafId,
} from "@/lib/report-selection/catalogue";
import type { ReportSelection } from "@/lib/report-selection/selection";
import { EmptyState } from "@/components/ui/empty-state";
export type Translate = (
key: string,
@@ -185,9 +186,11 @@ export function LeafSection({
{t("clinicianView.sectionUnavailable")}
</p>
) : empty ? (
<p className="text-muted-foreground text-sm">
{t("clinicianView.sectionEmpty")}
</p>
<EmptyState
variant="plain"
size="compact"
title={t("clinicianView.sectionEmpty")}
/>
) : (
children
)}