From bba8921ec9076797ff1b23c7fcc8687fc2d96910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 15 May 2026 18:41:52 +0200 Subject: [PATCH] chore(measurements,medications): apply the tap-target floor across list and form surfaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- messages/de.json | 6 ++++- messages/en.json | 6 ++++- messages/es.json | 6 ++++- messages/fr.json | 6 ++++- messages/it.json | 6 ++++- messages/pl.json | 6 ++++- .../measurements/measurement-form.tsx | 2 +- .../measurements/measurement-list.tsx | 21 ++++++++++-------- .../medications/SideEffectsSection.tsx | 2 +- .../medications/intake-history-list.tsx | 22 +++++++++++-------- .../medications/inventory-section.tsx | 12 +++++----- 11 files changed, 62 insertions(+), 33 deletions(-) diff --git a/messages/de.json b/messages/de.json index 25fffb059..1f2c33c77 100644 --- a/messages/de.json +++ b/messages/de.json @@ -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.", diff --git a/messages/en.json b/messages/en.json index e0808411f..24028f55c 100644 --- a/messages/en.json +++ b/messages/en.json @@ -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.", diff --git a/messages/es.json b/messages/es.json index d1e5932c7..3895363d7 100644 --- a/messages/es.json +++ b/messages/es.json @@ -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.", diff --git a/messages/fr.json b/messages/fr.json index c5265b844..cec73d37c 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -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.", diff --git a/messages/it.json b/messages/it.json index 355c28639..efdf9a5df 100644 --- a/messages/it.json +++ b/messages/it.json @@ -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.", diff --git a/messages/pl.json b/messages/pl.json index 188261067..9694aa017 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -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.", diff --git a/src/components/measurements/measurement-form.tsx b/src/components/measurements/measurement-form.tsx index 18fe636d6..75b3c7697 100644 --- a/src/components/measurements/measurement-form.tsx +++ b/src/components/measurements/measurement-form.tsx @@ -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")} > diff --git a/src/components/measurements/measurement-list.tsx b/src/components/measurements/measurement-list.tsx index 45da4bf66..9c48f2480 100644 --- a/src/components/measurements/measurement-list.tsx +++ b/src/components/measurements/measurement-list.tsx @@ -370,13 +370,12 @@ export function MeasurementList({ onEdit, onAddFirst }: MeasurementListProps) { typeFilter !== "ALL" ? ( ) : onAddFirst ? ( - @@ -537,14 +536,14 @@ export function MeasurementList({ onEdit, onAddFirst }: MeasurementListProps) { deleteMutation.mutate(m.id)} /> @@ -567,17 +566,21 @@ export function MeasurementList({ onEdit, onAddFirst }: MeasurementListProps) {
@@ -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; diff --git a/src/components/medications/SideEffectsSection.tsx b/src/components/medications/SideEffectsSection.tsx index 2a46af052..c05054cc7 100644 --- a/src/components/medications/SideEffectsSection.tsx +++ b/src/components/medications/SideEffectsSection.tsx @@ -302,7 +302,7 @@ export function SideEffectsSection({ medicationId }: SideEffectsSectionProps) { startEdit(event)} aria-label={t("common.edit")} > - + @@ -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({ diff --git a/src/components/medications/inventory-section.tsx b/src/components/medications/inventory-section.tsx index ae14f36d8..3d6b55f56 100644 --- a/src/components/medications/inventory-section.tsx +++ b/src/components/medications/inventory-section.tsx @@ -328,9 +328,8 @@ export function InventorySection({
{item.state === "ACTIVE" && (
))}