vectorcraft/crates/testkit/src
Fahri Meral 202894372a variables: fix binding lifetime, dataset editing and the missing UI to define
Review of #761 turned up three real defects and a feature that was visible
but not usable. All of it is fixed here, each defect with a regression test
that fails without the fix.

- A binding outlived the object it named. Deleting art left its entry in
  `variables.bindings` forever: it counted as a skip in every dataset
  application, `variable.list` counted it, and the saved file grew with every
  delete. `Document::prune_variable_bindings` now lets them go after each
  edit, as `prune_assets` does for Asset Export's.
- `Variables::prune` cleared `active_dataset` by comparing it against the
  *variable* names being deleted. A dataset named like a variable lost its
  active state when the variable went. The two are separate namespaces; the
  block is gone (dataset.delete already did it right).
- `variable.delete` reported the number of names asked for, not the number
  deleted, so deleting a name that was not there still said `deleted: 1`.

- `dataset.set` (new): a dataset's values could only be set when it was
  created, so changing one meant deleting and rebuilding the row — losing its
  place in the list and the active one. This replaces the row's values and
  reports what it dropped.
- Window › Variables, and dialogs for the "…" commands. Every command had an
  empty menu path and the command palette runs those with `{}`, so nothing
  could be defined from the UI at all. The commands now carry their menu
  path, the "…" ones open a Variables dialog (a name and a kind; a name and a
  field per variable, its kind's editor), and `dataset.set` opens with the
  row's own values.
- Locked art is neither bound nor rewritten by a dataset, and says so.
- `set_plain_text` told a node that existed but was not type that it was
  missing.
- The panel had Document Info's icon, so the two were indistinguishable in
  the collapsed column; it gets its own, plus New/Delete buttons, and its
  rows say what their count is.

Format round trips now cover variables (the testkit fixture defines both
kinds, binds them and applies a row), and ROADMAP/README no longer list the
feature as missing.

cargo xtask ci: all 7 steps pass.
2026-10-10 23:34:21 +07:00
..
ai.rs Part of #637: the editing data's structure read whole, colours, gradients, transparency, names, images and artboards included 2026-10-09 16:02:36 +07:00
ase.rs Swatches: swatch exchange (.ase) files open as swatch libraries 2026-10-08 15:18:57 -07:00
fixtures.rs variables: fix binding lifetime, dataset editing and the missing UI to define 2026-10-10 23:34:21 +07:00
fonts.rs Fonts: missing fonts are listed when a document opens, with Find Fonts and a folder search 2026-10-10 08:42:32 +07:00
geom.rs Rename DrawCraft → VectorCraft: crates (vectorcraft-*), apps, binaries, types, env vars, docs, examples (.vectorcraft); old .drawcraft files and preferences still load. Fix: text bounds exact after opening a file; selection no longer marks a document modified (dirty = content differs from the saved document). Screenshots and renders regenerated. 2026-10-01 14:30:09 -04:00
invariants.rs Placed documents: the object, drawn exactly and kept as art by every exporter 2026-10-08 12:20:51 -07:00
lib.rs Fonts: missing fonts are listed when a document opens, with Find Fonts and a folder search 2026-10-10 08:42:32 +07:00
pdf.rs M4.62: PDF/.ai layers from optional content: named layers with visibility, print state and lock; art that is off as hidden layers 2026-10-05 13:05:12 +07:00
raster.rs clippy: as_chunks for fixed-size pixel and pair chunks (Rust 1.99 lint was red on main) 2026-10-05 06:24:06 +07:00
strategies.rs M6.10: Boolean operations hold their area identities on almost-horizontal edges 2026-10-05 03:36:30 +07:00