docs: record Lab offer form polish (drafts, progress, validation, URLs)

This commit is contained in:
SkateSpots 2026-10-04 11:39:39 +07:00
parent 3d52f07144
commit 6a0b0695ee

View file

@ -129,6 +129,20 @@ session with **no other memory of this project**. So:
`/lab` shows a **"Your Lab profiles"** strip. `main.tsx`'s clean-link shim now
also rewrites `/coach/<pubkey>/<d>`. Still open: draft/autosave and a
multi-step layout.
- **Lab offer form polish (2026-10-04, part 2):** four more gaps closed.
**Drafts:** `hooks/useLabDraft` autosaves the form snapshot to localStorage
(content-debounced) and only offers it as resumable when it *differs* from the
current state (so opening an existing profile never shows a spurious banner
and a draft can't clobber a fresh load); `LabDraftBanner` gives Resume /
Discard; clears on publish. **Progress:** `LabProfileProgress` is a
completeness bar (photo/bio/skills/rate/location/contact) — a progress
indicator, not a wizard. **Validation:** `CraftProfileForm` + the coach page
split contact validation into per-field inline errors (+ red border) and
**scroll to the first invalid field / the skills grid** on submit; required
skill sections show an inline message after a submit attempt. **URLs:** Lab
profiles now live at **`/lab/<craft>/<pubkey>/<id>`** (`lib/labRoutes.ts`
builds it; `/coach/...` still resolves). The bespoke pages have inline contact
errors but not the scroll-to behavior (yet).
- **Photos**: `PhotoDropzone` (`src/components/PhotoDropzone.tsx`) is the shared
image input — **drag & drop + multi-select**, emits `File[]` to its caller
(which owns uploads/toasts). Used by `CreateSpotPage`, `EditSpotPage` and