mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-13 23:17:49 +00:00
cd6b2bbe46f05f760e61b987d14dbfbb6b2393ae
7
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
cd6b2bbe46 |
Tables: Ctrl, Alt, left-edge and selected-cells border drags (#720)
* Rulers: table column and row markers; indents in a cell measured from it (#700) With the caret in a table, the rulers show the table, as Word's do: - The horizontal ruler marks the column borders of the caret's row (past the table's left edge); the vertical ruler marks the bottom of each of the table's rows on the page. Each marker has the resize pointer, a tooltip and a name for screen readers. - Dragging a marker drags that border exactly like a drag on the page (#600): a dashed guide, Escape cancels, one undo step on release through `table.resizeDrag`. On the horizontal ruler only the column left of the border changes and the columns right of it move along, so the table's width changes (Word's ruler); a row marker sets the row's height. The markers follow any drag of the table's borders, on the ruler or on the page. - In a cell, the indent markers and tabs are measured from the cell's text area (its box less its margins); they were placed as if the paragraph started at the page's margin. - Layout: `cell_margins` (a cell's own margins, else the table's, else Word's), so the ruler uses what the layout does. - UI: crates/ui-egui/src/table_ruler.rs; table_resize.rs starts a drag from a ruler marker (`grab`) and tells the ruler where a dragged border is (`moved`), sharing that computation with the dashed guide. - Tests: layout (cell_margins matches where each cell's text starts); kittest with real pointer events: a column marker drag (the marker follows, one undo step, the columns right of it keep their widths), a row marker drag, and an 18 pt drag of the left-indent marker in a cell indenting the paragraph 18 pt. Progress docs updated: ui-parity (rulers 70% -> 85%), gaps (the ruler's column markers are off the list), target-app-parity, ROADMAP. No new commands or labels (the tooltips reuse "Table Column Width" and "Table Row Height"). `cargo xtask ci` passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Rulers: Shift works the other way round on the ruler; row markers beside a vertical merge Checked against Word (2019, Windows): on the ruler a column marker drag changes only the column on its left and the columns right of it move along (as before), and with Shift the neighbour makes up the difference, so the table keeps its width; on the page Shift does the opposite. The ruler now follows that: `ResizeDrag::plan` takes the Shift key and flips it for a drag started on a ruler marker. Since #669 a vertically merged cell's box spans all its rows, so a row marker took the merge's bottom when the merge was the row's leftmost cell. The marker now sits on the row's shortest box. (`Placed::Cell` patterns take `..` for #669's new field.) - Test (kittest, real pointer events): a Shift drag of a column marker on the ruler gives the neighbour's width to the column on the left and keeps the table's width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: Ctrl, Alt, left-edge and selected-cells border drags (#711) Word's border drags that #600 left out: - Ctrl while dragging a column border: the columns right of it share the change in proportion to their widths, so the table keeps its width (none narrower than the minimum). Ctrl wins over Shift; on the table's right edge only the last column changes. - The table's left edge can be dragged, from just outside it: the table's indent moves and the first column makes up the difference, so the other borders stay. A centred or right-aligned table becomes left-aligned where the edge was dropped; a floating table moves its horizontal offset. The horizontal ruler has a marker on it too. - Alt while dragging a column border: the horizontal ruler shows each column's width as it is going to be. - With the selection across two or more cells, dragging one of their column borders (in one of their rows) moves it only in their rows; the grid gets a line for the new border and the cells' spans follow. A border of a cell merged down past the selection moves in the whole column. Text selected within one cell isn't a cell selection (it can't be told from one selected cell yet), so it moves the whole column. - Engine: `Share` (who makes up a column border's move), `Edge::Column(0)`, `ResizeTarget::limit_to_selection`/`only`/ `planned_x`, `Plan::indent_by`/`cells`; `table.resizeDrag` takes `"ctrl"`. `plan` still takes a bool for Shift. Each drag is one command and one undo step. - UI: table_resize.rs (keys, a guide down the rows that move, `measuring`), table_ruler.rs (left-edge marker, `widths`). - Tests: engine (Ctrl in proportion and at the minimum; the left edge, also of a centred table; selected cells' rows only, with the grid and spans; a merged cell past the selection); kittest with real pointer events (a Ctrl drag, the left edge and its ruler marker, Alt's widths mid-drag). Progress docs updated: ui-parity (tables on the page 80% -> 90%), target-app-parity, ROADMAP. No new commands or labels. `cargo xtask ci` passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: a centred or right-aligned table keeps its alignment when its left edge is dragged Checked against Word (2019, Windows): dragging the left edge of a centred table widens the first column by the whole drag and the table stays centred (each side moves half); a right-aligned table keeps its right edge and grows to the left. Only a left-aligned table's indent moves. #711 made such a table left-aligned where the edge was dropped; now `move_left_edge` leaves a centred or right-aligned table's alignment and indent alone and says whether it moved anything, and the drop-point correction runs only then. The ruler's Shift (from #710) now goes through `share`: on a ruler marker Shift makes the neighbour take up the change, without it only the column on the left changes. - Tests: the left-edge test checks the centred table (first column +20 pt, the others unchanged, still centred) and a right-aligned one (only the left edge moves); a kittest Shift drag on the ruler. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: rabis <340973947+rabis7575@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
8c8d5611a4 |
Rulers: table column and row markers; indents in a cell measured from it (#710)
* Rulers: table column and row markers; indents in a cell measured from it (#700) With the caret in a table, the rulers show the table, as Word's do: - The horizontal ruler marks the column borders of the caret's row (past the table's left edge); the vertical ruler marks the bottom of each of the table's rows on the page. Each marker has the resize pointer, a tooltip and a name for screen readers. - Dragging a marker drags that border exactly like a drag on the page (#600): a dashed guide, Escape cancels, one undo step on release through `table.resizeDrag`. On the horizontal ruler only the column left of the border changes and the columns right of it move along, so the table's width changes (Word's ruler); a row marker sets the row's height. The markers follow any drag of the table's borders, on the ruler or on the page. - In a cell, the indent markers and tabs are measured from the cell's text area (its box less its margins); they were placed as if the paragraph started at the page's margin. - Layout: `cell_margins` (a cell's own margins, else the table's, else Word's), so the ruler uses what the layout does. - UI: crates/ui-egui/src/table_ruler.rs; table_resize.rs starts a drag from a ruler marker (`grab`) and tells the ruler where a dragged border is (`moved`), sharing that computation with the dashed guide. - Tests: layout (cell_margins matches where each cell's text starts); kittest with real pointer events: a column marker drag (the marker follows, one undo step, the columns right of it keep their widths), a row marker drag, and an 18 pt drag of the left-indent marker in a cell indenting the paragraph 18 pt. Progress docs updated: ui-parity (rulers 70% -> 85%), gaps (the ruler's column markers are off the list), target-app-parity, ROADMAP. No new commands or labels (the tooltips reuse "Table Column Width" and "Table Row Height"). `cargo xtask ci` passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Rulers: Shift works the other way round on the ruler; row markers beside a vertical merge Checked against Word (2019, Windows): on the ruler a column marker drag changes only the column on its left and the columns right of it move along (as before), and with Shift the neighbour makes up the difference, so the table keeps its width; on the page Shift does the opposite. The ruler now follows that: `ResizeDrag::plan` takes the Shift key and flips it for a drag started on a ruler marker. Since #669 a vertically merged cell's box spans all its rows, so a row marker took the merge's bottom when the merge was the row's leftmost cell. The marker now sits on the row's shortest box. (`Placed::Cell` patterns take `..` for #669's new field.) - Test (kittest, real pointer events): a Shift drag of a column marker on the ruler gives the neighbour's width to the column on the left and keeps the table's width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: rabis <340973947+rabis7575@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
f24a5b22b2 |
Tables: drags and Shift+arrows over cells select whole cells (#722)
* Tables: select, insert and move with the mouse; double-click a border to AutoFit Like Word, on top of the border resizing: - Selection areas: just above a column the pointer becomes a down arrow, left of a row the row arrow, along a cell's left edge (inside it) the cell arrow. A click selects the column, row or cell; a drag selects every one up to the pointer. Selected cells are shaded as cells, empty ones too. - Insert buttons: left of a row border and above a column border a "+" shows with the border marked; a click adds a row or column there and puts the caret in it. - Move handle past the table's top-left corner: a click selects the table; a drag shows a dashed outline and, on release, the table floats where it is dropped with the text wrapping around it (Word's behaviour). One undo step. Nested tables and tables outside the main text are only selected. - A double-click on a column border fits the column left of it to its contents (the right neighbour gives or takes the room; on the right edge the table's width changes, up to the right margin). - Table Layout > Select > Select Column (catalog 418/449). Whole-cell selection: a column (or a rectangle of cells over several rows) is not one run of the text, so selecting it makes a block of its cells' paragraphs (`CellRange` on the existing `ColumnBlock`). Bold, alignment, Delete, typing, copy and numbering act on those cells only (a numbered column is one list); table commands (shading, merge, delete columns) take the rectangle; Tab moves on without clearing it; Undo brings the selection back. Cells of one row, or whole rows, stay an ordinary stream selection. The format painter no longer clears a block's text (edit.pasteFormat was handled like a paste). The mini toolbar stays hidden over whole-cell selections and during these drags: pinned above the selection it covered the column areas, the "+" buttons and the move handle. Engine: crates/engine/src/cmd/table_mouse.rs - table.selectAt, table.insertAt, table.moveDrag, table.fitColumn (page coordinates, so agents and the control channel can do the same) and table.selectColumn; hit testing reuses table_resize's drawn geometry, and borders keep priority for resizing. 10 engine tests (areas, a column edited cell by cell, numbering, rows/cells/drags, insert buttons, move, fit, format painter, hostile params). UI: crates/ui-egui/src/table_mouse.rs, wired into the existing canvas mouse handler (no extra ui.interact areas, so clicks in a cell's text still place the caret); kittest tests with real pointer events: column click, row drag, "+" button, move-handle drag in one undo step, double-click fit. New labels translated in all eleven catalogs. Progress docs updated: gaps, ui-parity, target-app-parity, ROADMAP, parity checklist. `cargo xtask ci` passes (fmt, clippy, test, assets, layers, wasm). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: a selected column's word count is its cells'; merged cells shade once With whole cells selected (a column, or a rectangle that isn't one run of the text) the status bar said "12 of 23 words": `Session::selected_text` took everything between the selection's ends. It now takes each piece's own text, a line each, for a column block too, so the status bar, Word Count and the other callers see what is selected. Since #669 a vertically merged cell is one box as tall as its rows, with a `covered` box for each continuation row; shading selected cells skips those, so a merged cell isn't shaded twice. `selected_paths` follows main's `para_paths_in` (#418): a selection ending at the start of the next paragraph doesn't take it. - Test: a selected column's text is its three cells' and Word Count says three words. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: double-click AutoFit and the "+" buttons work as in Word Checked against Word (2019, Windows): - A double-click on a column border fits the column left of it to its contents and the columns right of it keep their widths, moving with the border, so the table narrows or widens (up to the right margin). The right neighbour used to give or take the difference. - A "+" insert button selects the new row or column (the caret used to go into it); typing then goes into its first cell. If the table can't take another row or column, nothing changes. - A double-click along a cell's left edge (the cell selection area) selects its row. - Tests: engine (fit keeps the columns on the right; insert selects the new row or column, typing lands in its first cell) and kittest (real double-click on a border; "+" selects the row; double-click by a cell's edge selects the row). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: drags and Shift+arrows over cells select whole cells An ordinary drag, Shift+click or Shift+arrow from one table cell into another now selects the rectangle of whole cells between them, as Word does, instead of the run of text between the two points: bold, alignment and Delete leave the cells outside the rectangle alone (they already did for Select Column and the table's selection areas). Between a cell and text outside its table the selection takes whole rows, from the cell's row out to the table's edge, and the text beyond. Extending again goes on from where the selection really started and ends: dragging back into the first cell selects its text again, Shift+Up after Shift+Down shrinks the rectangle, and from a nested table's cell into another cell of the table around it the outer table's cells are taken. - Engine: `table::extend_selection` (the rule, down through nested tables) and `Session::sel_ends` (where a widened selection really runs); every caret command run with `extend` goes through it in `column::dispatch`, so agents get the same with `caret.*`. - UI: a text drag extends through `caret.set` (still straight to the session, so nothing scrolls on every frame); the view follows the real caret. - Tests: engine (drag across cells and back, nested tables, Shift+Down and Shift+Up through and past a table, Shift+click, from text into a table) and a kittest with a real mouse drag. Progress docs updated: gaps (the known gap from #637 is gone), ui-parity, target-app-parity, ROADMAP. `cargo xtask ci` passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: rabis <340973947+rabis7575@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
284818b467 |
Tables: the right-click menu offers the table's commands (#694)
* Tables: select, insert and move with the mouse; double-click a border to AutoFit Like Word, on top of the border resizing: - Selection areas: just above a column the pointer becomes a down arrow, left of a row the row arrow, along a cell's left edge (inside it) the cell arrow. A click selects the column, row or cell; a drag selects every one up to the pointer. Selected cells are shaded as cells, empty ones too. - Insert buttons: left of a row border and above a column border a "+" shows with the border marked; a click adds a row or column there and puts the caret in it. - Move handle past the table's top-left corner: a click selects the table; a drag shows a dashed outline and, on release, the table floats where it is dropped with the text wrapping around it (Word's behaviour). One undo step. Nested tables and tables outside the main text are only selected. - A double-click on a column border fits the column left of it to its contents (the right neighbour gives or takes the room; on the right edge the table's width changes, up to the right margin). - Table Layout > Select > Select Column (catalog 418/449). Whole-cell selection: a column (or a rectangle of cells over several rows) is not one run of the text, so selecting it makes a block of its cells' paragraphs (`CellRange` on the existing `ColumnBlock`). Bold, alignment, Delete, typing, copy and numbering act on those cells only (a numbered column is one list); table commands (shading, merge, delete columns) take the rectangle; Tab moves on without clearing it; Undo brings the selection back. Cells of one row, or whole rows, stay an ordinary stream selection. The format painter no longer clears a block's text (edit.pasteFormat was handled like a paste). The mini toolbar stays hidden over whole-cell selections and during these drags: pinned above the selection it covered the column areas, the "+" buttons and the move handle. Engine: crates/engine/src/cmd/table_mouse.rs - table.selectAt, table.insertAt, table.moveDrag, table.fitColumn (page coordinates, so agents and the control channel can do the same) and table.selectColumn; hit testing reuses table_resize's drawn geometry, and borders keep priority for resizing. 10 engine tests (areas, a column edited cell by cell, numbering, rows/cells/drags, insert buttons, move, fit, format painter, hostile params). UI: crates/ui-egui/src/table_mouse.rs, wired into the existing canvas mouse handler (no extra ui.interact areas, so clicks in a cell's text still place the caret); kittest tests with real pointer events: column click, row drag, "+" button, move-handle drag in one undo step, double-click fit. New labels translated in all eleven catalogs. Progress docs updated: gaps, ui-parity, target-app-parity, ROADMAP, parity checklist. `cargo xtask ci` passes (fmt, clippy, test, assets, layers, wasm). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: a selected column's word count is its cells'; merged cells shade once With whole cells selected (a column, or a rectangle that isn't one run of the text) the status bar said "12 of 23 words": `Session::selected_text` took everything between the selection's ends. It now takes each piece's own text, a line each, for a column block too, so the status bar, Word Count and the other callers see what is selected. Since #669 a vertically merged cell is one box as tall as its rows, with a `covered` box for each continuation row; shading selected cells skips those, so a merged cell isn't shaded twice. `selected_paths` follows main's `para_paths_in` (#418): a selection ending at the start of the next paragraph doesn't take it. - Test: a selected column's text is its three cells' and Word Count says three words. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: double-click AutoFit and the "+" buttons work as in Word Checked against Word (2019, Windows): - A double-click on a column border fits the column left of it to its contents and the columns right of it keep their widths, moving with the border, so the table narrows or widens (up to the right margin). The right neighbour used to give or take the difference. - A "+" insert button selects the new row or column (the caret used to go into it); typing then goes into its first cell. If the table can't take another row or column, nothing changes. - A double-click along a cell's left edge (the cell selection area) selects its row. - Tests: engine (fit keeps the columns on the right; insert selects the new row or column, typing lands in its first cell) and kittest (real double-click on a border; "+" selects the row; double-click by a cell's edge selects the row). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: the right-click menu offers the table's commands Right-clicking a table cell now offers what Word's table menu does, all through existing commands: Insert (rows above/below, columns left/right), Delete (cells, rows, columns, table), Select (cell, column, row, table), Merge Cells, Split Cells, Distribute Rows, Distribute Columns, AutoFit (contents, window, fixed column width), Text Direction, Cell Alignment (the nine alignments) and Table Properties… (opens the dialog, as the ribbon's button does). A right-click beside selected cells now moves the caret there, as in Word: with a column selected, the cells between its first and last cell in the text (the other columns of those rows) counted as "inside the selection", so the selection stayed and the menu acted on the column instead of the cell clicked. A right-click on a selected cell keeps the selection, so Cell Alignment, Distribute and the rest act on it. - UI only (crates/ui-egui/src/canvas.rs): the table part of `context_menu()` and a small check before the right-click caret logic (separate from it, so it doesn't overlap #521's change to that block). Table Layout's nine cell alignments are one shared list (`CELL_ALIGN` in ribbon.rs) for the ribbon grid and the menu. - Two new labels, "Cell Alignment" and "Table Properties…", translated in all eleven catalogs; the rest reuse the ribbon's labels. - Tests: kittest with real pointer events: right-click in a cell, the menu's table entries, Select > Select Column; with a column selected, a right-click on it keeps it and Cell Alignment > Align Bottom Right aligns just the column (one undo step), and a right-click beside it drops it. Progress docs updated: ui-parity (context menus 55% -> 60%), gaps, target-app-parity, ROADMAP. No new commands, so the catalog is unchanged. `cargo xtask ci` passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: the right-click menu's table items follow the selection, as in Word Checked against Word (2019, Windows): Word's table items in the context menu depend on what is selected, and there is no Select or Cell Alignment submenu among them. - Caret in a cell: Insert, Delete Cells, Split Cells, Text Direction, Table Properties… - Several cells: Insert, Delete Cells, Merge Cells, Text Direction, Table Properties… - Whole columns: Insert, Delete Columns, Merge Cells, Distribute Rows, Distribute Columns, Text Direction, Table Properties… (whole rows the same with Delete Rows; not checked in Word). - The whole table: Insert, Delete Table, Distribute Rows and Columns, AutoFit, Text Direction, Insert Caption…, Table Properties… Insert lists the columns first, as Word does. Select and Cell Alignment are gone, and with them the shared CELL_ALIGN constant in the ribbon; "Insert Caption…" replaces "Cell Alignment" in all fifteen catalogs. Word's Border Styles and Insert Cells… aren't here yet. - Tests (kittest, real right-clicks): the menu with the caret in a cell and with the whole table; a selected column keeps its column menu and Text Direction turns only it; beside it the menu is a cell's again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: rabis <340973947+rabis7575@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
8ca285ca9d |
Tables: select, insert and move with the mouse; double-click a border to AutoFit (#637)
* Tables: select, insert and move with the mouse; double-click a border to AutoFit Like Word, on top of the border resizing: - Selection areas: just above a column the pointer becomes a down arrow, left of a row the row arrow, along a cell's left edge (inside it) the cell arrow. A click selects the column, row or cell; a drag selects every one up to the pointer. Selected cells are shaded as cells, empty ones too. - Insert buttons: left of a row border and above a column border a "+" shows with the border marked; a click adds a row or column there and puts the caret in it. - Move handle past the table's top-left corner: a click selects the table; a drag shows a dashed outline and, on release, the table floats where it is dropped with the text wrapping around it (Word's behaviour). One undo step. Nested tables and tables outside the main text are only selected. - A double-click on a column border fits the column left of it to its contents (the right neighbour gives or takes the room; on the right edge the table's width changes, up to the right margin). - Table Layout > Select > Select Column (catalog 418/449). Whole-cell selection: a column (or a rectangle of cells over several rows) is not one run of the text, so selecting it makes a block of its cells' paragraphs (`CellRange` on the existing `ColumnBlock`). Bold, alignment, Delete, typing, copy and numbering act on those cells only (a numbered column is one list); table commands (shading, merge, delete columns) take the rectangle; Tab moves on without clearing it; Undo brings the selection back. Cells of one row, or whole rows, stay an ordinary stream selection. The format painter no longer clears a block's text (edit.pasteFormat was handled like a paste). The mini toolbar stays hidden over whole-cell selections and during these drags: pinned above the selection it covered the column areas, the "+" buttons and the move handle. Engine: crates/engine/src/cmd/table_mouse.rs - table.selectAt, table.insertAt, table.moveDrag, table.fitColumn (page coordinates, so agents and the control channel can do the same) and table.selectColumn; hit testing reuses table_resize's drawn geometry, and borders keep priority for resizing. 10 engine tests (areas, a column edited cell by cell, numbering, rows/cells/drags, insert buttons, move, fit, format painter, hostile params). UI: crates/ui-egui/src/table_mouse.rs, wired into the existing canvas mouse handler (no extra ui.interact areas, so clicks in a cell's text still place the caret); kittest tests with real pointer events: column click, row drag, "+" button, move-handle drag in one undo step, double-click fit. New labels translated in all eleven catalogs. Progress docs updated: gaps, ui-parity, target-app-parity, ROADMAP, parity checklist. `cargo xtask ci` passes (fmt, clippy, test, assets, layers, wasm). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: a selected column's word count is its cells'; merged cells shade once With whole cells selected (a column, or a rectangle that isn't one run of the text) the status bar said "12 of 23 words": `Session::selected_text` took everything between the selection's ends. It now takes each piece's own text, a line each, for a column block too, so the status bar, Word Count and the other callers see what is selected. Since #669 a vertically merged cell is one box as tall as its rows, with a `covered` box for each continuation row; shading selected cells skips those, so a merged cell isn't shaded twice. `selected_paths` follows main's `para_paths_in` (#418): a selection ending at the start of the next paragraph doesn't take it. - Test: a selected column's text is its three cells' and Word Count says three words. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: double-click AutoFit and the "+" buttons work as in Word Checked against Word (2019, Windows): - A double-click on a column border fits the column left of it to its contents and the columns right of it keep their widths, moving with the border, so the table narrows or widens (up to the right margin). The right neighbour used to give or take the difference. - A "+" insert button selects the new row or column (the caret used to go into it); typing then goes into its first cell. If the table can't take another row or column, nothing changes. - A double-click along a cell's left edge (the cell selection area) selects its row. - Tests: engine (fit keeps the columns on the right; insert selects the new row or column, typing lands in its first cell) and kittest (real double-click on a border; "+" selects the row; double-click by a cell's edge selects the row). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: rabis <340973947+rabis7575@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
da5da66e51 |
Tables: row borders stay apart around a vertical merge (#640) (#841)
Since #669 a vertically merged cell is one `Placed::Cell` as tall as all its rows. The resize geometry took a row's bottom from its tallest box, so the row where a merge starts reached down to the merge's bottom: the border under it could not be grabbed, and dragging the border of the next row resized the first row instead (to the merge's height plus the drag). - A row ends at its shortest box, and no lower than where the next row starts (a row whose every cell starts a merge has only taller boxes). - The heights measured after a row drag come from the same geometry. - Test: with a merge down column 0, the border under the first row is still there, the merge's bottom is the second row's border, and dragging the first one changes that row alone. Co-authored-by: rabis <340973947+rabis7575@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
ad8c264420 |
Tables: resize by dragging column borders, row borders and the corner handle (#217) (#600)
Like Word: the pointer turns into a resize arrow over a column border or a row's bottom border, and a small handle shows past the table's bottom-right corner. Dragging shows a dashed guide; releasing runs the new `table.resizeDrag` command (page coordinates), so a drag is one undo step and the selection is kept. Esc cancels a drag. - Column border: the right neighbour gives or takes the difference, so the table keeps its width; Shift, or the table's right edge, changes only the column on the left. Columns stay at least 6 pt wide. - Row border: sets the row's "at least" height; the margins and border bands the layout adds are measured and taken off, so the row is drawn at the dragged height. - Corner handle: scales every column and the rows on that page. - Widths come from the drawn layout, so autofit and percentage widths don't make the result jump; a merged cell hides the border it covers. - Borders are hit-tested in the existing canvas mouse handler, only within a few pixels of a border, so clicks in cells still place the caret. Engine: crates/engine/src/cmd/table_resize.rs (7 tests). UI: crates/ui-egui/src/table_resize.rs, wired into canvas.rs; kittest tests drive real pointer events through the whole window (one undo step per drag, selection kept, clicks in cells still move the caret, Esc cancels). The command label is translated in all nine interface catalogs. Progress docs updated: gaps, ui-parity, target-app-parity, ROADMAP. `cargo xtask ci` passes (fmt, clippy, test, assets, layers, wasm). Co-authored-by: rabis <340973947+rabis7575@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |