Repository navigation
fix!: upgrade @base-ui/react to 1.7.0 - #307
Merged
Merged
Conversation
Five minor releases (1.3.0 -> 1.7.0, Feb to Aug 2026) across the 27 @base-ui/react modules this repo uses. Of the three breaking changes declared upstream, only one reaches us: `Drawer` was unmarked as preview in 1.3.0, renaming the namespace export `DrawerPreview` -> `Drawer`. 1.7.0 ships no deprecated alias, so the rename is mandatory — the 11 imports under packages/overlays/src/drawer/subcomponents all alias to `BaseDrawer`, so only the import specifier changes. The other two (`sanitizeValue()` -> `normalizeValue()`, `OTPFieldPreview` -> `OTPField`) touch APIs this repo does not use. Two undeclared behaviour changes did reach our tests: - Accordion lost roving focus in 1.6.0 (mui/base-ui#4965), following the APG which no longer recommends it (w3c/aria-practices#3434). Arrow keys no longer move focus between triggers; Tab does. The test now covers both. - 1.7.0 appends an invisible Word Joiner (U+2060) to Combobox/Autocomplete empty state text for ~200ms so Safari VoiceOver announces the polite live region. Exact-string matching broke on the marker; the assertion now matches loosely. Neither is a defect in this repo — both are upstream corrections our tests were pinning to the old behaviour. Verified: 481 tests pass, 17/17 build tasks including docs prerender, all size budgets green (aggregate 291.27 -> 295.71 kB), format and lint clean. The externalization from #305 still holds — no base-ui bundled in any dist. BREAKING CHANGE: the @base-ui/react peer range moves from ^1.2.0 to ^1.7.0. Consumers on 1.2.x-1.6.x must upgrade. Accordion triggers are no longer a roving focus group — arrow keys no longer move focus between them, per current APG guidance. Closes #303
Contributor
|
🏷️ Auto-labeled this PR: |
Contributor
Size report (affected packages)
Checked 11 affected package(s). Unchanged packages were not rebuilt. |
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.
Upgrades
@base-ui/reactfrom 1.2.0 (Feb 2026) to 1.7.0 (Aug 2026) — five minor releases across the 27 modules this repo uses.Closes #303
Declared breaking changes: one reaches us
Drawerunmarked as preview —DrawerPreview→DrawersanitizeValue()→normalizeValue()OTPFieldPreview→OTPFieldotp-fieldunusedThe issue asked whether 1.7.0 still ships
DrawerPreviewas a deprecated alias. It does not —package/drawer/index.d.tsin the published tarball exports onlyexport * as Drawer from "./index.parts.js". The rename is mandatory; without it the build fails. All 11 imports alias toBaseDrawer, so only the specifier changed and no call site below it moved. Confirmed in the emitted output:The real work: undeclared behaviour changes
The table above is only what the release notes declare. I read all six releases against the 27 modules actually in use. Two undeclared changes reached our test suite — both upstream corrections, neither a defect here:
Accordion lost roving focus (1.6.0, mui/base-ui#4965). The W3C APG stopped recommending roving focus for accordions (w3c/aria-practices#3434), so arrow keys no longer move focus between triggers — Tab does. Our test pinned the retired behaviour. It now covers both directions: Tab moves focus, arrows do not.
Empty-state text carries an invisible marker (1.7.0).
useInitialLiveRegionTextMutationappends a Word Joiner (U+2060, zero-width) to Combobox/Autocomplete empty text for ~200ms, forcing a live-region mutation so Safari VoiceOver announces it reliably. Exact-string matching broke on the marker even though the text renders identically. The assertion now matches loosely.Changes
@base-ui/reactpeer range^1.2.0→^1.7.0, dev pin1.2.0→1.7.0, across the eight consuming packagesDrawerPreview as BaseDrawer→Drawer as BaseDrawerin 11 files underpackages/overlays/src/drawer/subcomponents/The peer range is set to
^1.7.0— the version actually built and tested against.^1.3.0is the technical floor (the first release with the stableDrawerexport), but declaring support for 1.3–1.6 would claim coverage this PR does not verify.What CI cannot verify — needs a human
vitest.config.tsandapps/storybook/.storybook/main.tsboth alias@uiid/*to source, so neither can observe anything that only manifests in built output or in real layout. jsdom has no layout engine, so no green test run is evidence about positioning. Three specific exposures from the release notes:--anchor-widthpixel-snapping (1.3.0, #4082) — snaps--anchor-width/--anchor-heightto the device pixel grid. We consume--anchor-widthin exactly three CSS modules:autocomplete,combobox, andselect— the three components flagged in the issue for positioning drift. Popup widths may shift sub-pixel.Drawer swipe CSS variable inheritance (1.3.0, #4099)— resolved, no risk.--drawer-swipe-progressis a declared CSS variable of the Backdrop part itself (DrawerBackdropCssVars.swipeProgress), set directly on the backdrop element rather than inherited from an ancestor, so disabling inheritance cannot affect it. The official 1.7.0 drawer docs drive the backdrop with the identical expressioncalc(var(--backdrop-opacity) * (1 - var(--drawer-swipe-progress))); ourdrawer.module.cssmatches it and additionally supplies a, 0fallback.collisionPaddingoff-by-one (#5143), auto-resize origin for left-anchored popups (#5370), layout/passive effect timing (#5337), popup unmounting after a canceled exit transition (#5401).apps/docsis the only surface consuming builtdist; it builds and prerenders every overlays page, which exercises the components but does not validate visual positioning.Verification
DrawerPreviewremains anywhere in the repodistimports{ Drawer as … } from "@base-ui/react/drawer".pnpm(fix!: externalize @base-ui/react so packages share one instance #305's dedup holds)pnpm run build— 17/17 tasks, includingdocs:buildprerendering all overlays pagestsc -bclean across 123render={}usages despite 1.7.0 retyping render callbacks (#5104)pnpm test:run— 481 passed, 2 skipped, 42 filespnpm size— all under budget; aggregate 291.27 → 295.71 kB (+4.44),overlays+2.39,forms+1.27,interactive−1.23@base-ui/reactbundled into anydist— externalization from fix!: externalize @base-ui/react so packages share one instance #305 intactformat:checkclean,lintreports 0 errorsselect/combobox/autocompletepopup widths — covered by the Storybook sweep above, but not measured at pixel level against--anchor-widthsnappingThe Storybook sweep surfaced one failure, in the typography tokens story. It is unrelated to this upgrade:
@uiid/typographydeclares no@base-ui/reactdependency and imports none in source, and its 19 tests pass. Tracked separately as a token-story audit.Breaking changes
^1.7.0. Consumers on 1.2.x–1.6.x must upgrade@base-ui/react.