Found while testing crates/engine/src/cmd/table.rs:291
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
The model, renderer and PPTX already carried cell borders, diagonals,
margins and vertical alignment, but nothing set them. New commands:
table.borders (all, outside, inside, inside horizontal/vertical, each
side, diagonals or none, with pen colour, width and dash; the facing
side of a neighbouring cell follows, as in PowerPoint), table.cellMargins
(Normal, None, Narrow, Wide or per side) and table.cellAlign. They act on
the given cells, the selected range, the cell with the caret, or the
whole table. Table Design gains a Borders menu with pen weight, style and
colour; Table Layout's Top/Center/Bottom now align cell text (they set
the text body's anchor, which cells override) and gain Cell Margins.
Co-authored-by: Cursor <cursoragent@cursor.com>
Hovering a table border shows a resize cursor (new hit kinds
TableColumn and TableRow) and dragging it resizes, one undo step per
drag, as in PowerPoint:
- an inner column border moves between its two columns and the table
keeps its width;
- the right edge widens or narrows the last column and the table;
- a row's bottom border (the last one is the table's bottom edge) sets
that row's height, which stays a minimum: rows still grow to fit
their text.
Columns stop at 12 pt. Borders hidden inside merged cells aren't hit;
the left and top edges still move the table. A border drag while a
cell is edited keeps editing it. The drag goes through
table.columnWidth, which takes a new keepTotal option (the next column
absorbs the change), and table.rowHeight. Hit testing is done in the
table's own frame, so rotated tables resize along their axes.
- A double-click in a cell puts the caret where clicked and selects the
word there, as in shapes (it used to put the caret at the end).
- While a cell is edited, a click in the same table moves the caret to
the clicked cell and position; a drag selects text within the cell
and Shift+click extends only within it.
- A click in an already selected table enters the clicked cell at the
click; dragging the table still moves it.
- The release that follows a double-click no longer re-enters the text
at the click, which collapsed the word just selected (shapes too).
Cells are found from the drawn cell rects, so merged cells and rows
that grew to fit their text are hit where they are drawn.
Editing a table cell outlined the cell but drew no caret or selection,
and Up/Down/Home/End fell back to paragraph moves, because the text
layout used for drawing, hit testing and caret movement only existed
for shapes.
text::text_frame now lays out the edited text as it is drawn and gives
the transform to the slide, for shapes and cells alike: a cell's text is
laid out in its rect (merges honoured) with the cell's margins, anchor
and the table style's look, through the renderer's own cell_body and
cell_rects. layout_for and tools::text_pos use it, and the canvas draws
the caret and selection from it. The cell outline follows merged cells.
A --cmd without a value now asks for COMMAND[=PARAMS]. The params field
says how describe reads it, table.split's row and col are optional as
the command reads them, and the MCP instructions name only shape
commands for `ids`.
[claude-opus-5-5] on behalf of hoblin
`deckcraft-cli help` and each subcommand's `--help` say what it does,
with a working example; `--help` never runs the subcommand. `describe`
spells out a command's parameters and what it acts on, `commands` lists
one command per line, and the MCP instructions say what format.* acts on.
[claude-opus-5-5] on behalf of hoblin
A shape id that was present but not a valid id (negative, not an integer,
larger than u32) was treated as absent, so commands such as text.set and
text.edit silently edited the selected shape instead. id_param now tells three
cases apart: absent (the selection fallback is unchanged), valid, and invalid
(an error naming the command). arrange, edit (select), inspect, review, table,
text and the animation painter pick this up.