Skip to content

[collapsible] Restore animations when a removed panel reopens - #5891

Merged
michaldudak merged 1 commit into
mui:masterfrom
michaldudak:codex/fix-collapsible-removed-panel-reopen
Oct 6, 2026
Merged

michaldudak merged 1 commit into
mui:masterfrom
michaldudak:codex/fix-collapsible-removed-panel-reopen

Conversation

@michaldudak

@michaldudak michaldudak commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

When an initially open Collapsible panel's custom render removes the element on close, reopening keeps the inline animation-name: none override and skips the entrance animation.

Reset initial-mount and Activity-resume animation suppression before the layout effect's null-panel guard, so the next open animates normally even when the closing element is absent. Accordion uses the same hook.

Follow-up to the review of #5890. This addresses a pre-existing reopening issue and can merge independently of that close-completion fix.

Validation:

  • New Chromium regression test fails before the source fix and passes after it.
  • Collapsible and Accordion: 226 Chromium tests passed; 174 jsdom tests passed (52 skipped).
  • TypeScript, ESLint, Stylelint, Prettier, and git diff --check passed.

@michaldudak michaldudak added type: bug It doesn't behave as expected. component: collapsible Changes related to the collapsible component. labels Oct 5, 2026
@pkg-pr-new

pkg-pr-new Bot commented Oct 5, 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@5891
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@5891
    

commit: a034f26

@code-infra-dashboard

code-infra-dashboard Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+5B(0.00%) 🔺+6B(0.00%)

Details of bundle changes

Performance

Total duration: 406.16 ms -101.47 ms(-20.0%) | Renders: 76 (+0) | Paint: 741.87 ms -180.78 ms(-19.6%)

Test Duration Renders
Scroll Area mount (300 instances) 33.05 ms ▼-15.94 ms(-32.5%) 3 (+0)
Select mount (200 instances) 51.99 ms ▼-14.83 ms(-22.2%) 3 (+0)
Mixed surface mount (app-like density) 34.99 ms ▼-12.35 ms(-26.1%) 5 (+0)
Menu mount (300 instances) 20.61 ms ▼-8.77 ms(-29.9%) 1 (+0)
Menu open (500 items) 19.30 ms ▼-7.36 ms(-27.6%) 11 (+0)

…and 5 more (+5 within noise) — details


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

@netlify

netlify Bot commented Oct 5, 2026

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a034f26
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6ac3ab0848cd260008f07f00
😎 Deploy Preview https://deploy-preview-5891--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@michaldudak
michaldudak merged commit 24c2cb5 into mui:master Oct 6, 2026
24 of 25 checks passed
@michaldudak
michaldudak deleted the codex/fix-collapsible-removed-panel-reopen branch October 6, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: collapsible Changes related to the collapsible component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant