UI: Update @base-ui/react from 1.0.0 to 1.2.0#75698
Conversation
|
Size Change: +228 B (0%) Total Size: 6.84 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 4345d81. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22152944336
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
I've checked everything to the best of my ability 👍 |
ciampo
left a comment
There was a problem hiding this comment.
Couldn't spot any issues myself, LGTM 🚀
Are you going to work on dedicated Tooltip follow-ups?
Yes, I have a branch that I will post after this 👍 |
* Update @base-ui/react from 1.0.0 to 1.2.0 * Align Input ref type with upstream widening to HTMLElement * Update package-lock * Add changelog Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
What?
Updates
@base-ui/reactfrom 1.0.0 to 1.2.0 in@wordpress/ui.Why?
The dependency was pinned at 1.0.0 since it was first added. Two minor releases have shipped since then with bug fixes relevant to components we use (Field, Select, Dialog, Tooltip, Tabs, Input, Button).
Changelogs:
Testing Instructions
TypeScript, build, and unit tests pass.
Potentially affected components
finalFocuspropactionsRef/nativeLabelprops, re-render and autofocus fixesmergeProps/useRender(minor)HTMLElementmergeProps(minor)useRender/mergeProps(minor)useRender/mergeProps(minor)mergeProps/useRender(minor)Potential breakage analysis
Read more
Input ref type widening
The Base UI
Inputref changed fromHTMLInputElementtoHTMLElement(mui/base-ui#3866). OurInputcomponent previously declaredforwardRef<HTMLInputElement, InputProps>. This compiles fine (TypeScript uses bivariant checking for method-style declarations), and at runtime the underlying element is still an<input>, so consumers get anHTMLInputElementin their ref. This PR aligns our ref type with the upstream change.🔧 Addressed in 5c0d3ac
Button discriminated props union removal
The Base UI change (mui/base-ui#3643) removed the discriminated union on
nativeButtonand madeButton.Propsa flat interface. Our wrapper doesextends Omit<_ButtonProps, 'disabled' | 'aria-pressed'>. Since the type was simplified (less restrictive),Omitandextendscontinue to work. No issue.Tooltip disabled behavior change
"Prevent opening when focusing a disabled Trigger" and "Fix disabled prop on Triggers" are behavior changes. Previously, focusing a disabled trigger could still open the tooltip. Now it won't. This is likely the intended behavior, but it's a user-visible change — any disabled button wrapped in a Tooltip will no longer show the tooltip on focus.
🔧 This doesn't affect our usage (especially
IconButton) as it stands, but I will address some of the disabled tooltip quirks separately. This is the specific case that this upstream fix addresses, by the way:Select — no current impact
Our
Select.Popupexplicitly setsalignItemWithTrigger={false}, so the fixes aroundalignItemWithTriggerCSS animations don't apply. The typeahead reset and highlight fixes are internal behavioral improvements. The newfinalFocusandautoCompleteprops pass throughSelectRootPropsautomatically.Field — new props pass through
actionsRefandnativeLabelare new additive props. OurFieldRootPropsomits a specific set of props but not these, so they'll be available to consumers automatically. The re-render fix for uncontrolledField.Controland the autofocus SSR fix are internal improvements.Tabs — transition attributes are additive
The new
data-*transition attributes onPanelare purely additive. No CSS in our styles targets these data attributes, so no visual side effects.useRender/mergePropsThese were made public in 1.1.0, meaning our imports are now officially supported rather than de-facto public internals. The API itself didn't change —
defaultTagNameremains optional.Dialog — bugfix only
The "Maximum update depth exceeded" Suspense fix and ref type fix are internal. Our
Dialog.Popupwraps_Dialog.Popupwith a plaindivref and doesn't use Suspense boundaries inside the dialog.