[DS 2.0] Move the node shell to the DS 2.0 geometry and derive ConnectableItem width - #123
Draft
librowski wants to merge 2 commits into
Draft
[DS 2.0] Move the node shell to the DS 2.0 geometry and derive ConnectableItem width#123librowski wants to merge 2 commits into
librowski wants to merge 2 commits into
Conversation
librowski
requested review from
lukasz-jazwa,
piotrblaszczyk and
szymon-t-sc
as code owners
September 7, 2026 12:05
librowski
marked this pull request as draft
September 7, 2026 12:07
librowski
force-pushed
the
ds2-canvas-node-geometry
branch
2 times, most recently
from
September 7, 2026 12:36
9c7ecef to
f13bccd
Compare
librowski
force-pushed
the
ds2-canvas-node-geometry
branch
from
September 9, 2026 16:49
f13bccd to
7fe5aad
Compare
…and gap tokens) Width follows the design master as a canvas dimension in px (it must not scale with the root font size). Padding and vertical gap bind to the node head roles canvas-node-head-h-pad and canvas-node-head-gap from the token export (8px each) instead of the generic space-100 step.
…sets Replaces the undocumented 6 * padding factor with named insets (shell padding + border, plus the wrapping container's own inset declared via --wb-sdk-connectable-item-inset). The old content-box correction terms are dropped because the SDK applies a global border-box reset.
librowski
force-pushed
the
ds2-canvas-node-geometry
branch
from
September 9, 2026 21:38
7fe5aad to
a5f952e
Compare
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.
Two commits, reviewed together because the second is a consequence of the first.
1. Node shell geometry (
@workflowbuilder/ui, patch)node-panel.module.css:--wb-public-node-width16.125rem (258px) ->241px, the design master, expressed in px because it is a canvas dimension (the canvas zoom scales the transform, not the font size).--wb-public-node-paddingand--wb-public-node-gapbind to the node head roles from the token export,--wb-ds-canvas-node-head-h-padand--wb-ds-canvas-node-head-gap(8px each, confirmed by design as the master values), instead of the genericspace-100step. Rendered padding and gap are unchanged; the exportedcanvas-node-inset/gap-innerroles (16/12px) were confirmed as orphans and are not used. Public variable names are unchanged; consumer overrides keep working. Start, Workflow and AI templates keep their own--wb-public-node-gap: 0.Cold-load check before the change: the initial viewport fit uses DOM-measured sizes, not the
measuredvalues stored in fixtures (fit differs between 258 and 241 exactly as the narrower bounds predict, nodes render at 241 from the first frame, transform stable afterwards). The visible two-stage fit on template selection is pre-existing (template-selectorcallsfitView()after the initial fit) and width-independent.2. ConnectableItem width (
@workflowbuilder/sdk, patch)The old cap
width - 6 * padding + 2 * hpad + 2 * borderused an undocumented factor that only approximated the real horizontal insets (48px subtracted vs 40px real), and its+ padding/borderterms assumed content-box while the SDK applies a global border-box reset - at 241px the old rule allows 219px where a section offers 201px, so a long label could overflow its section by 18px.New rule:
width - 2 * (node padding + node border) - 2 * var(--wb-sdk-connectable-item-inset), where each wrapping container declares the inset it adds:NodeSection(padding + border) for Decision branches andNodeInfoWrapper(0.625rem + 1px) for AI tool rows, both giving 201px. The variable is internal (--wb-sdk-*), not a public extension point. Rationale inconnectable-item-width.decision-log.md;DECISION-LOGS.mdregenerated.Verification
Build,
check:built-css, ui and sdk tests, typecheck, stylelint. Visual pass in Demo (Simple Workflow, Call Flow, User Registration) and AI Studio (Support Triage, AI Debate), light and dark, fitView and 100%: every node 241px, shell padding 8px, no viewport jump after reload, no clipped titles, Decision branch rows exactly 201px with the section inset applied. Not covered: execution markers (need a run).Known, pre-existing and out of scope: a Decision node in the
DOWNlayout lays its branches out in one horizontal row andmin-width: max-contentlets that row widen the node (621px measured with three branches). Whether the fixed 241px rule coversDOWNis a design decision tracked separately.