From 297f445ab99bfbf43e6bffb06580948b17f9be09 Mon Sep 17 00:00:00 2001 From: riyadhafraa <49757212-riyadhafraa@users.noreply.replit.com> Date: Tue, 19 May 2026 12:14:22 +0000 Subject: [PATCH] Improve dialog design and responsiveness for all admin forms Refactor AdminFormDialog component to use a solid white background, adjust responsive widths based on screen size, and enhance header styling for better clarity and appearance across devices. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: ac415bb1-bc8b-4ad3-8424-7ce717528dde Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/eDmI6vt Replit-Helium-Checkpoint-Created: true --- artifacts/tx-os/src/pages/admin.tsx | 31 ++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/artifacts/tx-os/src/pages/admin.tsx b/artifacts/tx-os/src/pages/admin.tsx index 448e8af4..64e7790c 100644 --- a/artifacts/tx-os/src/pages/admin.tsx +++ b/artifacts/tx-os/src/pages/admin.tsx @@ -397,8 +397,16 @@ function AdminFormDialog({ const { t } = useTranslation(); const titleId = useId(); const subtitleId = useId(); + // #616-followup: responsive widths so the dialog fills the phone + // comfortably (full width minus the 16px gutter) and grows to a + // readable size on tablets / desktop. Old single `max-w-sm` looked + // cramped on iPad and made the inputs feel undersized. const widthClass = - maxWidth === "lg" ? "max-w-lg" : maxWidth === "md" ? "max-w-md" : "max-w-sm"; + maxWidth === "lg" + ? "max-w-[min(100%,640px)] sm:max-w-lg md:max-w-xl" + : maxWidth === "md" + ? "max-w-[min(100%,560px)] sm:max-w-md md:max-w-lg" + : "max-w-[min(100%,480px)] sm:max-w-md"; useEffect(() => { const handleKey = (e: KeyboardEvent) => { if (e.key === "Escape" && !isPending) { @@ -410,10 +418,15 @@ function AdminFormDialog({ return () => window.removeEventListener("keydown", handleKey); }, [isPending, onCancel]); return ( -
{subtitle}
@@ -447,11 +460,11 @@ function AdminFormDialog({