Skip to content

Node families can carry a full-colour image - #54

Merged
endrix merged 1 commit into
mainfrom
feat/streamblocks-node-logo
Sep 10, 2026
Merged

Node families can carry a full-colour image#54
endrix merged 1 commit into
mainfrom
feat/streamblocks-node-logo

Conversation

@endrix

@endrix endrix commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Summary

A product could only give a node family a single-colour watermark (icon: { viewBox, paths }). A mark with its own palette, like the one a palette entry already shows, could not be drawn in the node.

  • NodeFamilySpec.image?: { dark, light? }: the family's own mark, one image per theme (dark is the base).
  • renderNodeCenterImage draws it centred in the node body. Both images are laid down, with has-light when there is a light one, and CSS shows the one for the theme via body.vscode-light / vscode-high-contrast-light, as paletteIconCss does for the palette.
  • The image comes from the product's declaration, so the platform still names no product.

Tests

  • node-families.test.ts: both images are laid down for the theme to choose; only the dark one when there is no light one.
  • diagram-client 179/179, typecheck 5/5, neutrality 5/5.

A family's icon is a single-colour watermark drawn from SVG paths, so a
mark with its own palette - the one a palette entry already shows - could
not be drawn in a node. NodeFamilySpec.image { dark, light? } is that mark,
one image per theme; the node view lays both down and CSS shows the one for
the theme, as the palette does. The image comes from the product's
declaration, so the platform still names no product.
@endrix
endrix merged commit 8f6d42e into main Sep 10, 2026
1 check passed
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.

1 participant