Repository navigation
chore: remove the legacy bundled inline icon data - #3345
Merged
Merged
Conversation
8 of 15 tasks
interactivellama
changed the base branch from
master
to
fix/carousel-autoplay-dwell-timer
November 19, 2026 22:05
interactivellama
force-pushed
the
chore/remove-legacy-icons
branch
from
November 19, 2026 22:07
cb87e39 to
38fc848
Compare
interactivellama
force-pushed
the
chore/remove-legacy-icons
branch
from
November 20, 2026 00:14
38fc848 to
74a583b
Compare
The icons/ barrels were gated behind an always-false placeholder check, so UtilityIcon never found inline data by name, but preserveModules still shipped ~880 KB of unreachable code in dist/es and dist/cjs. Delete the data, the dead lookup in UtilityIcon, its ESLint ignore, and the unused @salesforce-ux/icons devDependency. The public `icon` prop is unchanged.
interactivellama
force-pushed
the
chore/remove-legacy-icons
branch
from
November 20, 2026 23:37
74a583b to
62cfbe6
Compare
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.
Fixes #
Additional description
Removes the legacy
icons/{action,custom,doctype,standard,utility}/inline-icon data (5.9 MB in the repo).scripts/inline-icons.jsgenerated it from@salesforce-ux/icons; that script was deleted in 422e4b3 and the data hadn't been regenerated in years.Why: the inline path was already dead. Each category barrel wrapped its data in
if ('__EXCLUDE_SLDS_ICONS__' === '__INCLUDE_SLDS_ICONS__'), which is always false, so each barrel exported{}andUtilityIconnever found inline data by name. Because the Vite build usespreserveModules, the unreachable barrel code still shipped: about 880 KB each indist/es/iconsanddist/cjs/icons.package.jsonexportsdoesn't exposeicons/, so it isn't public API.Changes
icons/.UtilityIcon: removed the fiveicons/*imports, theinlineIconsmap, theIconBundletype and the name-lookup branch. It renders theiconprop's inline SVG if given, otherwise a sprite<use>resolved frompathorIconSettings.Icon"Base: Imported" story: replaced theicons/utility/downloadimport with a local constant holding the same data, so the story and its snapshot don't change.'icons/**'ESLint ignore and the unused@salesforce-ux/iconsdevDependency.[Unreleased]→ Removed.Not changed: the public
iconprop onIcon/UtilityIcon, which takes inline SVG data from the consumer. No public API change, so this isn't marked breaking.Verification
npm run test:cipasses: 1648 tests, 0 lint errors. No.snapchanges.dist/es/iconsanddist/cjs/iconsno longer exist.distwent from 12.2 MB to 10.4 MB.icons/remain.CONTRIBUTOR checklist (do not remove)
Please complete for every pull request.
Green gate — all of these must pass locally (CI runs the same):
npm run lintpasses with 0 errors (npm run lint:fixto auto-fix). Warnings are the tracked gradual-migration backlog; do not add new errors.npm run typecheckis clean (tsc --noEmit).npm test -- --runpasses — this runs both Vitest projects (jsdomunit+ real-browserbrowser) and the story HTML snapshots. If you changed rendered markup on purpose, update snapshots withnpm test -- --run -uand review the diff.npm run buildsucceeds (type-check + Vite library build +.d.ts+ entry shims).Behavior & docs:
components/button/__tests__). New props and bug fixes should get a regression test. Tests that genuinely need a real browser (focus traversal, layout/measurement, canvas) go in a*.browser.test.jsxfile (thebrowserproject); everything else is jsdom.npm run storybook→ http://localhost:6007/. Confirm the story actually renders and behaves (deprecated Storyshots/Karma are gone; there is no separate browser-tests server).content/visualPickerFigure, render props likerenderItem,iconprops,events), not assumptions — a common source of "component looks broken" reports has been stories authored against the wrong API. Cross-check againstcomponents/<name>/__examples__..d.ts(they're generated by the build); JS consumers rely on them via editor type-acquisition.No new tests: this removes dead code, and the unchanged story snapshots cover
Iconrendering with theiconprop and with sprites. I haven't checked Storybook by hand yet. The unchanged snapshots show the markup is identical.REVIEWER checklist (do not remove)
CIworkflow: lint, typecheck, test, build). Chromatic visual review, if configured, has been checked.components/__tests__/__snapshots__/story-snapshots.test.jsx.snap).@salesforce/design-system-react/components/<name>and nested paths resolve for ESM, CJS, and types). Removing/renaming a public component or export is a breaking change →feat!:/BREAKING CHANGE:and a major version bump.Replaces #3343, which GitHub closed as merged into
fix/v11-slds2-css-fixeswhile the rc.1 stack was being reordered. Master never got the change.