mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
chore(measurements,medications): apply the tap-target floor across list and form surfaces
Lift the icon-button and pagination controls on the list + form surfaces under `/measurements` and `/medications` so every touch target clears the 44 px WCAG 2.5.5 floor. - `measurement-list.tsx`: mobile-row edit + delete buttons `size-8` → `size-11`; pagination chevrons `size="sm"` → `size="icon" size-11` with translated `aria-label`; edit-dialog kebab `h-9 w-9` → `size-11`; `DeleteButton` default `h-8 w-8` → `size-11`. Empty-state CTAs drop `size="sm"` so they sit at the default 40 px primitive height. - `measurement-form.tsx`: reset kebab `h-9 w-9` → `size-11`. - `intake-history-list.tsx`: desktop + mobile per-row edit + delete buttons `size-8` → `size-11`; pagination chevrons → `size-11` icon-buttons; edit-dialog kebab → `size-11`; shared `DeleteButton` in this file → `size-11`. - `SideEffectsSection.tsx`: per-entry delete `h-7 w-7` → `size-11`. - `inventory-section.tsx`: live-pen "mark as in use" / "mark as used up" pills drop `size="sm"`/`h-7` so they sit at `min-h-11`; past-pen delete `h-6 w-6` → `size-11` icon-button. Adds `measurements.previousPage` / `measurements.nextPage` and `medications.previousPage` / `medications.nextPage` translation keys so the pagination icon-buttons carry accessible labels in every locale.
This commit is contained in:
1 parent
95bc87f5ab
commit
bba8921ec9
11 files changed
+62
-33
No files matched your search
+5
-1
@@ -348,7 +348,9 @@
|
||||
"actions": "Aktionen",
|
||||
"deleteConfirmTitle": "Messwert löschen?",
|
||||
"deleteConfirmDescription": "Dieser Messwert wird unwiderruflich gelöscht.",
|
||||
"pageInfo": "Seite {page} von {total}"
|
||||
"pageInfo": "Seite {page} von {total}",
|
||||
"previousPage": "Vorherige Seite",
|
||||
"nextPage": "Nächste Seite"
|
||||
},
|
||||
"mood": {
|
||||
"title": "Stimmung",
|
||||
@@ -713,6 +715,8 @@
|
||||
"noIntakesYet": "Noch keine Einnahmen vorhanden",
|
||||
"actions": "Aktionen",
|
||||
"pageInfo": "Seite {page} von {total}",
|
||||
"previousPage": "Vorherige Seite",
|
||||
"nextPage": "Nächste Seite",
|
||||
"loginRequiredIntakes": "Bitte anmelden, um Einnahmen zu sehen.",
|
||||
"phaseConfig": "Erinnerungsphasen",
|
||||
"phaseConfigDescription": "Konfiguriere die Zeitpunkte für Erinnerungen.",
|
||||
|
||||
+5
-1
@@ -348,7 +348,9 @@
|
||||
"actions": "Actions",
|
||||
"deleteConfirmTitle": "Delete measurement?",
|
||||
"deleteConfirmDescription": "This measurement will be permanently deleted.",
|
||||
"pageInfo": "Page {page} of {total}"
|
||||
"pageInfo": "Page {page} of {total}",
|
||||
"previousPage": "Previous page",
|
||||
"nextPage": "Next page"
|
||||
},
|
||||
"mood": {
|
||||
"title": "Mood",
|
||||
@@ -713,6 +715,8 @@
|
||||
"noIntakesYet": "No intakes recorded yet",
|
||||
"actions": "Actions",
|
||||
"pageInfo": "Page {page} of {total}",
|
||||
"previousPage": "Previous page",
|
||||
"nextPage": "Next page",
|
||||
"loginRequiredIntakes": "Please sign in to view intakes.",
|
||||
"phaseConfig": "Reminder phases",
|
||||
"phaseConfigDescription": "Configure timing for reminders.",
|
||||
|
||||
+5
-1
@@ -347,7 +347,9 @@
|
||||
"actions": "Acciones",
|
||||
"deleteConfirmTitle": "Delete measurement?",
|
||||
"deleteConfirmDescription": "This measurement will be permanently deleted.",
|
||||
"pageInfo": "Page {page} de{total}"
|
||||
"pageInfo": "Page {page} de{total}",
|
||||
"previousPage": "Previous page",
|
||||
"nextPage": "Next page"
|
||||
},
|
||||
"mood": {
|
||||
"title": "Estado de ánimo",
|
||||
@@ -712,6 +714,8 @@
|
||||
"noIntakesYet": "No intakes recorded yet",
|
||||
"actions": "Acciones",
|
||||
"pageInfo": "Page {page} de{total}",
|
||||
"previousPage": "Previous page",
|
||||
"nextPage": "Next page",
|
||||
"loginRequiredIntakes": "Please sign in to view intakes.",
|
||||
"phaseConfig": "Reminder phases",
|
||||
"phaseConfigDescription": "Configure timing for reminders.",
|
||||
|
||||
+5
-1
@@ -347,7 +347,9 @@
|
||||
"actions": "Actions",
|
||||
"deleteConfirmTitle": "Delete measurement?",
|
||||
"deleteConfirmDescription": "This measurement will be permanently deleted.",
|
||||
"pageInfo": "Page {page} de{total}"
|
||||
"pageInfo": "Page {page} de{total}",
|
||||
"previousPage": "Previous page",
|
||||
"nextPage": "Next page"
|
||||
},
|
||||
"mood": {
|
||||
"title": "Humeur",
|
||||
@@ -712,6 +714,8 @@
|
||||
"noIntakesYet": "No intakes recorded yet",
|
||||
"actions": "Actions",
|
||||
"pageInfo": "Page {page} de{total}",
|
||||
"previousPage": "Previous page",
|
||||
"nextPage": "Next page",
|
||||
"loginRequiredIntakes": "Please sign in to view intakes.",
|
||||
"phaseConfig": "Reminder phases",
|
||||
"phaseConfigDescription": "Configure timing for reminders.",
|
||||
|
||||
+5
-1
@@ -347,7 +347,9 @@
|
||||
"actions": "Azioni",
|
||||
"deleteConfirmTitle": "Delete measurement?",
|
||||
"deleteConfirmDescription": "This measurement will be permanently deleted.",
|
||||
"pageInfo": "Page {page} di{total}"
|
||||
"pageInfo": "Page {page} di{total}",
|
||||
"previousPage": "Previous page",
|
||||
"nextPage": "Next page"
|
||||
},
|
||||
"mood": {
|
||||
"title": "Umore",
|
||||
@@ -712,6 +714,8 @@
|
||||
"noIntakesYet": "No intakes recorded yet",
|
||||
"actions": "Azioni",
|
||||
"pageInfo": "Page {page} di{total}",
|
||||
"previousPage": "Previous page",
|
||||
"nextPage": "Next page",
|
||||
"loginRequiredIntakes": "Please sign in to view intakes.",
|
||||
"phaseConfig": "Reminder phases",
|
||||
"phaseConfigDescription": "Configure timing for reminders.",
|
||||
|
||||
+5
-1
@@ -347,7 +347,9 @@
|
||||
"actions": "Akcje",
|
||||
"deleteConfirmTitle": "Delete measurement?",
|
||||
"deleteConfirmDescription": "This measurement will be permanently deleted.",
|
||||
"pageInfo": "Page {page} z{total}"
|
||||
"pageInfo": "Page {page} z{total}",
|
||||
"previousPage": "Previous page",
|
||||
"nextPage": "Next page"
|
||||
},
|
||||
"mood": {
|
||||
"title": "Nastrój",
|
||||
@@ -712,6 +714,8 @@
|
||||
"noIntakesYet": "No intakes recorded yet",
|
||||
"actions": "Akcje",
|
||||
"pageInfo": "Page {page} z{total}",
|
||||
"previousPage": "Previous page",
|
||||
"nextPage": "Next page",
|
||||
"loginRequiredIntakes": "Please sign in to view intakes.",
|
||||
"phaseConfig": "Reminder phases",
|
||||
"phaseConfigDescription": "Configure timing for reminders.",
|
||||
|
||||
@@ -436,7 +436,7 @@ export function MeasurementForm({
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="icon"
|
||||
className="h-9 w-9"
|
||||
className="size-11"
|
||||
disabled={loading}
|
||||
aria-label={t("common.moreOptions")}
|
||||
>
|
||||
|
||||
@@ -370,13 +370,12 @@ export function MeasurementList({ onEdit, onAddFirst }: MeasurementListProps) {
|
||||
typeFilter !== "ALL" ? (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => setTypeFilter("ALL")}
|
||||
>
|
||||
{t("measurements.emptyResetFilter")}
|
||||
</Button>
|
||||
) : onAddFirst ? (
|
||||
<Button size="sm" onClick={onAddFirst}>
|
||||
<Button onClick={onAddFirst}>
|
||||
<Plus className="mr-1 h-4 w-4" />
|
||||
{t("measurements.emptyAddFirst")}
|
||||
</Button>
|
||||
@@ -537,14 +536,14 @@ export function MeasurementList({ onEdit, onAddFirst }: MeasurementListProps) {
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-8 w-8"
|
||||
className="size-11"
|
||||
onClick={() => startEdit(m)}
|
||||
aria-label={t("common.edit")}
|
||||
>
|
||||
<Pencil className="h-3.5 w-3.5" />
|
||||
<Pencil className="h-4 w-4" />
|
||||
</Button>
|
||||
<DeleteButton
|
||||
className="h-10 w-10"
|
||||
className="size-11"
|
||||
onConfirm={() => deleteMutation.mutate(m.id)}
|
||||
/>
|
||||
</div>
|
||||
@@ -567,17 +566,21 @@ export function MeasurementList({ onEdit, onAddFirst }: MeasurementListProps) {
|
||||
<div className="flex gap-1">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
size="icon"
|
||||
className="size-11"
|
||||
disabled={page <= 1}
|
||||
onClick={() => setPage((p) => p - 1)}
|
||||
aria-label={t("measurements.previousPage")}
|
||||
>
|
||||
<ChevronLeft className="h-4 w-4" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
size="icon"
|
||||
className="size-11"
|
||||
disabled={page >= totalPages}
|
||||
onClick={() => setPage((p) => p + 1)}
|
||||
aria-label={t("measurements.nextPage")}
|
||||
>
|
||||
<ChevronRight className="h-4 w-4" />
|
||||
</Button>
|
||||
@@ -672,7 +675,7 @@ export function MeasurementList({ onEdit, onAddFirst }: MeasurementListProps) {
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="icon"
|
||||
className="h-9 w-9"
|
||||
className="size-11"
|
||||
disabled={
|
||||
updateMutation.isPending || deleteMutation.isPending
|
||||
}
|
||||
@@ -795,7 +798,7 @@ function SortableHead({
|
||||
|
||||
function DeleteButton({
|
||||
onConfirm,
|
||||
className = "h-8 w-8",
|
||||
className = "size-11",
|
||||
}: {
|
||||
onConfirm: () => void;
|
||||
className?: string;
|
||||
|
||||
@@ -302,7 +302,7 @@ export function SideEffectsSection({ medicationId }: SideEffectsSectionProps) {
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="text-muted-foreground hover:text-destructive h-7 w-7 shrink-0"
|
||||
className="text-muted-foreground hover:text-destructive size-11 shrink-0"
|
||||
aria-label={t("medications.sideEffects.deleteCta")}
|
||||
onClick={() => {
|
||||
if (
|
||||
|
||||
@@ -434,11 +434,11 @@ export function IntakeHistoryList({
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-8 w-8"
|
||||
className="size-11"
|
||||
onClick={() => startEdit(event)}
|
||||
aria-label={t("common.edit")}
|
||||
>
|
||||
<Pencil className="h-3.5 w-3.5" />
|
||||
<Pencil className="h-4 w-4" />
|
||||
</Button>
|
||||
<DeleteButton
|
||||
label={t("medications.intakeDeleteConfirm")}
|
||||
@@ -484,11 +484,11 @@ export function IntakeHistoryList({
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-8 w-8"
|
||||
className="size-11"
|
||||
onClick={() => startEdit(event)}
|
||||
aria-label={t("common.edit")}
|
||||
>
|
||||
<Pencil className="h-3.5 w-3.5" />
|
||||
<Pencil className="h-4 w-4" />
|
||||
</Button>
|
||||
<DeleteButton
|
||||
label={t("medications.intakeDeleteConfirm")}
|
||||
@@ -512,17 +512,21 @@ export function IntakeHistoryList({
|
||||
<div className="flex gap-1">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
size="icon"
|
||||
className="size-11"
|
||||
disabled={page <= 1}
|
||||
onClick={() => setPage((p) => p - 1)}
|
||||
aria-label={t("medications.previousPage")}
|
||||
>
|
||||
<ChevronLeft className="h-4 w-4" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
size="icon"
|
||||
className="size-11"
|
||||
disabled={page >= totalPages}
|
||||
onClick={() => setPage((p) => p + 1)}
|
||||
aria-label={t("medications.nextPage")}
|
||||
>
|
||||
<ChevronRight className="h-4 w-4" />
|
||||
</Button>
|
||||
@@ -600,7 +604,7 @@ export function IntakeHistoryList({
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="icon"
|
||||
className="h-9 w-9"
|
||||
className="size-11"
|
||||
disabled={
|
||||
updateMutation.isPending || deleteMutation.isPending
|
||||
}
|
||||
@@ -816,10 +820,10 @@ function DeleteButton({
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="text-destructive h-8 w-8"
|
||||
className="text-destructive size-11"
|
||||
aria-label={label}
|
||||
>
|
||||
<Trash2 className="h-3.5 w-3.5" />
|
||||
<Trash2 className="h-4 w-4" />
|
||||
</Button>
|
||||
</AlertDialogTrigger>
|
||||
<AlertDialogContent>
|
||||
|
||||
@@ -328,9 +328,8 @@ export function InventorySection({
|
||||
<div className="flex shrink-0 flex-col gap-1">
|
||||
{item.state === "ACTIVE" && (
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
className="h-7 px-2 text-[10px]"
|
||||
className="min-h-11 px-3 text-xs"
|
||||
onClick={() =>
|
||||
patchMutation.mutate({
|
||||
itemId: item.id,
|
||||
@@ -344,9 +343,8 @@ export function InventorySection({
|
||||
)}
|
||||
{(item.state === "ACTIVE" || item.state === "IN_USE") && (
|
||||
<Button
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
className="h-7 px-2 text-[10px]"
|
||||
className="min-h-11 px-3 text-xs"
|
||||
onClick={() =>
|
||||
patchMutation.mutate({
|
||||
itemId: item.id,
|
||||
@@ -401,14 +399,14 @@ export function InventorySection({
|
||||
)}
|
||||
</div>
|
||||
<Button
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
className="h-6 w-6 p-0"
|
||||
size="icon"
|
||||
className="size-11 shrink-0"
|
||||
onClick={() => deleteMutation.mutate(item.id)}
|
||||
disabled={deleteMutation.isPending}
|
||||
aria-label={t("medications.inventory.delete")}
|
||||
>
|
||||
<Trash2 className="h-3.5 w-3.5" />
|
||||
<Trash2 className="h-4 w-4" />
|
||||
</Button>
|
||||
</li>
|
||||
))}
|
||||
|
||||
Reference in new issue
Block a user