Skip to content

Drawings: one shared list type for a drawing's records, starting with balloons (#5425) - #10464

Closed
CamWight wants to merge 1 commit into
tangency-labs:drawingsfrom
CamWight:drawing-by-id-5426
Closed

CamWight wants to merge 1 commit into
tangency-labs:drawingsfrom
CamWight:drawing-by-id-5426

Conversation

@CamWight

@CamWight CamWight commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Nothing changes for the person using SolidCraft, and design files are the same bytes. Each kind of record on a drawing (balloons, and soon sheet images) wrote out the same code to add, find, order and check its records. That code is now one list type, and balloons use it first.

Part of #5425, into drawings: one list type for a drawing's records of one kind. Sheet images (the next PR) needs two more of these lists, so the shared part goes first as its own small change.

Changes a default: no

What it does

Each kind of record on a sheet writes out the same add, find by halves, cap, order and check loop. ById<T> holds those, so a kind's own file keeps only its own rules. Balloons move onto it first.

The file's bytes don't change: a ById saves as the plain list it replaces. Views and dimensions stay on their own lists for now, since other work is on them.

Pictures

No visible change in the app: this only moves code behind existing commands.

Tests

  • by_id_tests.rs (new, three tests): records go where their ids put them and are found there, a file holds the plain list, and the rules name the kind and the record.
  • The balloon tests still pass on the new list, unchanged in what they check.

Planted faults: 6 of 6 caught, then a clean run: add leaves its records unsorted, a file's order is kept, index_of takes the first, no cap on a list, a list out of order passes, a record's rule isn't run. They ran with the images commit on top, so some were also caught by its tests.

What no test reaches

Views and dimensions, which don't use ById yet.

Validation

  • On this commit alone: the by_id tests pass, and clippy on solidcraft-doc with all targets is clean.
  • The full gate ran on a tree with this commit and the images commit together. It ended exit 1, for reasons the images PR sets out, none of them in this code.

Integration status

Based on drawings 9b73ec8.

Refs #5425, #860

@github-actions github-actions Bot added the area:doc timeline, components, parameters, naming label Nov 1, 2026
@CamWight CamWight changed the title A drawing's list of one kind of record: ById, with balloons first (#5425) Drawings: one shared list type for a drawing's records, starting with balloons (#5425) Nov 2, 2026
…ngency-labs#5426)

Each kind on a sheet writes out the same add, find by halves, cap, order and check loop. ById holds
those, so a kind's own file holds only its own rules, and the file's bytes don't change: it saves as
the plain list. Views and dimensions stay on their own lists for now, since other work is on them.

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

CamWight commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Carried in by #10926: its squash into drawings (3 Nov) brought in this PR's commits, so a replay would be empty. Closing it as no longer needed.

@CamWight CamWight closed this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:doc timeline, components, parameters, naming

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant