Skip to content

[select] Preserve touch exit animations - #4325

Merged
atomiks merged 1 commit into
mui:masterfrom
atomiks:codex/select-touch-exit-animation
Mar 16, 2026
Merged

atomiks merged 1 commit into
mui:masterfrom
atomiks:codex/select-touch-exit-animation

Conversation

@atomiks

@atomiks atomiks commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes a Select regression where touch-triggered close animations could lose their exit styling during the close transition.

The change keeps the last non-null openMethod available through the close phase so touch-opened Selects do not switch layout modes mid-exit.

Changes

  • Preserve the previous openMethod during close using usePreviousValue.
  • Clear the Select store's openMethod only after the popup fully unmounts.
  • Add a Chromium regression test covering touch close transitions and data-ending-style.

Notes

@atomiks atomiks added component: select Changes related to the select component. type: regression A bug, but worse, it used to behave as expected. labels Mar 13, 2026
@pkg-pr-new

pkg-pr-new Bot commented Mar 13, 2026 •

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/react@4325
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@4325
    

commit: 938bec1

@mui-bot

mui-bot commented Mar 13, 2026 •

Copy link
Copy Markdown

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react 🔺+37B(+0.01%) 🔺+28B(+0.02%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@atomiks
atomiks force-pushed the codex/select-touch-exit-animation branch from cbaec82 to 55b6c20 Compare March 13, 2026 06:32
@netlify

netlify Bot commented Mar 13, 2026

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit cbaec82
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69b3aed3046e4700092df284
😎 Deploy Preview https://deploy-preview-4325--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@atomiks

atomiks commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Codex Review

Overview

This patch fixes the touch-specific Select close-animation regression without reintroducing the quick-reopen openMethod race. It keeps the last interaction type alive through the close transition, adds a Chromium regression test for that path, and the rebased version keeps the new test on Vitest-native assertions.

Findings (None)

No blocking issues found in this patch.

Confidence: 4/5

High confidence based on a full-branch pass, a second sweep over render correctness, accessibility, API and state design, maintainability, performance risk, and coverage, plus fresh focused verification after reinstalling dependencies on the rebased branch. I reran pnpm test:jsdom SelectRoot --no-watch and pnpm test:chromium SelectRoot --no-watch, and both suites passed with the new touch-close regression coverage intact.

Notes

  • Latest delta since the previous review: after reinstalling dependencies on top of current master, the focused SelectRoot suites are passing again.
  • The new touch close-transition test now uses Vitest-native matchers only.

@netlify

netlify Bot commented Mar 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 938bec1
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69b7aaab1df38500085bc1f6
😎 Deploy Preview https://deploy-preview-4325--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@atomiks
atomiks marked this pull request as ready for review March 13, 2026 06:40
@atomiks
atomiks force-pushed the codex/select-touch-exit-animation branch from 55b6c20 to a7ffa09 Compare March 16, 2026 06:39
@atomiks
atomiks force-pushed the codex/select-touch-exit-animation branch from a7ffa09 to 938bec1 Compare March 16, 2026 07:00
@atomiks
atomiks merged commit 4fd87ca into mui:master Mar 16, 2026
7 checks passed
@atomiks
atomiks deleted the codex/select-touch-exit-animation branch March 16, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: select Changes related to the select component. type: regression A bug, but worse, it used to behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants