Repository navigation
[menu] Fix submenu trigger interactions - #4892
Conversation
commit: |
Bundle size
PerformanceTotal duration: 1,301.42 ms -104.33 ms(-7.4%) | Renders: 50 (+0) | Paint: 2,000.08 ms -153.60 ms(-7.1%)
7 tests within noise — details Check out the code infra dashboard for more information about this PR. |
5a7e3b2 to
e4b0b8e
Compare
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Code Review (GPT-5.5 + Opus 4.7)Approve after nits are addressed 🟡 The refreshed full diff against Opus 4.7 supplied the static-review notes synthesized here; GPT-5.5 refreshed the diff and ran the validation suites before posting. 1. Bugs / Issues1. ℹ️ Clarify the hover regression test name (informational)
it('does not highlight submenu triggers from mouse enter when disabled', async () => {
await render(
<TestMenuContents
rootProps={{ open: true, highlightItemOnHover: false }}This test is in the Recommendation: Rename the test to mention Root Cause & Patch AssessmentThe fixes line up with the actual failure points:
Pattern Consistency AssessmentThe root-disabled behavior follows the existing menu model: Test Coverage AssessmentThe added coverage maps directly to the fixed regressions: submenu trigger typeahead labels, hover highlighting opt-out, disabled controlled-open item/typeahead behavior, disabled submenu triggers, and real submenu trigger conformance. Validated with: pnpm test:jsdom MenuSubmenuTrigger --no-watch
pnpm test:jsdom MenuRoot --no-watch
pnpm test:chromium MenuSubmenuTrigger --no-watch
pnpm test:chromium MenuRoot --no-watch |
This is part of the Codex component behavior and test coverage sweep. It fixes Menu behavior bugs found during review and adds focused test coverage for the affected paths.
Changes
Menu.SubmenuTriggerlabels for typeahead.highlightItemOnHover={false}for submenu triggers.Menu.SubmenuTriggerconformance against the actual submenu trigger element.Original findings addressed
Menu.SubmenuTriggerignores itslabelprop for typeahead.highlightItemOnHover={false}is bypassed for submenu triggers.Menu.SubmenuTriggerconformance is effectively untested.