Skip to content

fix: SLDS 2 hook fixes and deprecate Icon productTheme - #3319

Merged
interactivellama merged 9 commits into
feat/v11-asks-2-cspfrom
fix/v11-slds2-css-fixes
Nov 24, 2026
Merged

interactivellama merged 9 commits into
feat/v11-asks-2-cspfrom
fix/v11-slds2-css-fixes

Conversation

@interactivellama

@interactivellama interactivellama commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Part of the v11 merge train, stack 3 "GA requirements": asks-2 CSP → SLDS 2 CSS fixes → asks-4 perf → perf improvements → per-component CSS (experimental, last).

Additional description

These SLDS 2 fixes come from the per-component CSS branch. They don't depend on it, so they ship in GA whether or not the per-component CSS goes ahead:

  • Icon productTheme is deprecated (with ProductTheme and utilities/product-tokens/icon-backgrounds), for removal before 11.0.0. The product brand colors aren't SLDS 2 theme values. Set the background with style or className instead. The prop still works and warns once.
  • ColorPicker: the inline border, shadow and no-color pattern read the SLDS 2 --slds-g-* hooks, with the old SLDS 1 values as fallbacks.
  • SimpleDataTable: the fixed-header border and radius hooks get SLDS 1 fallbacks. Without SLDS 2 loaded, the border used to disappear.
  • Removes the unused vendored assets/styles/slds-plus.css, and loads SLDS 2 CSS in the browser test project.

This PR has no breaking changes.


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 lint passes with 0 errors (npm run lint:fix to auto-fix). Warnings are the tracked gradual-migration backlog; do not add new errors.
  • npm run typecheck is clean (tsc --noEmit).
  • npm test -- --run passes — this runs both Vitest projects (jsdom unit + real-browser browser) and the story HTML snapshots. If you changed rendered markup on purpose, update snapshots with npm test -- --run -u and review the diff.
  • npm run build succeeds (type-check + Vite library build + .d.ts + entry shims).

Behavior & docs:

  • First-time contributors: sign the CLA (a bot will comment with instructions).
  • Added/updated Vitest + React Testing Library tests for the change (template: 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.jsx file (the browser project); everything else is jsdom.
  • Reviewed the component's Storybook stories: 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).
  • Story/example code uses the component's real prop API (e.g. slots like content / visualPickerFigure, render props like renderItem, icon props, events), not assumptions — a common source of "component looks broken" reports has been stories authored against the wrong API. Cross-check against components/<name>/__examples__.
  • Storybook Accessibility (a11y) panel shows no new violations for the affected stories.
  • If you added or changed a type, remember runtime PropTypes were removed in the TS migration — types are the contract. Ship accurate .d.ts (they're generated by the build); JS consumers rely on them via editor type-acquisition.

REVIEWER checklist (do not remove)

  • CI is green (GitHub Actions CI workflow: lint, typecheck, test, build). Chromatic visual review, if configured, has been checked.
  • Change has adequate test coverage; bug fixes include a regression test.
  • Reviewed the affected Storybook stories and their a11y panels.
  • Rendered markup still conforms to SLDS — check the story HTML snapshot diff (components/__tests__/__snapshots__/story-snapshots.test.jsx.snap).
  • Public API / package surface: if exports changed, the deep-import contract still holds (@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.

@interactivellama
interactivellama removed this pull request from stack #3321 November 16, 2026 09:08
@interactivellama
interactivellama removed this pull request from stack #3329 November 16, 2026 09:12
@interactivellama
interactivellama removed this pull request from stack #3330 November 16, 2026 09:19
@interactivellama
interactivellama removed this pull request from stack #3331 November 16, 2026 09:26
@interactivellama
interactivellama removed this pull request from stack #3332 November 16, 2026 22:31
@interactivellama interactivellama added this to the 11.0.0-rc.1 milestone Nov 18, 2026
@interactivellama
interactivellama removed this pull request from stack #3344 November 19, 2026 04:42
@interactivellama
interactivellama removed this pull request from stack #3346 November 19, 2026 22:05
@interactivellama
interactivellama removed this pull request from stack #3348 November 20, 2026 00:23
@interactivellama
interactivellama force-pushed the fix/v11-slds2-css-fixes branch 3 times, most recently from 8efb695 to d242e88 Compare November 20, 2026 23:51
@interactivellama
interactivellama force-pushed the fix/v11-slds2-css-fixes branch 2 times, most recently from 8fba6a1 to 7345741 Compare November 23, 2026 06:59
The product brand colors are not SLDS 2 theme values. Icon still applies
them, but now warns; set the background color with `style` or
`className` instead. ProductTheme and utilities/product-tokens/icon-backgrounds
are deprecated with it, for removal before 11.0.0.
The inline border, shadow and no-color gradient values were fixed SLDS 1
colors, so they ignored SLDS 2 themes. Read the matching --slds-g-* hooks,
with the old values as fallbacks.
…er border hooks

Without SLDS 2 loaded, the fixed-header border and radius hooks are
undefined, so the border disappeared. Add the SLDS 1 values as var() fallbacks.
Storybook loads SLDS 2 from @salesforce-ux/design-system-2, and nothing
references the vendored copy.
CHANGELOG: ColorPicker SLDS 2 hooks (Changed), Icon productTheme
(Deprecated) and the SimpleDataTable fixed-header fallback (Fixed).
ROADMAP: the productTheme removal for the migration guide, and
slds-plus.css deleted.
The example passed the deprecated productTheme, which the no-deprecated
lint from #3311 rejects in examples. Set the same backgroundColor values
through style, which is the migration the deprecation recommends.
Icon still honors productTheme until it is removed, and IconBackgrounds is
declared under utilities/, so local/no-deprecated flags the read. Disable
it on that line with the reason, as the onKeyPress forwards do.
@interactivellama
interactivellama marked this pull request as ready for review November 23, 2026 07:18
@interactivellama
interactivellama removed this pull request from stack #3359 November 23, 2026 07:57
@interactivellama
interactivellama removed this pull request from stack #3360 November 23, 2026 23:53
@interactivellama
interactivellama merged commit d922806 into master Nov 24, 2026
7 checks passed
@interactivellama
interactivellama deleted the fix/v11-slds2-css-fixes branch November 24, 2026 21:45
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.

2 participants