Commit graph

1 commit

Author SHA1 Message Date
1a36ca5538 feat(spreadsheet-ui): interactive checkbox cells (widget-in-cell)
Some checks failed
nigig-build (CAD) / supply-chain (push) Has been cancelled
nigig-build (CAD) / cad-module (push) Has been cancelled
nigig-build (CAD) / full-crate-check (push) Has been cancelled
nigig-build (CAD) / cad-engine-coverage (push) Has been cancelled
nigig-build (CAD) / doc-workspace-coverage (push) Has been cancelled
nigig-build (CAD) / cad-widget-coverage (push) Has been cancelled
repo hygiene / hygiene (push) Has been cancelled
spreadsheet / engine-coverage (push) Has been cancelled
spreadsheet / ui-controller-coverage (push) Has been cancelled
Close gap #9 (cells hosting widgets) the spreadsheet-native way. The
datagrid reference hosts a live CheckBox widget per visible cell and
recycles instances from a per-template pool; our grid instead draws the
control from batched quads, so there is no per-cell widget object to
instantiate or recycle — the render cache and reused draw buffers already
fill the role the pool does.

- A plain value cell holding TRUE/FALSE now renders as a checkbox: a
  centred square box with a checkmark when TRUE, and its TRUE/FALSE label
  to the right. A single click toggles the value (through the normal
  set_cell path, so it is undoable and recalculates dependents), selects
  the cell, and does not open the editor — a checkbox is a button, not a
  text surface. Formula cells are never checkboxes, so a click can't
  clobber a formula.
- The predicate (is_checkbox), the value flip (toggled) and the box
  geometry (checkbox_layout) live in a new measured checkbox module with
  unit tests; grid.rs stays thin glue (draw the box/tick/label, reposition
  the label, and the click handler's toggle).

UI controllers: 96 tests (+6). Coverage: ui-controllers 99.20% (floor 96),
checkbox.rs at 100%. No engine changes.
2026-08-20 18:28:46 +00:00