UI: Update @base-ui/react from 1.3.0 to 1.4.0#77308
Conversation
|
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. |
Made-with: Cursor
3a0c224 to
fa5b889
Compare
@base-ui/react from 1.3.0 to 1.4.0
Base UI 1.4.0 includes a fix for mui/base-ui#4361, which narrows the render prop warning to no longer false-positive on screaming snake case constants like `DEFAULT_RENDER`. The `textareaRender` rename (from `Render`) is kept because PascalCase names are still warned about, as intended. Made-with: Cursor
Base UI 1.4.0 added a state-callback form to the `style` prop (mirroring what `className` already had). This caused type mismatches where our wrapper components forward `style` to elements that only accept plain `CSSProperties`. - `ComponentProps`: strip and redefine `style` as plain `CSSProperties`, consistent with how `className` is already handled - `SelectPopupProps`: override `style` since it's forwarded to the Positioner (different state type than Popup) Made-with: Cursor
The render function example used `defaultRender` (the workaround name from #76603). Now that the code uses `DEFAULT_RENDER` again, update the documentation to match. Made-with: Cursor
| /** | ||
| * CSS style to apply to the component. | ||
| */ | ||
| style?: React.CSSProperties; |
There was a problem hiding this comment.
Had to add an explicit style override because now base ui also provides a callback version that exposes state as an argument (similarly to className, i believe).
The Base UI callback also introduces type errors when we forward props in components such as our *.Popup components, since the external type and the internal base UI component receiving style have a different state argument. This change prevents the type error.
SelectTriggerProps and SelectItemProps extend Base UI props directly (not through ComponentProps), so they were leaking the new style callback form from 1.4.0. Strip it for consistency with how ComponentProps handles style across all other components. Made-with: Cursor
|
Size Change: +527 B (+0.01%) Total Size: 7.74 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Flaky tests detected in ecff64c. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24397544491
|
…omponentProps Update className/style JSDoc in ComponentProps to say "element" instead of "component". Refactor SelectTriggerProps, SelectPopupProps, and SelectItemProps to use ComponentProps instead of manually omitting and re-adding style — consistent with the pattern used by Tabs and Fieldset. Made-with: Cursor
What?
Update
@base-ui/reactfrom1.3.0to1.4.0inpackages/ui.Why?
v1.4.0 was released on April 13, 2026. It is a bug-fix release with no breaking changes, bringing fixes for several components used by
@wordpress/ui.It also includes a fix for a specific issue that we had raised in mui/base-ui#4361
How?
packages/ui/package.jsonfrom^1.3.0to^1.4.0and regenerated the lockfile.DEFAULT_RENDERnaming workaround inField.Root(introduced in UI: Update @base-ui/react from 1.2.0 to 1.3.0 #76603). Base UI 1.4.0 fixes the false-positive render prop warning for screaming snake case constants, so the workaround is no longer needed. ThetextareaRenderrename inTextareais kept because PascalCase names are still warned about (correctly so).styleprop in Base UI 1.4.0 (mirroring whatclassNamealready had). UpdatedComponentPropsto strip and redefinestyleas plainCSSProperties, consistent with howclassNameis already handled. Also overrodestyleinSelectPopupProps(forwarded to Positioner, different state type),SelectTriggerProps, andSelectItemProps(bypassComponentProps, so needed explicit stripping for consistency).CONTRIBUTING.mdrender prop example to match the revertedDEFAULT_RENDERnaming.Audit summary
Version comparison
1.3.0^1.4.0(resolves to1.4.0)1.4.0Changelog review
Bug-fix release — no breaking changes, no deprecations. Notable fixes relevant to
@wordpress/ui:readOnlymodekeepMountedhas no transitionsmodal; sync hover open event stateactivationDirectionnot updating on programmatic value changes; fix activation direction on first render; skip client-only prehydration scriptsPositionernot repositioning to a different trigger when reopened withkeepMounted; fix outside-press dismissal in a shared shadow rootA new preview
OTPFieldcomponent was added but is not consumed by@wordpress/ui.Codebase audit
DEFAULT_RENDER→defaultRenderinField.RootandRender→textareaRenderinTextareato avoid a false-positive render prop warning (mui/base-ui#4361). Base UI 1.4.0 fixes this for screaming snake case names, so theDEFAULT_RENDERrename is reverted. ThetextareaRenderrename is kept since PascalCase names likeRenderare still caught by the (now correct) warning.styleprop type change: Base UI 1.4.0 added a state-callback form to thestyleprop on all components (e.g.style?: CSSProperties | ((state: State) => CSSProperties)), mirroring whatclassNamealready had. This caused TypeScript errors where our wrapper components forwardstyleto elements that only accept plainCSSProperties. Fixed by stripping the callback form inComponentProps(matching existingclassNametreatment) and overridingstyleinSelectPopupProps,SelectTriggerProps, andSelectItemProps(these bypassComponentPropsand extend Base UI props directly).onValueChangenot firing for automatic tab selection). That issue is still open and the fix PR (mui/base-ui#3758) has not been merged yet — TODOs remain valid.tabbabledependency: Base UI 1.4.0 droppedtabbablefrom its own dependencies, butpackages/uiuses it directly inuseDeprioritizedInitialFocus— no action needed.@date-fns/tzanddate-fnswere added as optional peer deps (for the newOTPField). Not required by any components we use.Ecosystem compatibility
No sibling
@base-ui/*packages are used as direct dependencies. The transitive sub-dependency@base-ui/utilswas updated from0.2.6to0.2.7.@floating-ui/react-domrange is unchanged.Security check
npm auditshows no vulnerabilities for@base-ui/react. Pre-existing repo-wide vulnerabilities are unrelated.Build and test
All 270 tests across 32 test suites in
packages/uipass. Build succeeds. Minoract(...)console warnings in tabs tests are pre-existing and unrelated to this update.Testing Instructions
npm run test:unit packages/ui— all tests should pass.npm run build— build should succeed.cd packages/ui && npx storybook dev) and smoke-test components wrapping Base UI: Button, Dialog, AlertDialog, Popover, Tabs, Collapsible, Select, Tooltip.Use of AI Tools
This PR was authored with the assistance of Cursor (Claude).