Repository navigation
fix: visual regressions - #3276
Merged
Merged
Conversation
Leaf items render a disabled placeholder chevron so their labels line up with branch labels. SLDS 1 hid it with a tree rule for `.slds-is-disabled` that SLDS 2 doesn't have, so every leaf, selected ones included, showed a chevron. Add `slds-hidden` to the placeholder and restore its `aria-hidden`. The rewrite also dropped `aria-controls` and `aria-hidden` from the branch toggle. SLDS 1 only rotates an expanded branch's chevron when `aria-controls` is set, so the chevron stayed pointing right. Restore both attributes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
SLDS 1 sized the fallback icon through `.slds-avatar_<size> .slds-icon`. SLDS 2 dropped those rules, so the icon rendered at the default 2rem in every avatar size. Pass the avatar's `size` to the Icon; the icon size classes match the avatar sizes one to one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Modal has always rendered the close button unless `disableClose` is
set. SLDS 1 hid it on prompts with `.slds-modal_prompt
.slds-modal__close { display: none }`, which SLDS 2 doesn't have, so
prompts showed a close button the SLDS prompt blueprint leaves out.
Skip the close button for prompts.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ToastContainer and AlertContainer used the hyphenated `slds-notify-container` class. SLDS 1 styled both spellings, but SLDS 2 only styles `slds-notify_container`, so the containers were no longer fixed to the top of the viewport. Use the underscore class. The rewrite also changed the Toast close button's `iconSize` from `large` to `medium`. Restore `large`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
SLDS 1 set `pointer-events: none` on `.slds-input-has-icon .slds-input__icon:not(button)`, so clicking a decorative icon focused the input under it. SLDS 2 dropped the rule, and the icon swallowed the click. Set the style on the non-button InputIcon variants. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The visual-picker label carried `slds-checkbox_button__label`, a class from the button-group variant. SLDS 1 only styled it inside `.slds-checkbox_button`, but SLDS 2 styles it on its own, so it drew a border and background around the whole picker. Remove it from the visual-picker label. Co-Authored-By: Claude Opus 5.5 <[email protected]>
SLDS 1 sized and positioned the complete check for every welcome mat check icon. SLDS 2 only does so inside a welcome mat tile, so the badge's check rendered as a large icon below the badge. Give the badge's check the SLDS 1 geometry with inline styles and an `xx-small` icon. Its visibility still comes from `.slds-welcome-mat__info-progress_complete`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The dropdown passes its `assistiveText` to the trigger Button, and Button renders icon-only, with the label replaced by assistive text, when it has an icon and `assistiveText.icon`. A child Button with a `label` and an icon, such as the TrialBarDropdown trigger, lost its visible label. When the child Button has a `label` and no `assistiveText` of its own, clear the inherited icon text. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The pre-rewrite Accordion moved focus in `componentDidUpdate` only when the focused panel index changed. The rewrite's `useEffect` also runs on mount, so rendering an Accordion took focus from the page. Track the previous index and only focus when it changes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`dateDisabled` was typed `(date: Date) => boolean`, but the calendar
calls it with `{ date }`, so a handler written against the type got
an object instead of a Date. Type it
`({ date }: { date: Date }) => boolean`, drop the cast in
CalendarWrapper, and add a type test.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
These stories rendered broken layouts because they didn't use the
components' real props:
- Spinner AllSizes: add `isInline`, so the spinners sit in the row
instead of stacking at the same absolute position
- SetupAssistant: mark steps complete with `progress={100}`;
SetupAssistantStep has no `isComplete` prop
- PageHeader: wrap controls in `PageHeaderControl`, which PageHeader
selects children by
- BuilderHeader: pass the nav as `builderNav` and the toolbar groups as
`toolbarButtonGroups`
- Tooltip InButtonGroup: use a `list` ButtonGroup with `list-item`
tooltips
- Checkbox ButtonGroup: render the `button-group` variant inside a
checkbox ButtonGroup, which supplies the group wrapper
Co-Authored-By: Claude Opus 5.5 <[email protected]>
`.planning/` is gitignored agent scratch space (see AGENTS.md), but ESLint still linted it locally, so a Storybook build or scripts there made `npm run lint` fail. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Restoring `iconSize="large"` matched the pre-rewrite Toast, but under SLDS 2 the close button renders too large. Keep `medium`, and drop the matching test assertion, CHANGELOG line and snapshot changes. The notify container class fix is unchanged.
Contributor
|
I checked https://www.lightningdesignsystem.com/2e1ef8501/p/216f79-toast And it looks more like the medium close icon on the toast component. I went ahead and pushed up the fix. My guess is it used to be larger in SLDS 1. |
interactivellama
approved these changes
Nov 4, 2026
interactivellama
left a comment
Contributor
There was a problem hiding this comment.
@Niznikr Great finds! Thanks for being proactive!
8 of 15 tasks
interactivellama
added a commit
that referenced
this pull request
Nov 20, 2026
Every story, plus fixtures for the exported components no story renders, mounts with focus on an outside input and re-renders its parent three times; focus must not move. This is the class of the Accordion mount-focus bug (#3276). Components built to take focus on mount (open dialogs, dismissible Alert, Toast) are listed with their reasons and must keep focus where they put it. A coverage check fails when a new export is neither rendered by a story nor classified.
interactivellama
added a commit
that referenced
this pull request
Nov 20, 2026
Every story, plus fixtures for the exported components no story renders, mounts with focus on an outside input and re-renders its parent three times; focus must not move. This is the class of the Accordion mount-focus bug (#3276). Components built to take focus on mount (open dialogs, dismissible Alert, Toast) are listed with their reasons and must keep focus where they put it. A coverage check fails when a new export is neither rendered by a story nor classified.
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.
Additional description
Fixes visual regressions from the v11 rewrite, found by comparing every component against the pre-rewrite baseline (
cce85579c) under both SLDS 1 and SLDS 2 (lightning-blue). Most of them have the same root cause: the markup depended on CSS that SLDS 1 ships and SLDS 2 doesn't. The rest are changes the rewrite made by accident. Each fix is a separate commit with a regression test and its own snapshot and CHANGELOG lines, so the PR can be reviewed one commit at a time.fix(tree).slds-is-disabledrule that SLDS 2 doesn't have; it now getsslds-hidden. The rewrite also droppedaria-controlsandaria-hiddenfrom the branch toggle, and SLDS 1 only rotates the chevron whenaria-controlsis set.fix(avatar).slds-avatar_<size> .slds-iconrules. The Icon now gets the avatar'ssize.fix(modal)disableCloseis set, and SLDS 1 hid it with.slds-modal_prompt .slds-modal__close { display: none }. SLDS 2 has no such rule, so prompts now skip the button.fix(toast)slds-notify_container, not the hyphenatedslds-notify-containerthe containers used. The rewrite had changed the close button fromiconSize="large"to"medium".fix(input).slds-input-has-icon .slds-input__icon:not(button) { pointer-events: none }is gone in SLDS 2. The non-button InputIcon variants now set the style themselves.fix(checkbox)visual-pickervariant drew a border and background around the whole picker.slds-checkbox_button__label, a class from the button-group variant. SLDS 1 only styled it inside.slds-checkbox_button; SLDS 2 styles it anywhere.fix(welcome-mat)fix(menu-dropdown)assistiveTextto the trigger Button, which renders icon-only when it has an icon andassistiveText.icon. A labelled child Button with noassistiveTextof its own now clears the inherited icon text.fix(accordion)componentDidUpdate. The rewrite'suseEffectalso runs on mount.fix(date-picker)dateDisabledhandlers written against the type received an object, not aDate.(date: Date) => boolean, but the calendar calls it with{ date }. It is now({ date }: { date: Date }) => boolean, with a type test.docs:isInline, SetupAssistantprogress,PageHeaderControl, BuilderHeaderbuilderNav/toolbarButtonGroups, alistButtonGroup in the Tooltip story, and the checkbox ButtonGroup example.chore(eslint).planning/scratch directory so local lint runs don't pick it up.For the reviewer:
dateDisabledtype. TypeScript consumers who typed a handler as(date: Date) => booleanwill now get a type error. Under the breaking-change taxonomy, a prop type change normally needs!. I left it asfix:because the old type never matched how the prop is called: those handlers received{ date }and were already broken at runtime. Say if you'd rather mark it breaking.Snapshot diff. All snapshot changes come from the fixes above: tree toggle attributes, notify container class, toast close icon class, input icon style, visual-picker label class, the TrialBar trigger label, and the corrected stories.
Not changed (SLDS 2 gaps, not component regressions):
stacked/stackedHorizontal: SLDS 2 doesn't ship stacked table styles, so these props only work under SLDS 1. The markup is the same as before the rewrite..slds-pill:focusstyle, so a focused pill gets the browser's default focus ring. Focus is still visible.hasStaticAlignment) weren't carried over. The current Alignments story is too cramped to show placement; that's for a follow-up.Checked and found to match the baseline: ButtonStateful selected icons, focus stacking in checkbox and radio button groups, and Popover nubbin placement when the popover is shifted.
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.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.