Skip to content

fix!: upgrade @base-ui/react to 1.7.0 - #307

Merged
adamfratino merged 1 commit into
mainfrom
chore/upgrade-base-ui-170
Aug 20, 2026
Merged

adamfratino merged 1 commit into
mainfrom
chore/upgrade-base-ui-170

Conversation

@adamfratino

@adamfratino adamfratino commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

Upgrades @base-ui/react from 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

Release Breaking change Exposure
v1.3.0 Drawer unmarked as preview — DrawerPreview → Drawer 11 files
v1.5.0 sanitizeValue() → normalizeValue() none
v1.6.0 OTPFieldPreview → OTPField none — otp-field unused

The issue asked whether 1.7.0 still ships DrawerPreview as a deprecated alias. It does not — package/drawer/index.d.ts in the published tarball exports only export * as Drawer from "./index.parts.js". The rename is mandatory; without it the build fails. All 11 imports alias to BaseDrawer, so only the specifier changed and no call site below it moved. Confirmed in the emitted output:

import { Drawer as e } from "@base-ui/react/drawer";

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). useInitialLiveRegionTextMutation appends 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/react peer range ^1.2.0 → ^1.7.0, dev pin 1.2.0 → 1.7.0, across the eight consuming packages
  • DrawerPreview as BaseDrawer → Drawer as BaseDrawer in 11 files under packages/overlays/src/drawer/subcomponents/
  • Two test assertions updated to track the upstream behaviour changes above

The peer range is set to ^1.7.0 — the version actually built and tested against. ^1.3.0 is the technical floor (the first release with the stable Drawer export), 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.ts and apps/storybook/.storybook/main.ts both 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:

  1. --anchor-width pixel-snapping (1.3.0, #4082) — snaps --anchor-width/--anchor-height to the device pixel grid. We consume --anchor-width in exactly three CSS modules: autocomplete, combobox, and select — the three components flagged in the issue for positioning drift. Popup widths may shift sub-pixel.
  2. Drawer swipe CSS variable inheritance (1.3.0, #4099) — resolved, no risk. --drawer-swipe-progress is 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 expression calc(var(--backdrop-opacity) * (1 - var(--drawer-swipe-progress))); our drawer.module.css matches it and additionally supplies a , 0 fallback.
  3. Popup positioning and timing fixes (1.7.0) — unpositioned popups kept at viewport origin (#5299), collisionPadding off-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/docs is the only surface consuming built dist; it builds and prerenders every overlays page, which exercises the components but does not validate visual positioning.

Verification

  • No DrawerPreview remains anywhere in the repo
  • Emitted dist imports { Drawer as … } from "@base-ui/react/drawer"
  • Installed version is 1.7.0, still resolving to a single shared copy under .pnpm (fix!: externalize @base-ui/react so packages share one instance #305's dedup holds)
  • pnpm run build — 17/17 tasks, including docs:build prerendering all overlays pages
  • tsc -b clean across 123 render={} usages despite 1.7.0 retyping render callbacks (#5104)
  • pnpm test:run — 481 passed, 2 skipped, 42 files
  • pnpm size — all under budget; aggregate 291.27 → 295.71 kB (+4.44), overlays +2.39, forms +1.27, interactive −1.23
  • No @base-ui/react bundled into any dist — externalization from fix!: externalize @base-ui/react so packages share one instance #305 intact
  • format:check clean, lint reports 0 errors
  • Drawer backdrop-fade variable verified against Base UI source and the 1.7.0 docs — see exposure 2 above
  • Storybook exercised by hand — overlays and forms reviewed, no drift observed
  • select / combobox / autocomplete popup widths — covered by the Storybook sweep above, but not measured at pixel level against --anchor-width snapping

The Storybook sweep surfaced one failure, in the typography tokens story. It is unrelated to this upgrade: @uiid/typography declares no @base-ui/react dependency and imports none in source, and its 19 tests pass. Tracked separately as a token-story audit.

Breaking changes

  • Peer range moves to ^1.7.0. Consumers on 1.2.x–1.6.x must upgrade @base-ui/react.
  • Accordion triggers are no longer a roving focus group. Arrow keys no longer move focus between them; Tab does. This follows current APG guidance and is not configurable from our side.

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
@github-actions github-actions Bot added buttons Changes to buttons forms Changes to forms indicators Changes to indicators interactive Changes to interactive layout Changes to layout lists Changes to lists overlays Changes to overlays tables Changes to tables labels Aug 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ Auto-labeled this PR: buttons, forms, indicators, interactive, layout, lists, overlays, tables

@github-actions

Copy link
Copy Markdown
Contributor

Size report (affected packages)

Package Size Limit
✅ @uiid/buttons 45.23 kB —
✅ @uiid/cards 15.84 kB —
✅ @uiid/code 156.21 kB —
✅ @uiid/forms 106.99 kB —
✅ @uiid/indicators 19.73 kB —
✅ @uiid/interactive 92.30 kB —
✅ @uiid/layout 13.73 kB —
✅ @uiid/lists 13.77 kB —
✅ @uiid/navigation 45.62 kB —
✅ @uiid/overlays 74.29 kB —
✅ @uiid/tables 71.46 kB —

Checked 11 affected package(s). Unchanged packages were not rebuilt.

@adamfratino
adamfratino merged commit 0c5af94 into main Aug 20, 2026
6 checks passed
@adamfratino
adamfratino deleted the chore/upgrade-base-ui-170 branch August 20, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buttons Changes to buttons forms Changes to forms indicators Changes to indicators interactive Changes to interactive layout Changes to layout lists Changes to lists overlays Changes to overlays tables Changes to tables

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade @base-ui/react from 1.2.0 to 1.7.0

1 participant