From 2f8fd66812465f93fdcb6c7245cd571a5ab71570 Mon Sep 17 00:00:00 2001 From: moh Date: Sun, 20 Sep 2026 17:16:52 +0200 Subject: [PATCH] STYLED - Simplify and compact the add-project form Reorganize the project form for a lighter, more professional flow without touching field names or the save action (all data preserved): - LocaleInputs: drop the per-locale card wrappers for a tight 3-column labelled grid; shorter textareas. - Sections and Assets: collapse each item into an accordion (closed by default) and show a proper empty state when there are none. - Slim the header to badges + title + a compact progress indicator instead of a stats grid; drop the assets stats sidebar. - Tighten section paddings/spacing (lg -> md) throughout. All 375 tests pass; tsc and eslint clean. --- components/admin/portfolio-project-form.tsx | 555 ++++++++++---------- 1 file changed, 289 insertions(+), 266 deletions(-) diff --git a/components/admin/portfolio-project-form.tsx b/components/admin/portfolio-project-form.tsx index 37a5f3e..98b0fd4 100644 --- a/components/admin/portfolio-project-form.tsx +++ b/components/admin/portfolio-project-form.tsx @@ -9,7 +9,6 @@ import { CalendarDays, CheckCircle2, CircleAlert, - Files, FolderTree, Grid2x2, ImagePlus, @@ -25,7 +24,12 @@ import { type ReactNode, useEffect, useRef, useState } from "react"; import { useFormStatus } from "react-dom"; import { MediaFieldPicker, type MediaFieldState } from "@/components/admin/media-field-picker"; -import { StatsCard } from "@/components/dashboard/stats-card"; +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, +} from "@/components/ui/accordion"; import { AppCard } from "@/components/ui/app-card"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; @@ -293,34 +297,32 @@ function LocaleInputs({ multiline?: boolean; }) { return ( -
-
+
+

{title}

+
{locales.map((locale) => ( - -

{locale.label}

+
+ + {locale.label} + {multiline ? (