From 4038a34ae65a81236c3c6036a2b3b823328c1c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 7 Jun 2026 19:48:50 +0200 Subject: [PATCH] fix(data-list): lift the selection bar above the mobile nav and fix tap targets The page-scoped selection bar sat sticky bottom-2, behind the fixed 64px mobile bottom-nav, so the destructive Delete (N) button was unreachable on phones and ignored the iOS home-indicator inset. Lift it to clear the nav band + safe area on mobile and drop back to bottom-4 at sm+ where the nav is hidden. The per-row select checkbox wrapped a Radix checkbox (a 16px button) in a 44px label; a label does not forward taps to a button, so the effective target failed WCAG 2.5.5. Make the 44px area a single button that owns the toggle, with the checkbox a pointer-events-none controlled visual, avoiding any double-toggle. Bring the mood pagination buttons to the 44px target used by the measurements list. Add (sort: Desc) to the two source-filter indexes so the schema matches the DESC migration SQL; schema-fidelity only, no new migration. --- messages/de.json | 2 ++ messages/en.json | 2 ++ messages/es.json | 2 ++ messages/fr.json | 2 ++ messages/it.json | 2 ++ messages/pl.json | 2 ++ prisma/schema.prisma | 4 +-- .../data-list/selection-action-bar.tsx | 10 +++++- .../measurements/measurement-list.tsx | 25 +++++++++++--- src/components/mood/mood-list.tsx | 34 +++++++++++++++---- 10 files changed, 71 insertions(+), 14 deletions(-) diff --git a/messages/de.json b/messages/de.json index fa3052963..6c5c6e4b1 100644 --- a/messages/de.json +++ b/messages/de.json @@ -546,6 +546,8 @@ "deleteConfirmTitle": "Eintrag löschen?", "deleteConfirmDescription": "Dieser Stimmungseintrag wird unwiderruflich gelöscht.", "pageInfo": "Seite {page} von {total}", + "previousPage": "Vorherige Seite", + "nextPage": "Nächste Seite", "loginRequired": "Bitte anmelden, um Stimmungseinträge zu sehen.", "note": "Notiz", "notePlaceholder": "Notiz dazu, wie du dich fühlst…", diff --git a/messages/en.json b/messages/en.json index 1ff732096..547a0a04e 100644 --- a/messages/en.json +++ b/messages/en.json @@ -546,6 +546,8 @@ "deleteConfirmTitle": "Delete entry?", "deleteConfirmDescription": "This mood entry will be permanently deleted.", "pageInfo": "Page {page} of {total}", + "previousPage": "Previous page", + "nextPage": "Next page", "loginRequired": "Please sign in to view mood entries.", "note": "Note", "notePlaceholder": "Add a note about how you're feeling…", diff --git a/messages/es.json b/messages/es.json index 4cca7a5ac..21c074df3 100644 --- a/messages/es.json +++ b/messages/es.json @@ -546,6 +546,8 @@ "deleteConfirmTitle": "¿Eliminar entrada?", "deleteConfirmDescription": "Esta entrada de estado de ánimo se eliminará de forma permanente.", "pageInfo": "Página {page} de {total}", + "previousPage": "Página anterior", + "nextPage": "Página siguiente", "loginRequired": "Inicia sesión para ver tus estados de ánimo.", "note": "Nota", "notePlaceholder": "Añade una nota sobre cómo te sientes…", diff --git a/messages/fr.json b/messages/fr.json index 9ad5342ad..f6c054532 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -546,6 +546,8 @@ "deleteConfirmTitle": "Supprimer l’entrée ?", "deleteConfirmDescription": "Cette entrée d’humeur sera supprimée définitivement.", "pageInfo": "Page {page} sur {total}", + "previousPage": "Page précédente", + "nextPage": "Page suivante", "loginRequired": "Connecte-toi pour voir tes entrées d’humeur.", "note": "Note", "notePlaceholder": "Ajoutez une note sur votre ressenti…", diff --git a/messages/it.json b/messages/it.json index 063e8b425..e3b55fe43 100644 --- a/messages/it.json +++ b/messages/it.json @@ -546,6 +546,8 @@ "deleteConfirmTitle": "Eliminare la voce?", "deleteConfirmDescription": "Questa voce dell’umore sarà eliminata in modo definitivo.", "pageInfo": "Pagina {page} di {total}", + "previousPage": "Pagina precedente", + "nextPage": "Pagina successiva", "loginRequired": "Accedi per vedere le voci dell’umore.", "note": "Nota", "notePlaceholder": "Aggiungi una nota su come ti senti…", diff --git a/messages/pl.json b/messages/pl.json index 38e9b03d9..afae4ef72 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -546,6 +546,8 @@ "deleteConfirmTitle": "Usunąć wpis?", "deleteConfirmDescription": "Ten wpis nastroju zostanie nieodwracalnie usunięty.", "pageInfo": "Strona {page} z {total}", + "previousPage": "Poprzednia strona", + "nextPage": "Następna strona", "loginRequired": "Zaloguj się, aby zobaczyć wpisy nastroju.", "note": "Notatka", "notePlaceholder": "Dodaj notatkę o swoim samopoczuciu…", diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 3c6d22dd4..5c97ed5da 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -853,7 +853,7 @@ model Measurement { // v1.15.13 — leads with `(userId, source)` so the management list's // source filter + recency sort is an index range scan instead of a // `userId` scan + in-memory sort. See migration 0136. - @@index([userId, source, measuredAt]) + @@index([userId, source, measuredAt(sort: Desc)]) @@index([externalId]) // v1.7.0 — supports the `/api/sync/changes` keyset feed, which walks // `where userId` ordered by `(updatedAt asc, id asc)` with `take @@ -2089,7 +2089,7 @@ model MoodEntry { // v1.15.13 — leads with `(userId, source)` so the mood management // list's source filter + recency sort is an index range scan. See // migration 0136. - @@index([userId, source, moodLoggedAt]) + @@index([userId, source, moodLoggedAt(sort: Desc)]) // v1.7.0 sync — keyset support for the `/api/sync/changes` mood feed // (`where userId` ordered by `(updatedAt asc, id asc)`). @@index([userId, updatedAt, id]) diff --git a/src/components/data-list/selection-action-bar.tsx b/src/components/data-list/selection-action-bar.tsx index 76409da08..f7a48ea36 100644 --- a/src/components/data-list/selection-action-bar.tsx +++ b/src/components/data-list/selection-action-bar.tsx @@ -53,7 +53,15 @@ export function SelectionActionBar({
)} {Icon && (
- {/* v1.15.13 — multi-select checkbox in a 44px target. */} -