Repository navigation
[navigation-menu] Add disabled data attribute to NavigationMenu.Trigger - #5521
Conversation
commit: |
Bundle size
PerformanceTotal duration: 1,487.55 ms +85.27 ms(+6.1%) | Renders: 76 (+0) | Paint: 2,308.72 ms +143.07 ms(+6.6%)
14 tests within noise — details Metric alarms
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@claude review |
|
ized# PR review Nothing merge-blocking. The runtime change is correct — Tests (1)1. 🟠 No behavioral coverage for the now-public
|
There was a problem hiding this comment.
Pull request overview
This PR aligns NavigationMenu.Trigger with other trigger components by formally exposing disabled in its public props/state so consumers can style it via the data-disabled attribute and see disabled documented in the generated API docs.
Changes:
- Added
data-disabledtoNavigationMenuTriggerDataAttributes. - Added
disabledtoNavigationMenuTriggerprops + state, ensuring the state-drivendata-disabledhook is emitted. - Added a regression test and updated generated docs to include the
disabledprop anddata-disabledattribute.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/navigation-menu/trigger/NavigationMenuTriggerDataAttributes.ts | Adds data-disabled to the trigger’s documented data-attribute hooks. |
| packages/react/src/navigation-menu/trigger/NavigationMenuTrigger.tsx | Plumbs disabled into component state/props so data-disabled can be produced and documented. |
| packages/react/src/navigation-menu/trigger/NavigationMenuTrigger.test.tsx | Adds a regression test ensuring data-disabled is present only when disabled is true. |
| docs/src/app/(docs)/react/components/page.mdx | Updates the component index listing to include disabled and data-disabled for Navigation Menu Trigger. |
| docs/src/app/(docs)/react/components/navigation-menu/types.md | Updates generated API docs (props/state + data attributes) to include disabled and data-disabled. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A disabled
NavigationMenu.Triggerdidn't exposedata-disabled(unlike every other trigger), becausedisabledwas missing from its state, it was only inherited fromNativeButtonProps, so it was also undocumented. This addsdisabledto the state, props, enum, and generated docs, with a regression test.