Repository navigation
feat!: v11 root-and-refs (className, style and ref on the root) - #3301
Closed
interactivellama wants to merge 58 commits into
Closed
interactivellama wants to merge 58 commits into
interactivellama wants to merge 58 commits into
Conversation
Button keeps the requestFocus/onRequestFocus pair working, but both are marked @deprecated and warn once. They were not deprecated in 0.10.x, so v11 deprecates them instead of removing them. SimpleDataTableInteractiveElement now focuses forwardRef components (Button, Checkbox, the internal link, which is now forwardRef) through `ref`. Other wrapped components, such as MenuDropdown in row actions, still receive requestFocus/onRequestFocus.
…lbacks #3251 already passes the triggering event (or undefined from the autoplay timer) to onRequestPanelChange and onRequestAutoplayToggle. The existing key-path test only checked that the event was truthy, which an empty object also passes.
Handlers that read a consumer's events object through the ref stay stable, although that object is usually new on every render.
…the validators - events.onClose, onOpen, onRequestClose and onRequestOpen were typed but ignored. They are now called. The top-level props of the same names still work, are called after their events counterparts, and warn once. - events.onRequestClose fires before the popover closes, so a controlled parent can keep it open. data.trigger is typed ColorPickerRequestCloseTrigger. - events.onValidateColor/onValidateWorkingColor return a value, so they are not events. They become the top-level validateColor and validateWorkingColor props. The old keys still work and warn once. - Handlers read events through useLatestRef, and the events default is a module constant, so a new events object no longer rebuilds them.
events was merged into a new object on every render and listed in the dependencies of every handler, so each render rebuilt requestOpen, requestClose, the key and input handlers, and everything that depended on them. The handlers now read the latest events through a ref.
Checkbox keeps the requestFocus/onRequestFocus pair working, but both are marked @deprecated and warn once. They were not deprecated in 0.10.x, so v11 deprecates them instead of removing them. Focus the checkbox through `ref`, which is forwarded to the `<input>`.
Radio keeps the requestFocus/onRequestFocus pair working, but both are marked @deprecated and checkDeprecatedProps warns once. They were not deprecated in 0.10.x, so v11 deprecates them instead of removing them. Focus the radio through `refs.input`: keep the `<input>` it receives and call `.focus()`.
onSort was called as (data, event) and RowActions onAction as
(item, option). Both now follow the (event, data) convention:
onSort(event, { property, sortDirection }) and
onAction(event, { item, option }). onLoadMore, which took no arguments,
now receives (event, { trigger }). The examples and tests use the new
signatures. The deprecated onChange(selection, event) is unchanged; it
already warns and points to onRowChange.
BREAKING CHANGE: SimpleDataTable onSort is called as
onSort(event, { property, sortDirection }) instead of
onSort({ property, sortDirection }, event), and SimpleDataTableRowActions
onAction as onAction(event, { item, option }) instead of
onAction(item, option).
…out an event When the calendar moves focus because a new month rendered, there is no DOM event. onCalendarFocus now gets `undefined` for it, like SimpleDataTable onLoadMore and onFixedHeaderResize, instead of `null`. Keyboard moves still pass the keydown event. BREAKING CHANGE: DatePicker onCalendarFocus receives `undefined`, not `null`, as `event` after a month change. Replace `event === null` with `!event` or `event === undefined`.
onClickHeadingLink keeps its single `(event)` argument: it is a plain click with no component data, like a native onClick. The event is now typed React.MouseEvent<HTMLAnchorElement>.
required sets the native attribute and the label asterisk. aria-required still works and warns once.
The title stays an h1 by default.
ariaLabelledby is deprecated and still works with a warning.
…roup the tooltip props
steps[].assistiveText is { label } (a plain string is deprecated), and
tooltipIsOpenSteps/tooltipPosition move into tooltip.{isOpenSteps,position}.
The old forms still work with a warning.
…label labels.error accepts a node, errorId is deprecated, and labels.label is the visible legend (assistiveText.label hides it only when labels.label is unset).
The heading stays an h4 by default.
…without static defaultProps
BREAKING CHANGE: ref now points at the input element instead of the wrapper div. styleContainer is deprecated in favour of style, and inputRef in favour of ref.
BREAKING CHANGE: the root id is now the id you pass, not id-listbox-of-pill-options. Update any selector or aria reference that used the old suffixed id.
BREAKING CHANGE: className used to land on the role=progressbar element. It now lands on the root. Use classNameBar for the progressbar element.
…NameControl BREAKING CHANGE: className used to land on .slds-form-element__control. It now lands on the fieldset. Use classNameControl for the control element.
… mode BREAKING CHANGE: with isCard, id and className now land on the section, not the ol.
…add classNameTable BREAKING CHANGE: with fixedHeader, className now lands on the outer container div instead of the table. Use classNameTable for the table element.
…function component
… to className*, style
8 of 15 tasks
interactivellama
force-pushed
the
feat/v11-p1-5-labels-naming
branch
2 times, most recently
from
November 12, 2026 07:33
e9f3f2b to
7a3c76c
Compare
4 of 15 tasks
interactivellama
added a commit
that referenced
this pull request
Nov 16, 2026
The guide was written against the root-and-refs and slots changes (#3301, closed) that are not in feat/v11-p1-7-typing. Drop the rows and snippets for them: Badge and MediaObject children, the className* parts on Combobox, DatePicker, Input, ProgressBar, RadioGroup and SimpleDataTable, Tooltip className/style, Popover aria-labelledby, and the other renames that did not land. requestFocus is deprecated, not removed, on Button, Checkbox and Radio.
interactivellama
added a commit
that referenced
this pull request
Nov 18, 2026
The guide was written against the root-and-refs and slots changes (#3301, closed) that are not in feat/v11-p1-7-typing. Drop the rows and snippets for them: Badge and MediaObject children, the className* parts on Combobox, DatePicker, Input, ProgressBar, RadioGroup and SimpleDataTable, Tooltip className/style, Popover aria-labelledby, and the other renames that did not land. requestFocus is deprecated, not removed, on Button, Checkbox and Radio.
interactivellama
added a commit
that referenced
this pull request
Nov 19, 2026
The guide was written against the root-and-refs and slots changes (#3301, closed) that are not in feat/v11-p1-7-typing. Drop the rows and snippets for them: Badge and MediaObject children, the className* parts on Combobox, DatePicker, Input, ProgressBar, RadioGroup and SimpleDataTable, Tooltip className/style, Popover aria-labelledby, and the other renames that did not land. requestFocus is deprecated, not removed, on Button, Checkbox and Radio.
8 of 15 tasks
interactivellama
added a commit
that referenced
this pull request
Nov 20, 2026
Render every export from components/index with minimal props and check it against the DOM Node & Ref Conventions: `data-*`/`aria-*` props reach the DOM, `className`, `style` and the forwarded `ref` land on the outermost element, and a consumer `onClick` runs alongside the component's own click handling. A new export without a fixture fails the suite. Components that don't meet a check yet are listed in `exemptions` with a reason; most are the ROADMAP P2 additive hardening (`...rest`, `className`, `style`, `forwardRef`), and the rest are documented placements that would be breaking to move (root-and-refs, #3301 closed). An exemption that starts passing fails, so the list can't go stale.
interactivellama
added a commit
that referenced
this pull request
Nov 20, 2026
The guide was written against the root-and-refs and slots changes (#3301, closed) that are not in feat/v11-p1-7-typing. Drop the rows and snippets for them: Badge and MediaObject children, the className* parts on Combobox, DatePicker, Input, ProgressBar, RadioGroup and SimpleDataTable, Tooltip className/style, Popover aria-labelledby, and the other renames that did not land. requestFocus is deprecated, not removed, on Button, Checkbox and Radio.
interactivellama
added a commit
that referenced
this pull request
Nov 20, 2026
Render every export from components/index with minimal props and check it against the DOM Node & Ref Conventions: `data-*`/`aria-*` props reach the DOM, `className`, `style` and the forwarded `ref` land on the outermost element, and a consumer `onClick` runs alongside the component's own click handling. A new export without a fixture fails the suite. Components that don't meet a check yet are listed in `exemptions` with a reason; most are the ROADMAP P2 additive hardening (`...rest`, `className`, `style`, `forwardRef`), and the rest are documented placements that would be breaking to move (root-and-refs, #3301 closed). An exemption that starts passing fails, so the list can't go stale.
interactivellama
added a commit
that referenced
this pull request
Nov 23, 2026
The guide was written against the root-and-refs and slots changes (#3301, closed) that are not in feat/v11-p1-7-typing. Drop the rows and snippets for them: Badge and MediaObject children, the className* parts on Combobox, DatePicker, Input, ProgressBar, RadioGroup and SimpleDataTable, Tooltip className/style, Popover aria-labelledby, and the other renames that did not land. requestFocus is deprecated, not removed, on Button, Checkbox and Radio.
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.
Stacked on #3298
Additional description
Theme 6 of the v11 P1 prop-freeze review (root-and-refs).
className,style,idandrefgo on the real root element. Parts getclassName*props, andrefis the only ref API. Renamed props keep working, warn once, and lose to the new prop when both are passed.styleandclassNameon the rootnav;styleContainerdeprecatedrefgoes to the<button>;buttonRefdeprecated (internal callers migrated)className/styleon the real root instead of a hard-coded wrapperclassNameBodyreplacesbodyClassName(deprecated)idon the rootclassNameon the root.slds-form-element;classNameComboboxfor the inner.slds-combobox;classNameContainerdeprecated;refnow gets a DOM nodeclassNameon the root instead of the dialog;classNameMenu,classNameTrigger(replacestriggerClassName);refgoes to the rootclassNameon the root of every variantrefgoes to the<input>, not the wrapper;stylereplacesstyleContainer;inputRefdeprecated; newclassNameInput; Search forwardsrefrefgoes to the trigger button;requestFocusdeprecatedrefis the root element, not an imperative handleid(no-listbox-of-pill-optionssuffix)classNameon the root;classNameBarfor therole="progressbar"elementrefgoes to the<input>;refs.inputdeprecatedclassNameon the fieldset;classNameControlfor the control divid/classNameon the real root in each modeclassNameon the outermost element;classNameTablefor the<table>refgoes to the root;ToastContainerclassNametyped as a stringclassNameTrigger,styleTrigger,classNameDialogreplace thetrigger*/dialog*names (deprecated)TrialBarButtonmerges consumerclassName/styleinstead of overriding themrefgoes to the rootdivrefgoes to thefieldsetInfoBadgeclassNametyped like other components and merged into the root classMigration lines are in the CHANGELOG (
### Changed) and in eachBREAKING CHANGE:footer.Decisions
refpoint at the wrapperdiv. Retyping or retargeting them is noted for theme 7 (typing), along with thelinksVisualPicker not attaching its ref.Full list in
.planning/v11-p1/6-root-and-refs.md.Review
npm run test:cipasses: 1660 tests, 0 lint errors.master, so it also covered themes 3–5) and reported 5 findings, all judged false positives:CONTRIBUTOR checklist
npm run lint0 errors,npm run typecheckclean,npm test -- --runpasses,npm run buildsucceeds