Repository navigation
[menu] Add regression test for rendered trigger id submenu close - #5212
Merged
atomiks merged 2 commits intoJul 14, 2026
Merged
Conversation
commit: |
Bundle size
PerformanceTotal duration: 1,274.86 ms +65.51 ms(+5.4%) | Renders: 78 (+0) | Paint: 1,975.82 ms +97.07 ms(+5.2%)
13 tests within noise — details Metric alarms
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
atomiks
marked this pull request as ready for review
July 13, 2026 05:56
atomiks
requested review from
colmtuite,
flaviendelangle,
jjenzz and
michaldudak
as code owners
July 13, 2026 05:56
There was a problem hiding this comment.
Pull request overview
Adds a targeted regression test to ensure a root Menu does not close with reason: "sibling-open" when opening a submenu in the specific case where the root trigger’s DOM id originates from the render element (custom id), covering both contained and detached trigger setups.
Changes:
- Add a regression test that opens a root menu, opens a submenu via click, and asserts the root menu remains mounted.
- Assert the root
onOpenChangeis not invoked withreason: REASONS.siblingOpenfor this scenario.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Part of #5170
This adds regression coverage for the deterministic custom-
render-ID manifestation reported in #5170 (comment). It does not reproduce the original no-idsnippet from the issue body.A trigger whose
idcomes from therenderelement (render={<button id="custom-trigger" />}) used to leave the menu store without an active trigger, sofloatingNodeIdwas never forwarded and opening a submenu closed the whole root menu withreason: "sibling-open". #5110 had already fixed the underlying ID reassociation across popup components, but its component-level regression coverage was limited to Tooltip.This adds a Menu regression test covering the full chain through the
MenuPositionersibling-open check, in both the contained and detached trigger variants. Verified red with #5110 reverted (both variants close the entire tree) and green on master.