Repository navigation
Conversation
This branch has not been deployed
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
VertexIconwas the last place a custom SVG icon was turned into markup outside the icon registry. It now renders through the registry as an image, like every other icon surface, so there is one decode and sanitize path andreact-inlinesvgis gone.<style>, gradients and filters, scoped to the icon.react-inlinesvgdecoded base64 without reading it as UTF-8, so non-ASCII text came out as mojibake; the registry decodes it correctly.toIconImageUrlandtoCanvasBackgroundImageshare one least-recently-used cache keyed by resolved icon, then color, holding up to 256 colors per icon. A render pass over thousands of icons costs one parse per icon and color, and none on later passes.<svg>placeholder so the parent's icon sizing applies to it.react-inlinesvg, the unused SVGfetchindrawImage,colorizeSvg, and the(icon, color)dedupe inuseBackgroundImageMapthat the cache replaces.GLOSSARY.mdnow describe every surface as an image, and the stale inline-SVG wording in the styling file notes is gone.Evidence
Before: custom SVG icons were inlined into the page, and non-ASCII text in them rendered garbled.
After: custom SVGs render as images: a non-ASCII text icon on airport, a width and height only SVG with no
viewBoxon continent, a raster on ExampleNode, and Lucide icons, in the filter list and on the canvas.Verified live: in Chrome against a Neptune air-routes database with a 10,050-type schema, across the filter list, connection type list, search results, neighbors list, legend and canvas.
fetch()ofdata:urls and no external requests.Merge Danger
Door: two-way
Stored icons and the styling file format are unchanged, so reverting restores the old rendering.
Impact: icons
A custom SVG that depended on being inlined, such as one relying on page CSS, now renders as an image and no longer sees it. Raster and Lucide icons render as before.
Related