Skip to content

Add canvas-style node preview to the style dialog#1935

Merged
kmcginnes merged 1 commit into
mainfrom
node-style-dialog-preview
Jul 14, 2026
Merged

Add canvas-style node preview to the style dialog#1935
kmcginnes merged 1 commit into
mainfrom
node-style-dialog-preview

Conversation

@kmcginnes

@kmcginnes kmcginnes commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Description

The node style dialog showed a tiny inline preview that was easy to miss (#1907). Now there's a prominent live preview with the node's type label rendered exactly as it appears on the canvas — dark pill background, white text — so users can see the effect of style changes at a glance.

Also refactors IconPicker to accept children as its trigger element, giving callers control over the button appearance.

How to read

  1. NodeStyleDialog.tsx — the layout restructure: grid with shape/icon controls on the left, preview field on the right
  2. IconPicker.tsx — accepts children as the trigger element instead of hardcoding the button
  3. IconPicker.test.tsx — test helper updated for the new required children prop

Validation

Open the node style dialog (Nodes Styling panel → click the customize button on any node type). The preview should render a large node with the type label below it in a dark pill, updating live as you change shape, icon, color, or border settings.

Node style dialog with canvas-style preview

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I have verified pnpm checks passes with no errors.
  • I have verified pnpm test passes with no failures.
  • I have covered new added functionality with unit tests if necessary.
  • I have updated documentation if necessary.

The node style dialog now shows a prominent live preview of the node
with its type label, matching the graph canvas rendering. The preview
sits alongside the shape and icon controls in a bordered container
with the same background as the graph/schema views.

Also refactors IconPicker to accept children as its trigger element,
giving callers control over the button appearance.
@kmcginnes kmcginnes marked this pull request as ready for review July 14, 2026 00:11
@kmcginnes kmcginnes merged commit c134f19 into main Jul 14, 2026
6 checks passed
@kmcginnes kmcginnes deleted the node-style-dialog-preview branch July 14, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the target label more prominent in the node/edge style dialogs

1 participant