mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 13:52:20 +00:00
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:
1 parent
fe021c0ffd
commit
e7ee416e19
56 files changed
+353
-224
No files matched your search
@@ -31,6 +31,7 @@ import {
|
||||
type ManageCatalog,
|
||||
type ManageTag,
|
||||
} from "./use-mood-tag-manage";
|
||||
import { EmptyState } from "@/components/ui/empty-state";
|
||||
|
||||
/**
|
||||
* v1.17 — archived custom tags for `/settings/mood`. Archiving keeps
|
||||
@@ -109,12 +110,12 @@ export function ArchivedTagsCard({ catalog }: ArchivedTagsCardProps) {
|
||||
</p>
|
||||
|
||||
{archived.length === 0 ? (
|
||||
<p
|
||||
className="text-muted-foreground text-sm"
|
||||
<EmptyState
|
||||
variant="plain"
|
||||
size="compact"
|
||||
title={t("mood.manage.archivedEmpty")}
|
||||
data-slot="mood-archived-empty"
|
||||
>
|
||||
{t("mood.manage.archivedEmpty")}
|
||||
</p>
|
||||
/>
|
||||
) : (
|
||||
<div className="space-y-2">
|
||||
{archived.map((tag) => {
|
||||
|
||||
@@ -81,6 +81,7 @@ import {
|
||||
type ManageCatalog,
|
||||
type MoodTagLayoutResolved,
|
||||
} from "./use-mood-tag-manage";
|
||||
import { EmptyState } from "@/components/ui/empty-state";
|
||||
|
||||
/**
|
||||
* v1.17 — group management card for `/settings/mood`. Lists every
|
||||
@@ -245,12 +246,12 @@ export function TagGroupsCard({ catalog }: TagGroupsCardProps) {
|
||||
</div>
|
||||
|
||||
{customGroupCount === 0 && (
|
||||
<p
|
||||
className="text-muted-foreground text-sm"
|
||||
<EmptyState
|
||||
variant="plain"
|
||||
size="compact"
|
||||
title={t("mood.manage.groupEmpty")}
|
||||
data-slot="mood-groups-empty"
|
||||
>
|
||||
{t("mood.manage.groupEmpty")}
|
||||
</p>
|
||||
/>
|
||||
)}
|
||||
|
||||
<DndContext
|
||||
|
||||
@@ -74,6 +74,7 @@ import {
|
||||
type ManageTag,
|
||||
type MoodTagLayoutResolved,
|
||||
} from "./use-mood-tag-manage";
|
||||
import { EmptyState } from "@/components/ui/empty-state";
|
||||
|
||||
/**
|
||||
* v1.17 — per-group tag management for `/settings/mood`. Mirrors the
|
||||
@@ -317,7 +318,7 @@ export function TagManagerCard({ catalog }: TagManagerCardProps) {
|
||||
</div>
|
||||
|
||||
{visible.categories.length === 0 && (
|
||||
<p className="text-muted-foreground text-sm">{t("common.noData")}</p>
|
||||
<EmptyState variant="plain" size="compact" title={t("common.noData")} />
|
||||
)}
|
||||
|
||||
{visible.categories.map((category) => {
|
||||
|
||||
Reference in new issue
Block a user