Commit graph

12 commits

Author SHA1 Message Date
5941733af1 Sheets phase D: sheets on spreads as linked Sheet cards
- A Sheet card can show a sheet file (sheet, prefix): first-tab preview,
  Open sheet with a way back, the spread's Play/Build in the editor.
- Rolls read and write "Use in tables" boxes as @name or @prefix_name;
  locked boxes and formulas/lists keep their values; changed boxes glow.
- A roll reaching the card shows the sheet's text (SheetText) in the
  tray; text boxes also show spread values when on the spread.
- Old template Sheet cards migrate to a sheet with one text box (not in
  Help demos). Card palette lists your sheets.
- Sheet canvas: tiled grid (smooth panning); boxes no longer overlap
  (nearest free spot, drags stop short; Alt places freely).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 16:52:41 -06:00
dd0323c53f Sheets phase C: every field kind, details panel, canvas panning
- 25 palette items over 23 kinds: basics, trackers (bars, ticks, clocks,
  dots, step/usage dice, ladders), formulas and dice buttons (rule
  language with sheet @names), lists (rows, mini table, chips, point pool
  that may go negative, bonds), slots, conditions, spell slots, XP,
  currency, heading, divider, picture.
- Per-kind settings in the inspector; hover excerpts and an in-app
  details panel for list entries; live redraw of dependent boxes.
- Canvas: the page stays put after edits (boxes can go anywhere), a
  screen of room past the boxes, drag-to-pan and edge scrolling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 16:28:04 -06:00
2661744b06 Sheets phase B: main menu, Sheets list, sheet editor
- Main menu (Spreads, Sheets, Settings, Quit) on the theme background,
  with recent spreads and sheets; logo or ☰ returns to it.
- Sheets: data model, store, templates, snapshot undo; New sheet dialog
  (blank or a template); editor with folder tabs, snap-grid canvas on the
  spread background, field palette, inspector, Play/Build, status strip.
- Field kinds: Number, Text box (BBCode, live {@name}), Heading.
- PaletteList shared by the card and field palettes; shared top bar brand.
- Keys go to the screen that shows; theme reloads keep the screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 15:53:56 -06:00
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
1735ed09fd Card threads, Morgan's welcome, and typing/scroll/wheel papercuts
- Card threads: a port on each card's bottom edge. Plain runs after any
  result (once the result's own threads finish); Otherwise runs only when
  no thread of the result ran. Saved as card_threads (LOGIC.md 3g).
- Typing on long cards no longer rebuilds the inspector or the card per
  key (~175 ms -> ~7 ms). Timing tool: tests/perf_typing.gd.
- "+ Add result" scrolls to the new row and focuses it.
- Mouse wheel zooms; Shift+wheel pans sideways; scrolling lists keep it.
- "SPREAD" caption over the switcher; Morgan's first-run welcome.
- docs/MECHANICS.md: checklist of table mechanics for planning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:41:13 -06:00
6027173ca3 Size audit: split main_cli, pipe_layer and main_rolling
main_cli: group/template/inspector flags -> MainCliBuild, --perf -> MainCliPerf.
pipe_layer: batched unlit threads -> PipeBatch, curve/dash maths -> PipeGeometry.
main_rolling: session seeding -> MainRollingSeed, copy-as-text -> MainRollingCopy.
Public methods keep one-line delegators; no behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 13:19:33 -06:00
b1616373be Help: topics for every new feature, a cheat sheet, and Try a demo spreads
Twelve new Help topics (menus, selecting and resizing, nested groups,
themes, List view, the Book, rolling more than once, pausing, costs,
one table adjusting another, sheets and saving, pictures, phones), and a
Keyboard shortcuts topic split into keys, mouse and touch. Topics with
[demo]key[/demo] get a 'Try a demo spread' link: DemoSpreads builds a
small example, DemoMode shows it unsaved and unlisted with Keep a copy
and Back to my spread. --demo=KEY opens one from the command line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:24:57 -06:00
193794a9e0 The Book: reusable results (Pages) to drag onto tables
BookPage (text with BBCode, details, tags, a name) lives in the spread file
under "book"; a result linked to a page (TableEntry.page) follows its
text and details, so one edit reaches every copy. The Book panel (View ▾,
☰ or right-click) lists pages with search over names, text and tags, and
edits the selected page with a live preview. Drag a page onto a result to
link it, or onto a card to add it as a new result. The inspector offers
Save to the Book, or shows the page with Unlink; editing a result's own
text unlinks it; linked rows show a §. Undo covers the Book.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:02:46 -06:00
0ede1d7cd1 List view: the spread as a list with folders
A left-docked panel (View ▾ → List view, ☰ or right-click the spread)
lists every card, with groups as folders. Rows show threads in and out
(hover for where they lead) and a Roll cell; click selects in Build,
double-click shows the card on the spread, right-click opens its menu.
Drag to reorder (the spread's own order, saved and undoable), onto a
folder to move in, folder into folder to nest. Own search, + Folder,
resizable edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 18:50:32 -06:00
8f16d337cf UI pass: striped rows, View/Help menus, zoom control, card ⋯ menu, fuller sample
- Striped result rows (parchment tint, on by default, `striped_rows` setting).
- Top bar: View ▾ (Plain words / Rule text, Collapse/Expand all, Striped rows,
  Minimap) and a "− 90% ▾ +" zoom control replace the Plain|Text switch,
  Collapse all, −/Fit/+ and Map. Arrange ▾ folds into Board ▾; Search is an icon.
- Help ▾ and F1 open a Help window; the 17 topics live in help/topics.txt.
- Build cards get a ⋯ menu (settings, template, collapse, delete) instead of
  the gear and footer Delete, sharing Style.overflow_button with group cards.
  Row × buttons show only on hover, focus or selection.
- Sample: Luck value card, Make Camp (pick card) and Search the Ruins
  (1d6 + Luck, with results only a modifier reaches).
- New test suite test_top_bar; Canvas/GraphML round-trip tests compare plain
  tables only, since logic keys are JSON-only.
- DESIGN.md: open items, including the Card Mode UI redesign.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 10:36:38 -06:00
0f3e8c278f Remove duplicated code found by the coderstanding audit
- Style.menu_button / font_colors / field_colors replace five copies of the
  "copy a bar button's skin onto a MenuButton" block, nine single-colour
  font loops and four field colour blocks.
- GroupCard uses TableCard.vbox/hbox instead of its own copies.
- InspectorKit.focused_tag / clear / refocus / as_text_link replace the
  focus-keeping render frame and "Edit as text" link shared by the
  condition and effects builders.
- InspectorCard._setting_line replaces three copies of a bound setting field.
- Main.file_dialog / export_dialog replace four FileDialog setups.
- JsonIO.entry_line / finish_import replace copies in canvas_io,
  dot_exporter and graphml_io.
- Dead code: TableCard's unused inline-editor fields and the no-op
  --edit-details / --edit-effects flags, an unused error counter in the
  tray, and an unreachable "settings not available" fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:21:26 -06:00
0202312688 Split ui/main.gd into area helpers (no behaviour change)
Main (3679 lines) becomes a shell: shared state, start-up, cards, input,
rules view and one-line delegators for the methods other files call. Each
area moves with its state into a RefCounted helper holding a back-reference
(m: Main):

  main_cli.gd          command-line and screenshot flags
  main_top_bar.gd      top bar, toast, endless-loop chip
  main_editing.gd      add/delete cards, results and pipes, selection bar
  main_groups.gd       groups and card drags
  main_templates.gd    templates
  main_rolling.gd      rolling, choice questions, playback, session seed, copy
  main_collections.gd  collections, import/export, table settings, test board
  main_state.gd        decks, variables, roll history (local state)
  main_navigation.gd   search, focus, minimap, arrange/pack
  main_history.gd      undo/redo and mark_dirty
  main_inspector.gd    inspector selection and refresh

Tests that reached moved private members now go through the helper
(main.undo_redo.edits, main.rolling.pending_choice(), ...).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:14:19 -06:00