Skip to content

MenuItem decomposition Phase 5 — shared wrapper components #105530

Open

Description

@MelvinBot

Phase 5 — shared wrapper components

Part of the MenuItem decomposition rollout plan. Parent: MenuItem — composition over configuration.

Scope

Migrate the components that wrap the legacy <MenuItem> and pass its props straight through. Each one types its props as MenuItemProps and spreads them, so its callers can't move to the composable API until the wrapper does. Per the plan, each wrapper gets its own PR.

Verified inventory

At 0c5a23e, none of these use MenuItem.Root or a preset yet. Call sites are JSX opening tags in src/, excluding Storybook.

Wrapper Legacy render Call sites Notes
MenuItemList.tsx <MenuItem {...menuItemProps}> 30 in 21 files Largest and riskiest. HelpPage has 10. Items are full MenuItemProps objects built in page code
FocusableMenuItem.tsx <MenuItem {...props}> 3 Main caller is PopoverMenu v1. FABFocusableMenuItem wraps it again (9 call sites)
HighlightableMenuItem.tsx <MenuItem {...restOfProps}> 2 DomainInitialPage, WorkspaceInitialPage
HighlightableMenuItemWithTopDescription.tsx <MenuItemWithTopDescription {...props}> 3 TagFields, MoneyRequestView, DynamicSplitExpenseEditPage
PopoverMenu/index.tsx (v1) back button <MenuItem> + items via FocusableMenuItem (L611) — PopoverMenuItem is MenuItemProps & {...}, so it migrates together with FocusableMenuItem
v2/rows/Item.tsx <MenuItem {...rest}> 1 Only in VideoPopoverMenu
v2/rows/RadioItem.tsx <MenuItem {...rest}> 1 Only in VideoPopoverMenu
v2/rows/Label.tsx <MenuItem {...rest}> 0 Unused
v2/sub/SubTrigger.tsx <MenuItem {...rest}> 1 Only in VideoPopoverMenu
v2/sub/SubBackButton.tsx <MenuItem> — Not in the original plan list, but same family

Suggested order

  1. PopoverMenu v2 rows. These are the cheapest: 3 call sites, all in VideoPopoverMenu. Their forward types already omit the interaction props.
  2. HighlightableMenuItem and HighlightableMenuItemWithTopDescription. They only add a highlight animation, so they could become a decorator around MenuItem.Root instead of a props pass-through.
  3. FocusableMenuItem and PopoverMenu v1 together, because v1 forwards arbitrary PopoverMenuItem fields.
  4. MenuItemList last. Besides the item props, it adds behavior that needs a home in the new API: the context menu on link, OfflineWithFeedback wrapping, single-execution onPress, and list-level icon and style defaults.

Out of scope

Notes

  • This is a pure refactor. Every migrated row must render and behave the same as before.
  • Cross-cutting rule: no preset grows a prop for a minority need. A wrapper that needs one drops to raw composition instead.

Activity

  1. MelvinBot commented on Nov 3, 2026

    @MelvinBot
    ContributorAuthor

    Status: not started

    No PR is open, and none of the 10 wrappers uses MenuItem.Root or a preset yet.

    Next step: start with the PopoverMenu v2 rows, as the suggested order in this issue describes. They have the fewest call sites.

    Counted on main at d138eba.


    view run

  2. roryabraham commented on Nov 3, 2026

    @roryabraham
    Contributor

    No update

  3. roryabraham commented on Nov 11, 2026

    @roryabraham
    Contributor

    work is progressing

  4. MelvinBot commented on Nov 15, 2026

    @MelvinBot
    ContributorAuthor

    Status — Nov 15: progress reported, but no linked PR yet

    roryabraham reported that work is progressing on Nov 11. I found no open or merged PR referencing this tracking issue, so there is no linked deliverable to report as shipped. This does not establish that no unlinked work exists.

    Next: link the in-progress wrapper PR or provide its current scope and blocker. The issue's suggested sequence remains PopoverMenu v2 rows → highlightable wrappers → FocusableMenuItem/PopoverMenu v1 → MenuItemList, with one PR per wrapper or coupled family.

    The issue remains Weekly. The original wrapper inventory was not re-audited for this update; the earlier “not started” status should not override the newer human progress report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions