Repository navigation
Frame the parts a plan's groups name - #10
Merged
Merged
Conversation
A top-level `groups` map, in the plan or a prepended file, draws a dashed
rounded frame with a small title round each group's members:
groups:
water_box:
label: WATER BOX
members: [pump, accumulator, tee.t1]
A member is a part as a chain names it, or a named instance. Each group is an
ELK compound node laid out with INCLUDE_CHILDREN, so the frame holds its
members and no other card, and pipes cross its border to reach them. A turn
whose two ends are in one group sits inside it; any other turn sits outside
every frame. Wrapping keeps a frame whole on one row. The frame is drawn
first, beneath cards and pipes, and its CSS rule is only written on a sheet
that has groups, so a sheet without them renders to the same bytes as before.
elkjs throws when it orders a nested graph by model order, so the parts inside
a frame are ordered by ELK alone.
A member that is not a declared component, a pipe, a fresh instance, a part
listed twice or in two groups, a group with no member drawn, and any key but
`label` and `members` are errors. A member no chain names is left out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #9 (
coil-pipes).Summary
A plumbing plan, or a prepended file, can frame parts that sit together, such as everything in one enclosure.
adapter.) cannot be a member. A fitting between two members that is not listed is drawn outside the frame, and its pipes go the long way round; the docs say to name it and list it.labelandmembers.diagram.wrapworks: a frame is kept whole on one row.Evidence
After: a real heating plan with a nine-member
water_boxgroup renders a frame tight round those nine cards, with the heater and the second heat exchanger outside and no pipe through a card. One unlisted adapter between two members sends a hose round the frame; naming and listing it gives a clean sheet. Both were rendered and checked by eye, as were frames withwrap, a turn inside a frame, between two frames, and from a frame to a bare card.groupsare byte-identical: all 14 SVGs and 10 Markdown tables of the project that uses ferrule were rendered from this branch and compared withcmpagainst the committed ones, 0 differ.npm run typecheck,npm test(93 pass, 8 new intest/groups.test.ts) andnpm run buildpass.Merge Danger
Door: two-way
Opt-in key; reverting removes it and nothing else.
Blast Radius: none-unless-opted-in
A plan that already has a stray top-level
groupskey is now read, and fails if it is not in this shape. Groups are plumbing only; a loom'sgroupsis still ignored.🤖 Generated with Claude Code