TableTower/docs/SHEETS.md
RobinFiredrake 16b34c40f6 Card palette: left dock Cards | List, search, click or drag to add
- CardCatalog: one list of card kinds for the palette, right-click New card
  and new-card names; Dice table and Deck are their own items.
- LeftDock holds the palette and List view in the shared dock tab style.
- Play greys the palette under a Switch to Build notice (replaces the
  greyed + Card button); + Card menu removed; Card palette button in Build.
- Templates dropped from the palette land where they are let go.
- Phones: + opens the palette full screen.
- docs/SHEETS.md: the Sheets and unified editor plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 14:58:56 -06:00

58 lines
4.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Sheets and the unified editor: spec and plan
Agreed with the user 2026-11-29. Mockup canvas (design only, not code):
https://claude.ai/code/artifact/4311ebce-47e0-479c-bc1b-40800339b50b
## 1. Goal
A sheet builder for any TTRPG: odd OSR stats, point buy, a vehicle with only description
boxes. Sheets can be used on their own or as a node in a spread, and tables can read and write
them. The new Sheets replace today's Sheet card kind (`RollTable.KIND_SHEET`, a BBCode template):
an old sheet card becomes a sheet with one text box.
## 2. Decisions
- **Main menu:** Spreads / Sheets / Settings / Quit, titles only (no descriptions). Room for more.
- **Sheets standalone or in a spread.** On a spread the node shows a preview of the sheet's
**first tab**. Double-click opens it in an in-app tab (view only in Play).
- **Layout:** free placement with a snap grid; Alt places freely. A sheet has tabs, each its
own canvas. One Play/Build toggle; in a spread, the spread's toggle.
- **Multi-entry boxes** ("repeating section" elsewhere): each box picks rows, mini table or chips.
- **Point pools:** may go negative, shown red. Reuse the result `cost {value, amount}` variable.
- **Details:** hover tooltip (short, cut with "…"); click opens an in-app side panel.
- **Field types:** number, text, notes, checkbox, dropdown; current/max bars, tick rows, clocks;
computed fields, dice buttons; image, heading, divider; dots, step dice, usage dice, ladders;
slot inventory with encumbrance; tag/condition chips, aspects, bonds; spell slots, XP, currency.
- **Tables ↔ sheets:** tables write and read fields. A field gets an @variable only when
"Use in tables" is on. Each field has a lock: locked fields ignore roll writes.
Later: a sheet event triggers a table roll (fumble → critical-failure table).
- **Templates and one-off sheets.** New sheet = blank canvas or one of your templates.
- **Look:** app theme, plus per-box colour and per-sheet tint; frameless boxes.
- **Text:** all BBCode, buttons for common tags, live {@var}, links to Lore Entries.
- **Lore Index:** opens in Play and Build, in spreads and sheets. Holds sheet entries and whole
sheets as items (a rolled sword → a character's inventory). Gains a shared "My library" level
beside "This spread". Drop copies; Shift keeps it linked.
- **Undo/redo** for values and layout. **Export:** share file, PDF/print, PNG.
- **Phone:** Play stacks boxes full width in reading order (top-down, then left-right), with a
manual "Phone order" per box; a Canvas switch shows the real layout with pan/zoom.
## 3. Unified editor (spreads and sheets look alike)
- **Card palette** replaces "+ Card ▾": a left dock with tabs **Cards | List**. Cards has a
search box at the top, grouped kinds, templates as a group; drag onto the spread (click adds
at the view centre). Roll table, Dice table and Deck are separate items (same kind, different
start settings). Right-click › New card stays.
- **Play mode:** the Cards tab stays, greyed, with "Cards are added in Build mode" and a
**Switch to Build** button. This replaces the greyed "+ Card" button.
- **Right dock:** Inspector | Lore Index (as today), same tab style as the left dock.
- **Top bar:** "Board ▾" is renamed "Spread ▾". Later one shared top bar for spreads and sheets.
- **Open documents as tabs** (needed for sheets opened from a spread node).
- Sheet editor uses the same palette (with search) for fields.
## 4. Phases
- **A. Card palette** (branch `card-palette`): left dock Cards | List, search, drag/click to
add, Play-mode notice, remove "+ Card ▾", rename Board ▾ → Spread ▾. Phone: "+" opens a
searchable list.
- **B. Sheets core:** data model + storage (sheets and templates), main menu, Sheets list,
New sheet dialog, sheet editor (tabs, snap canvas, palette, inspector, Play/Build, undo).
- **C. Field types:** basics → trackers → computed and dice → niche kinds.
- **D. Spread integration:** sheet node (first-tab preview), variables read/write, locks,
replace and migrate `KIND_SHEET`, document tabs.
- **E. Lore Index library + items, export (PDF, PNG, share file), phone stacked view.**