Skip to content

Tables: Draw Table pencil and Table Eraser - #544

Merged
h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
NikitkaRa:feat/draw-table
Oct 14, 2026
Merged

h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
NikitkaRa:feat/draw-table

Conversation

@NikitkaRa

Copy link
Copy Markdown
Contributor

There is no issue for this. It fills the parity row Tables › Draw table (P2), which moves from M to P. Pen style, weight and colour for drawn borders are still to come; #540 adds pen settings for the Borders menu.

Summary

  • Insert › Table › Draw Table turns on a table pencil, which stays on until you pick another tool, as in PowerPoint.
    • Dragging a box on an empty part of the slide makes a one-cell table.
    • Drawing a line inside a table splits the cells it crosses, horizontally or vertically. A row or column is added only where needed; the cells it doesn't cross stay whole (they get a span). A line on an existing grid line splits the merged cells there.
  • Table Design › Draw Borders has Draw Table and Table Eraser. A click with the eraser on a border merges the two cells on either side when together they form a rectangle, and their text is kept.
  • New commands table.drawLine {from, to, id?} and table.eraseLine {at, id?, tol?}, one undo step each.
  • The grid work is pure in engine/src/drawtable.rs. It rebuilds the table from its anchor cells, so existing merges survive, and handles vertical lines by transposing. It rejects non-finite points, snaps to lines within 4 pt, caps the grid at 200 rows and columns, and never panics.
  • The canvas preview shows a flat border line inside a table and an outline for a new table.
  • Ribbon big buttons now carry an accessibility label (`widget_info`), the same one-line change as in Draw: Ink to Shape converts pen strokes into shapes #539.

Test plan

  • Engine unit tests: a full-width line adds a row with the right heights; a vertical line splits only the bottom row and the top cell spans; a line on an existing grid line splits the merged cell; lines on the outer border and NaN are rejected; the size is unchanged; the eraser merges neighbours and keeps text, refuses non-rectangular merges, and works through chained merges; the grid cap holds.
  • kittest: Insert › Table › Draw Table, drag a table, draw a border across and one down the bottom half, giving 2×2 with the top cell merged; then Table Design › Table Eraser on the vertical border merges the bottom cells, and undo restores them. I checked the screenshot.
  • cargo xtask ci passes (fmt, clippy, test, assets, layers, wasm).

Parity checklist: Tables › Draw table goes M → P, and the summary was regenerated with cargo xtask parity.

Insert > Table > Draw Table turns on a table pencil. Dragging a box on an
empty part of the slide makes a one-cell table. Drawing a line inside a
table splits the cells it crosses, across or down, and adds a row or
column only where needed, so the cells it doesn't cross stay whole.
Table Design > Draw Borders has the pencil and a Table Eraser. A click
on a border merges the two cells on either side when together they
form a rectangle, and their text is kept.

The new table.drawLine and table.eraseLine commands are each one undo
step. The grid work is pure (engine/src/drawtable.rs). It rebuilds the
table from its anchor cells, so existing merges survive, and it caps
the grid at 200 rows and columns. Ribbon big buttons now carry an
accessibility label.

Co-authored-by: Cursor <cursoragent@cursor.com>
@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit 23eb82c into storytold:main Oct 14, 2026
h-a-n-a-s-h-i pushed a commit that referenced this pull request Oct 14, 2026
…d param (#544 after #97); its test no longer writes to /tmp

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@echelon

echelon commented Oct 14, 2026

Copy link
Copy Markdown
Member

Thank you for this contribution, @NikitkaRa! It has landed on main and will ship in the next DeckCraft release.

If you haven't already, please come join us on Discord: https://discord.gg/artcraft

anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
…or takes its scale (storytold#544)

* Issue storytold#324: vendor winit 0.30.13 as published

The crate as released on crates.io, without its asset files (docs/res/*.svg and
examples/data/*.png, AGENTS.md §1). Not used yet: the next commit patches it and
adds it to [patch.crates-io].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Issue storytold#324: on Windows 11, a window dragged to another monitor takes its scale

winit 0.30.13 handles WM_DPICHANGED by checking that the new window rect is on
the monitor `MonitorFromWindow` names. During a drag that is still the monitor
being left, so winit nudged the window back onto it, which sent another
WM_DPICHANGED: the window grew and stayed on the wrong monitor at the wrong
scale. From Windows 11 (build 22000) on, apply the rect Windows suggests, as
winit master does since 488c036a (rust-windowing/winit#4341); no 0.30 release
has it. Windows 10 keeps the old adjustment, as on winit master.

The vendored copy goes in [patch.crates-io]; a test fails if winit resolves
from crates.io again or the vendored copy loses the patch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants