feat(menu): modernize Menu to Material Design 3 specs#2
Conversation
Menu.Item used fixed 48dp height with two-line supporting text and a content minWidth that collapsed trailingSupportingText to zero width. Use minHeight + padding for supporting rows, intrinsic row sizing for trailing slots, and showcase the vibrant color scheme in the example.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 2 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (13)
📒 Files selected for processing (19)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Motivation
Modernize
Menu/Menu.Itemto the latest Material Design 3 specs. Reuse theme tokens (shape, typography, motion, color roles) and extract component tokens in the same pattern as Checkbox / FAB / ConnectedButtonGroup.Spec re-check (M3 menus)
Re-checked M3 menus specs and overview:
surfaceContainerLow. Theelevationprop controls shadow only (Paper’selevation.level2maps to different surfaceContainer tones, so it is not used as the menu fill).colorScheme="vibrant"; spring-animated item corner morph as focus/selection moves; optional badge and lightweight submenu portal surface; Menu.Section group gaps (8dp) in addition to Divider.Changes
Tokens / Menu / Menu.Item
surfaceContainerLow; surfacecorner.large; first/last/selected itemcorner.mediumvia layout context (nocloneElement/ nodisplayNamefiltering)labelLarge, supporting + trailing supporting text, selected colors (disabled wins with content opacity)toRawSpring+ reduce-motion snapcolorSchemestandard | vibrantMenu.Sectiongroup gaps; badge; lightweight submenu portal;Animated.springper-corner radius morph on focus/selectionExample / docs / tests
Related issue
Fixes callstack#4977
Test plan
yarn typecheck/yarn lint/ Menu unit testsVisual verification
Docs screenshots:
docs/public/screenshots/menu-*.pngandmenu-ios-*.png.