chore(widgets): Add PostCSS build pipeline for icon management - #10514
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 152e735. Configure here.
Replace `cp` with a PostCSS pipeline that resolves `svg-load()` directives into inline data URIs at build time. Icons are now stored as individual .svg files in src/icons/, making them easy to audit, diff, and update. Closes #10512 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update modules/main and pydeck dev mode to copy/read from dist/stylesheet.css (PostCSS output) instead of the source file which now contains unresolved svg-load() directives. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
chrisgervang
force-pushed
the
chr/postcss-pipeline-v1
branch
from
July 31, 2026 00:31
eb8635b to
65534d3
Compare
Pessimistress
approved these changes
Jul 31, 2026
Collaborator
Author
|
@copilot resolve the merge conflicts in this pull request |
…e-v1 # Conflicts: # yarn.lock Co-authored-by: chrisgervang <2461547+chrisgervang@users.noreply.github.com>
Contributor
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.

Closes #10512
Background
The widget stylesheet embeds ~15 SVG icons as inline data URLs with full SVG markup manually copy-pasted into CSS. This makes icons difficult to audit, update, and diff.
Change List
.svgfiles insrc/icons/— one file per icon, trivially auditable and diffablecpbuild with PostCSS pipeline usingpostcss-inline-svgto resolvesvg-load()directives into inline data URIs at build timeautoprefixeras a safety net for future vendor prefix needs (adds-webkit-mask-imageback in the output for broader compat)svg-load("icons/fullscreen.svg")syntax instead of multi-line data URLsPrior Art
postcss+postcss-inline-svg+autoprefixer, with SVGs stored insrc/css/svg/Source CSS before → after
Stack
This PR is stacked on #10513 (icon cleanup PR).
Note
Low Risk
Build and asset-pipeline changes only; runtime CSS behavior should match prior inlined icons, with no security or data-handling impact.
Overview
Replaces inline SVG data URLs in the widget stylesheet with
svg-load()references to files undersrc/icons/, and builds the shipped CSS through PostCSS instead of copying source CSS verbatim.The
@deck.gl/widgetsbuild script now runspostcsswithpostcss-inline-svg(icons → inline data URIs at build time) and autoprefixer (e.g.-webkit-mask-image).deck.gland pydeck dev hot-reload now readmodules/widgets/dist/stylesheet.cssso they pick up the processed output. Root devDependencies addpostcss,postcss-cli,postcss-inline-svg, andautoprefixer.Reviewed by Cursor Bugbot for commit d6deca0. Bugbot is set up for automated code reviews on this repo. Configure here.