Repository navigation
fix(sdk): the palette and the panels follow the Design System spacing - #192
Open
DominikaPacholec-Synergy wants to merge 1 commit into
Open
DominikaPacholec-Synergy wants to merge 1 commit into
DominikaPacholec-Synergy wants to merge 1 commit into
Conversation
Tiles and the drag preview are 60 px, as in Figma, which draws borders inside the box; canvas nodes keep their size. The Nodes Library is 273 px wide, and both panels keep 16 px from the edge and between header, content and footer.
DominikaPacholec-Synergy
requested review from
librowski,
lukasz-jazwa,
piotrblaszczyk and
szymon-t-sc
as code owners
October 1, 2026 10:32
librowski
reviewed
Oct 9, 2026
Collaborator
There was a problem hiding this comment.
One change of direction on the tiles: in the DS file the palette tile is the same "Node" component as on the canvas, and it is 60 px tall. So the 64 px we render on the canvas is the same border miscalculation, not a separate spec. Let's fix it in packages/ui instead of the palette: subtract the border from the default node and icon padding, and drop the .preview wrapper, its CSS module and spec. Canvas and palette both land on 60 px, and consumer overrides of the node padding keep working everywhere.
Changesets: ui minor and sdk minor.
librowski
requested changes
Oct 9, 2026
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.
What
The Nodes Library and the Properties panel now follow the Design System in Figma (Left_Sidebar, Expanded). The prototype's smaller tiles were dropped: where the DS has a spec, it wins.
Canvas nodes are unchanged.
Why the numbers were off
Figma draws strokes inside the box, so its sizes already include the 1 px border. A CSS
borderadds to the box, and every bordered element came out 1 px larger on each side.How
sidebar.module.css):outline: 1px solidwithoutline-offset: -1pxinstead ofborder. It is an inside stroke, as in Figma, so the paddings stay the DS values (1rem) with no compensation. The change applies to both panels.sidebar/variables.css): vertical padding and content gap set to1rem.node-preview.module.css, new):NodePreviewwraps the template in a.previewscope that subtracts the border from--wb-public-node-paddingand--wb-public-node-icon-padding. It covers every template, built-in and custom, and the drag preview, because the drag ghost renders the sameNodePreviewContainer. The canvas keeps its own values. Wrapping innode-preview-container.tsxalso avoidspalette-item.tsxandpalette-items.tsx, which the mobile drag-and-drop PR (fix(sdk) working drag and drop on mobile #119) touches.width: autoand hugs its content, which gives 241 + 2 × 16 = 273 px. The--wb-sdk-sidebar-expanded-widthoverride next to it has no effect whilewidth: autowins.Known differences from Figma (follow-up)
width: autocounts the scrollbar in. The tiles are not clipped.NodeDescription(packages/ui) and moves the canvas too.Verification
Demo in Chrome, measured in the DOM against the Figma metadata:
node-preview-container.spec.tsx(new case included), SDK typecheck and lint pass.Changeset
sdkpatch (.changeset/sidebar-ds-spacing.md).