davidherran abd75798ef
Deploy to VPS / deploy (push) Has been cancelled
feat: timeline + heritage HQ panels — drag-drop + inline auto-save
Bringing the same UX pattern we shipped on Hero and Settings to the
Company Legacy and Our Heritage panels. No more modal-driven editing
where you have to click "Edit" → modify → click "Save" → wait → close
modal. Every field is now editable in place; saves fire on blur and
flash a "Saved ✓" confirmation; rows reorder via drag-drop.

NEW SERVER ACTIONS (additive — old formData-style actions still exist)
- timeline/actions.ts:
    patchTimelineEvent(id, partial)        — granular field update
    reorderTimelineEvents(ids[])           — single transaction
    createTimelineStub()                   — instant blank row
- heritage/actions.ts:
    patchHeritageSection(id, partial)      — granular field update
    reorderHeritageSections(ids[])         — single transaction
    createHeritageStub(type)               — text/image/video stubs

PAGES REWRITTEN
- timeline/page.tsx: 208 → 215 lines, but radically simpler — drag
  handle + inline year input + inline title + inline description
  textarea per row, plus eye toggle for isActive and a trash button.
  Global "Auto-translate edits" checkbox at top applies to every patch.
- heritage/page.tsx: 209 → 270 lines (more functionality fits in less
  cognitive load). Three coloured "Add" buttons (Text / Image / Video)
  spawn a stub that renders the right card type. Image/Video cards have
  a built-in MediaPicker with upload-or-paste-filename + live preview.

UX UPGRADES THE EDITOR SEES
- Type-and-tab to save. No modals, no submit buttons per row.
- Saving / Saved ✓ badge per row so it's obvious when a field has
  hit the database.
- Drag handle + drop target on every card → reordering becomes
  "grab and pull", same metaphor as Hero slides.
- AI translation is one toggle at the top, not a per-modal switch.
- Soft-warning empty state with a clear "do this first" hint instead
  of a blank page.

NO BREAKING CHANGES
- Old createTimelineEvent / updateTimelineEvent / createHeritageSection
  / updateHeritageSection actions are kept (in case anything still
  imports them — nothing in the repo does, but external scripts
  might). Internal call sites all use the new patch flow.
- Database schema unchanged.
- Public-facing /heritage page unchanged.
2026-05-05 12:28:57 -05:00
2026-04-16 10:29:20 -05:00
S
Description
No description provided
499 MiB
Languages
TypeScript 98.1%
JavaScript 0.9%
Dockerfile 0.4%
Shell 0.4%
CSS 0.2%