Node families can carry a full-colour image - #54
Merged
Conversation
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.
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.
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 (darkis the base).renderNodeCenterImagedraws it centred in the node body. Both images are laid down, withhas-lightwhen there is a light one, and CSS shows the one for the theme viabody.vscode-light/vscode-high-contrast-light, aspaletteIconCssdoes for the palette.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.