Skip to content

Canvas + writing pass: Shift-constrain, theme tints, markdown writing, focus mode#48

Merged
ojowwalker77 merged 3 commits into
release-1.3.0from
refactor-ui
Jul 2, 2026
Merged

Canvas + writing pass: Shift-constrain, theme tints, markdown writing, focus mode#48
ojowwalker77 merged 3 commits into
release-1.3.0from
refactor-ui

Conversation

@ojowwalker77

Copy link
Copy Markdown
Owner

Summary

Follow-up to #46 — the canvas drawing polish and the writing experience pass.

Canvas

  • Shift-to-constrain: drawing or resizing with Shift snaps rectangle→square, ellipse→circle, diamond→uniform; reads modifier flags live (mid-gesture press/release updates immediately). Lines/arrows/freehand stay freeform.
  • Theme-relative element tints: ThemeFlavor.tints (six semantic slots); elements store the slot INDEX so a "green" shape re-resolves per theme. Bottom-bar swatch expands into the tint row; applies to new elements and the selection.

Writing ("make the canvas exceptional at writing")

  • Click = caret on text cards — no select-first ritual; drag still moves, ⇧/⌘ still multi-select.
  • Markdown writing: live-styled headings/bold/italic/code/quotes; lists + checkboxes auto-continue on Enter; checkbox click toggles; done lines dim + strike. Plain text stays the agent-facing source of truth.
  • Cards at rest hide the syntax: bold renders bold, headings lose hashes, - becomes •, checkboxes become ☐/☑; click in and the literal markdown returns.
  • Selection bar: heading/bold/italic/code/quote actions + the ink picker collapsed to one swatch, expanding in place.
  • Focus mode (⇧⌘F / ⌘K): the current card as a centered writing sheet; Esc back to board.

Includes a sync-merge of release-1.3.0 (PR #47 engines work) — currentTint and askEngine coexist in the selection overlays.

Test plan

  • swift test — 61/61 green on the merged tree.
  • Manual: Shift while drawing/resizing each shape; tint slots across all four themes; click-to-caret vs drag-move; markdown typing + list flow + checkbox clicks; static render hides syntax; selection-bar formatting; ⇧⌘F in and out.

…ement tints

- Holding Shift while drawing or resizing snaps rectangle→square,
  ellipse→circle, diamond→uniform; read live off the modifier flags
  (flagsChanged re-emits the draft mid-gesture). Lines, arrows, and
  freehand stay freeform. Resize squares to the larger side anchored at
  the opposite corner.
- Element tints are theme-relative: ThemeFlavor.tints holds six slots in
  fixed semantic order (red…purple); elements store the slot INDEX, so a
  "green" shape re-resolves when the theme changes. Bottom-bar swatch
  expands into the tint row (colors new elements + the selection);
  the text-selection bar carries the same swatches; the live editor
  re-inks non-chip runs immediately.
The plain text with @tokens stays the agent-facing source of truth —
everything here is interaction + display-only styling on top of it.

- Click = caret: a plain click on a text card places the caret and you
  are writing — no select-first ritual. Drag still moves; ⇧/⌘ clicks
  still multi-select; shapes keep click-to-select.
- Markdown writing: live-styled #/##/### headings, **bold**, *italic*,
  `code`, > quotes (syntax kept while editing, markers dimmed); lists
  and checkboxes auto-continue on Enter (numbers increment, empty item
  exits); clicking a checkbox toggles it; done lines dim + strike.
- Cards at rest hide the syntax: bold renders bold, headings lose their
  hashes, "- " becomes a real bullet, checkboxes become ☐/☑ glyphs.
  Click in and the literal markdown returns for editing.
- Selection bar: heading/bold/italic/code/quote actions (toggle-aware,
  undo-safe) plus the ink picker collapsed to the current swatch,
  expanding in place.
- Focus mode (⇧⌘F, also in ⌘K): the current card expands into a
  centered writing sheet at 100% scale; Esc or click-away returns to
  the board.
@ojowwalker77 ojowwalker77 merged commit c780fed into release-1.3.0 Jul 2, 2026
6 checks passed
@github-actions github-actions Bot added size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant