From 6aea504667e23485712c1513cd7728f5ebf70feb Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Thu, 2 Apr 2026 21:21:38 +0200 Subject: [PATCH] fix: improve mobile responsiveness for tablo/project management pages - Make project card grids responsive (single column on mobile, 2 cols on sm) - Remove fixed w-56 card width so cards fill available space on mobile - Convert modals to bottom-sheet style on mobile (items-end, rounded-t-2xl) - Add max-h-[90vh] + overflow-y-auto to modals for small screens - Increase touch targets to min 44px on action buttons and interactive elements - Refactor DashboardTaskList rows from rigid grid to flexible layout - Remove min-w-[600px] wrapper that forced horizontal scroll on task list - Make tab navigation horizontally scrollable instead of wrapping on mobile - Reduce left padding on etape child tasks for narrow screens - Stack modal action buttons vertically on mobile (flex-col-reverse) - Add responsive text sizing for headings and dates - Fix share dialog invite input to stack on mobile Co-Authored-By: Claude Sonnet 4.6 (1M context) --- apps/main/src/components/ActionCard.tsx | 2 +- apps/main/src/components/CreateTabloModal.tsx | 10 +- .../src/components/DashboardActionCards.tsx | 2 +- .../main/src/components/DashboardTaskList.tsx | 90 +++++++------ apps/main/src/components/DeleteTabloModal.tsx | 10 +- apps/main/src/components/ProjectCardList.tsx | 4 +- apps/main/src/components/kanban/TaskModal.tsx | 4 +- apps/main/src/pages/tablo-details.tsx | 123 +++++++++--------- apps/main/src/pages/tablo.tsx | 22 ++-- apps/main/src/pages/tablos.tsx | 12 +- 10 files changed, 140 insertions(+), 139 deletions(-) diff --git a/apps/main/src/components/ActionCard.tsx b/apps/main/src/components/ActionCard.tsx index c7de041..d78fdbc 100644 --- a/apps/main/src/components/ActionCard.tsx +++ b/apps/main/src/components/ActionCard.tsx @@ -32,7 +32,7 @@ export function ActionCard({ onClick={disabled ? undefined : onClick} disabled={disabled} className={cn( - "h-fit p-3 rounded-2xl text-left transition-all", + "h-fit p-3 rounded-2xl text-left transition-all min-h-[56px]", disabled ? "bg-white dark:bg-gray-800 border border-[#EAECF0] dark:border-gray-700 opacity-50 cursor-not-allowed" : isSelected diff --git a/apps/main/src/components/CreateTabloModal.tsx b/apps/main/src/components/CreateTabloModal.tsx index 834e60b..29074b3 100644 --- a/apps/main/src/components/CreateTabloModal.tsx +++ b/apps/main/src/components/CreateTabloModal.tsx @@ -49,9 +49,9 @@ export const CreateTabloModal = ({ onClose, onCreate }: CreateTabloModalProps) = }; return ( -
+
-
+

{t("modals:createTablo.title")}

@@ -81,17 +81,17 @@ export const CreateTabloModal = ({ onClose, onCreate }: CreateTabloModalProps) =
{/* Modal Actions */} -
+
- {/* Title */} -

- {task.title} -

- - {/* Tablo */} -
- {task.tablos && ( - <> -
- - {task.tablos.name.charAt(0).toUpperCase()} + {/* Title + Tablo (stacked on mobile) */} +
+

+ {task.title} +

+
+ {task.tablos && ( + <> +
+ + {task.tablos.name.charAt(0).toUpperCase()} + +
+ + {task.tablos.name} -
- - {task.tablos.name} + + )} + {formattedDate && ( + + {formattedDate} - - )} + )} +
- {/* Date */} - - {formattedDate} - - {/* Status badge */} @@ -151,24 +151,22 @@ export function DashboardTaskList() { return ( <>
-
-

+
+

{t("dashboard.taskList.title")}

-
-
- {myTasks.map((task) => ( - - ))} -
+
+ {myTasks.map((task) => ( + + ))}
diff --git a/apps/main/src/components/DeleteTabloModal.tsx b/apps/main/src/components/DeleteTabloModal.tsx index dd45816..08a9f6b 100644 --- a/apps/main/src/components/DeleteTabloModal.tsx +++ b/apps/main/src/components/DeleteTabloModal.tsx @@ -24,9 +24,9 @@ export const DeleteTabloModal = ({ }; return ( -
+
-
+
{/* Header */}
@@ -70,10 +70,10 @@ export const DeleteTabloModal = ({
{/* Actions */} -
+
)}
-
+
{visibleTablos.map((tablo) => (
{/* ── Metadata bar ──────────────────────────────────────────────── */} -
-
+
+
Rôle : {isAdmin ? "Admin" : "Invité"}
-
+
Créé le : {new Intl.DateTimeFormat("fr-FR", { @@ -436,7 +436,7 @@ export const TabloDetailsPage = () => { }).format(new Date(tablo.created_at))}
-
+
Statut : {statusLabel} @@ -462,7 +462,7 @@ export const TabloDetailsPage = () => { {/* ── Tab navigation ──────────────────────────────────────────────── */}
-
+
{TABS.map((tab) => { const isActive = activeSection === tab.id; return ( @@ -472,7 +472,7 @@ export const TabloDetailsPage = () => { disabled={tab.disabled} onClick={() => !tab.disabled && setSearchParams({ section: tab.id })} className={cn( - "flex items-center gap-2 pb-3 px-1 text-sm font-semibold transition-colors border-b-2", + "flex items-center gap-2 pb-3 px-1 text-sm font-semibold transition-colors border-b-2 shrink-0 min-h-[44px]", isActive ? "text-[#804EEC] border-[#804EEC]" : "text-[#667085] border-transparent hover:text-gray-900 dark:hover:text-gray-100", @@ -824,13 +824,13 @@ export const TabloDetailsPage = () => {
{/* Invite Input */} -
+
setInviteEmail(e.target.value)} placeholder="Email de l'utilisateur" - className="flex-1" + className="flex-1 min-h-[44px]" /> {isInvitingUser ? (
@@ -1027,7 +1027,7 @@ function EtapesSection({ return (
{isAdmin && ( -
+
setNewEtapeTitle(event.target.value)} @@ -1037,11 +1037,12 @@ function EtapesSection({ void handleAddEtape(); } }} - className="h-9 sm:w-80" + className="h-11 sm:h-9 sm:w-80" />
-

+

{etape.title}

{etape.description && ( -

+

{etape.description}

)}
- {etape.due_date && ( -
+ {etape.due_date && ( + + )} + + - - - {new Intl.DateTimeFormat("fr-FR", { - day: "2-digit", - month: "short", - }).format(new Date(etape.due_date))} - -
- )} + {status.label} + - - {status.label} - - - {totalCount > 0 && ( -
-
-
+ {totalCount > 0 && ( +
+
+
+
+ + {doneCount}/{totalCount} +
- - {doneCount}/{totalCount} - -
- )} + )} +
{/* Child tasks + add task */} @@ -1162,7 +1165,7 @@ function EtapesSection({ {childTasks.map((task) => (
{task.status === "done" ? ( @@ -1214,14 +1217,14 @@ function EtapesSection({ )} {childTasks.length === 0 && addingTaskToEtape !== etape.id && ( -
+
Aucune tâche dans cette étape
)} {/* Inline add task */} {addingTaskToEtape === etape.id ? ( -
+
@@ -1252,7 +1255,7 @@ function EtapesSection({ setAddingTaskToEtape(null); setNewTaskTitle(""); }} - className="text-xs text-muted-foreground hover:text-foreground px-2 py-1" + className="text-xs text-muted-foreground hover:text-foreground px-2 py-2 min-h-[36px] shrink-0" > Annuler @@ -1265,7 +1268,7 @@ function EtapesSection({ setAddingTaskToEtape(etape.id); setNewTaskTitle(""); }} - className="flex items-center gap-2 px-5 py-2.5 pl-16 text-sm text-muted-foreground hover:text-[#804EEC] hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors w-full text-left border-t border-gray-100 dark:border-gray-700" + className="flex items-center gap-2 px-3 sm:px-5 py-3 pl-8 sm:pl-16 text-sm text-muted-foreground hover:text-[#804EEC] hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors w-full text-left border-t border-gray-100 dark:border-gray-700 min-h-[44px]" > Ajouter une tâche diff --git a/apps/main/src/pages/tablo.tsx b/apps/main/src/pages/tablo.tsx index 3cbb044..6221881 100644 --- a/apps/main/src/pages/tablo.tsx +++ b/apps/main/src/pages/tablo.tsx @@ -381,7 +381,7 @@ export const TabloPage = () => { }} >
{ @@ -430,11 +430,11 @@ export const TabloPage = () => { {getUserRole(tablo)}
{/* Action buttons */} -
+
) : viewMode === "card" ? ( -
+
{filteredTablos.map((tablo) => ( ) : ( -
- +
+