From 571687086367d1a12642db728bcbfd4d3c1af2ea Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Thu, 3 Sep 2026 00:44:59 +0700 Subject: [PATCH] Redesign create-crew into a guided, idiotproof wizard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Audit finding: the crew form was one 1,100-line endless scroll with ~15 sections in a punishing order (logo dead-last, MLS chat coordinator sitting inline with the crew name), only one validation gate, and no sense of progress or what's optional. Fix — split the flow by intent: - Create mode: a guided 4-step wizard with a sticky progress bar, per-step hints, Back/Continue + "Skip to end", and a sticky footer nav. 1. The Basics — logo, name, about, home turf (all you actually need) 2. Identity & Vibe — vibe tags, crew type 3. Squad & Spots — members/roles, home spots, open call 4. Extras — treasury, video, sponsor, links, band, NIP-05, agent, and the advanced chat coordinator (reframed in plain language, clearly skippable) Only the crew name is gated, and only at step 1. Clickable step dots allow jumping back freely. - Edit mode: unchanged UX intent — renders every section flat on one page (power users want it all at once). All field state and the entire publish/handleSubmit logic are preserved verbatim; sections were extracted into composable blocks with zero behavior change. Softened the coordinator copy and the map-pin section so a first-timer isn't scared off. Co-authored-by: shakespeare.diy --- src/components/CrewForm.tsx | 388 +++++++++++++++++++++++++++-------- src/pages/CreateCrewPage.tsx | 2 +- 2 files changed, 303 insertions(+), 87 deletions(-) diff --git a/src/components/CrewForm.tsx b/src/components/CrewForm.tsx index 844435a..3e1478b 100644 --- a/src/components/CrewForm.tsx +++ b/src/components/CrewForm.tsx @@ -1,4 +1,4 @@ -import { useState, useEffect } from 'react'; +import { useState, useEffect, type ReactNode } from 'react'; import { nip19 } from 'nostr-tools'; import ngeohash from 'ngeohash'; import { useNavigate } from 'react-router-dom'; @@ -153,6 +153,12 @@ export function CrewForm({ existing }: CrewFormProps) { const { mutateAsync: uploadFile, isPending: isUploading } = useUploadFile(); const { toast } = useToast(); + // Create flow = guided wizard; edit flow = flat single page (power users + // want everything at once). The wizard staggers the ~15 sections into 4 + // digestible steps so a first-timer can spin up a crew in seconds. + const isEditing = !!existing; + const [step, setStep] = useState(0); + const [name, setName] = useState(existing?.name ?? ''); const [bio, setBio] = useState(existing?.bio ?? ''); const [location, setLocation] = useState(existing?.location ?? ''); @@ -488,26 +494,76 @@ export function CrewForm({ existing }: CrewFormProps) { } }; - return ( -
- - - - {existing ? 'Edit Crew' : 'Crew Details'} - - Your crew's identity, home turf and members - - -
- - setName(e.target.value)} className="bg-gray-800 border-gray-700" /> -
+ // ─── Section blocks ───────────────────────────────────────────────────── + // Each visible field group is a self-contained element that closes over the + // component's state. They're composed into wizard steps (create) or one flat + // scroll (edit) below — no field or publish logic changes between modes. -
- -