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

+2 -3
View File
@@ -34,6 +34,7 @@ import { dateKeyOfInstant } from "../day/day-url";
import type { LabResultDto } from "./types";
import { useLabNumber } from "./use-lab-format";
import { Segmented } from "@/components/ui/segmented";
import { ChartEmptyState } from "@/components/charts/chart-empty-state";
/**
* v1.18.1 — per-biomarker trend chart, in the dashboard's visual language.
@@ -265,9 +266,7 @@ export function LabBiomarkerChart({
</div>
{points.length === 0 ? (
<p className="text-muted-foreground py-10 text-center text-sm">
{t("labs.chart.empty")}
</p>
<ChartEmptyState title={t("labs.chart.empty")} height={160} />
) : (
<div>
<div
+6 -3
View File
@@ -13,6 +13,7 @@ import { queryKeys } from "@/lib/query-keys";
import { LabHistoryList } from "./lab-history-list";
import type { LabResultDto, LabResultListResponse } from "./types";
import { EmptyState } from "@/components/ui/empty-state";
// Page size for the offset-paginated reading feed. The server caps a single
// read at 500 (`listLabResultsSchema`); this stays well under that and keeps
@@ -77,9 +78,11 @@ export function LabValuesList({ biomarkerId }: { biomarkerId: string }) {
if (readings.length === 0) {
return (
<p className="text-muted-foreground py-8 text-center text-sm">
{t("labs.detail.emptyTitle")}
</p>
<EmptyState
variant="plain"
size="compact"
title={t("labs.detail.emptyTitle")}
/>
);
}