Repository navigation
Description
Phase 4 — style-related remnants
Part of the MenuItem decomposition rollout plan. Phase 1 landed in #97339 (MenuItemNavigation / MenuItemAction); Phase 2 is tracked in #99408. This is the style-prop phase.
Scope
Most of the remaining call sites differ from a preset by nothing but a style prop — style, wrapperStyle, outerWrapperStyle, innerContainerStyle, containerStyle and their siblings. Migrate them by deciding, per prop, whether the style can move outside MenuItem or needs a named variant on the subcomponent that owns that box.
The decision this phase has to make first
The new primitives currently expose no style prop at all — MenuItemRoot.tsx:77-86 hardcodes its style array, and MenuItemRow / MenuItemContent do the same. That's the right default: a generic style passthrough on every subcomponent rebuilds the monolith one prop at a time.
So before migrating anything, settle the escape-hatch policy. For each style prop, one of:
- Move it to the caller — wrap the row in the caller's own
View(preferred). - Add a named variant to the subcomponent that owns that box.
- Delete it — the style is dead, or a no-op under the new layout.
Per the plan's cross-cutting rule: no preset grows a prop for a minority need.
Verified inventory
Counts are MenuItem-scoped call sites at 3a621ed, excluding the shared wrappers (Phase 5).
| Prop | Sites | Finding |
|---|---|---|
outerWrapperStyle |
13 | Every one is the identical expression shouldUseNarrowLayout ? styles.mhn5 : styles.mhn8. A single MenuItem.Root variant covers the whole cluster. |
iconStyles |
~15 | Two clean clusters: [styles.ml3, styles.mr2] ×4 and the trip-reservation icon container. Rest are one-offs (styles.h7, styles.mr0, styles.wAuto). |
titleContainerStyle |
3 | TripDetailsView, TripRoomPreview, DynamicReportDetailsPage — all gap/alignment. → MenuItem.Content variant. |
titleWrapperStyle |
2 | DynamicSplitExpensePage, DynamicSplitExpenseEditPage — both styles.flex1. |
rightIconWrapperStyle |
2 | DiscoverSection, UpcomingTravelItem — both styles.pl2. |
innerContainerStyle |
1 | Only IndividualExpenseRulesSectionRevamp.tsx:237 (styles.gap5). The other 34 innerContainerStyle= hits in src are Modal/Popover, not MenuItem. Migrate the one, then drop the prop. |
rootWrapperStyle |
0 | Declared at MenuItem.tsx:458 and threaded to :845, but no call site passes it. Straight deletion. |
style / wrapperStyle / containerStyle |
long tail | Not yet separated from non-MenuItem consumers — raw src counts (~358 wrapperStyle=, ~173 containerStyle=) are dominated by other components. The first PR should enumerate the MenuItem-scoped subset and group it; expect the same "one repeated expression per cluster" shape as outerWrapperStyle. |
The full MenuItem style surface is declared at MenuItem.tsx:120-138.
All 13 outerWrapperStyle sites, for reference:
ReimbursementAccount/VerifiedBankAccountFlowEntryPoint×5 — e.g.:299ReimbursementAccount/USD/ConnectBankAccount/components/FinishChatCard×3ReimbursementAccount/ConnectedVerifiedBankAccount×2settings/Wallet/InternationalDepositAccount/subPages/AccountFlowEntryPoint×2ReimbursementAccount/NonUSD/Finish×1
Work
- Write down the escape-hatch policy (the three options above) so later phases and reviewers apply it consistently.
- Delete
rootWrapperStyle— dead prop, no consumers. - Migrate the single
innerContainerStylesite, then remove the prop. - Add the
MenuItem.Rootbleed/full-width variant and migrate all 13outerWrapperStylesites in one PR — they share one expression, so it's one decision reviewed once. - One PR per remaining style prop, grouped by prop rather than by page, so each diff is a single repeated expression across its call sites.
- For each migrated row: confirm the style can be applied outside
MenuItemwith no visual change. If it can't, add the variant and handle it inside the owning subcomponent. - Extend the Storybook
MenuItemComparisongallery with a section per variant introduced — old config API vs. new composition side by side.
Out of scope
FocusableMenuItem,HighlightableMenuItem,HighlightableMenuItemWithTopDescription,MenuItemList, and the PopoverMenu v2 rows are Phase 5 — even though 2 of the 15outerWrapperStyle=occurrences and bothadditionalIconStylesoccurrences live in them.- Text-level style props (
titleStyle,descriptionTextStyle,labelStyle,helperTextStyle,errorTextStyle) belong with the label/error/hint surface in Phase 3, unless one blocks a Phase 4 migration.
Notes
- Incremental and opt-in — the legacy
<MenuItem … />config API stays untouched. - Pure refactor: every migrated row must render identically to its old output. No behavioral or visual change.
Parent: #96202
Issue Owner
Current Issue Owner: @Pujan92Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022120560263996522966
- Upwork Job ID: 2120560263996522966
- Last Price Increase: 2026-11-11
Activity
[-]MenuItem decomposition Phase 4 — style-prop remnants[/-][+][Due for payment 2026-09-15] MenuItem decomposition Phase 4 — style-prop remnants[/+]melvin-bot commentedon Sep 8, 2026
@Pujan92
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.73-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
outerWrapperStylecases #99915If no regressions arise, payment will be issued on 2026-09-15. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
roryabraham commentedon Sep 8, 2026
@MelvinBot provide a status update on this issue. Is there more code work needed, or are we just in a waiting-for-payment holding pattern?
MelvinBot commentedon Sep 8, 2026
More code work is needed — this isn't a pure payment hold. #99915 delivered one of the eight items in the Work list (the 13-site
outerWrapperStylecluster). Every other style prop in the inventory is still onmainuntouched.The payment automation has already run ahead of the scope, though: the title carries
[Due for payment 2026-09-15]andPujan92's C+ checklist is still outstanding. So you have two things to reconcile.What's still open, verified at
bc098e0outerWrapperStyle× 13Views, no new variant neededrootWrapperStyle(dead prop)MenuItem.tsx:396and threaded to:780innerContainerStylesite, drop the propIndividualExpenseRulesSectionRevamp.tsx:258titleContainerStyle× 3TripRoomPreview:105,TripDetailsView:160,DynamicReportDetailsPage:928— plus a 4th the inventory missed,WorkspaceReceiptPartnersPage:260titleWrapperStyle× 2DynamicSplitExpensePage:578,DynamicSplitExpenseEditPage:411rightIconWrapperStyle× 2DiscoverSection:98,UpcomingTravelItem:133iconStyles(~15)iconStyles=sites remain, including both target clusters —[styles.ml3, styles.mr2]atBankAccountPurpose:37/CardTypeStep:92and the trip-reservation containerstyle/wrapperStyle/containerStylelong tailwrapperStyle) was opened and closed empty on Sep 8, so there's intent but no live PRsrc/components/MenuItem/orcontributingGuides/records the three optionsMenuItemComparisongalleryMenuItemComparison.stories.tsxRecommendation
Pay this one out and split the remainder into Phase 4b. The title already has a payment date, so melvin-bot will close it on the 15th regardless — fighting that is more friction than filing a follow-up. This also matches how Phases 1 and 2 were handled: one issue per reviewable PR chunk rather than one issue per phase.
Concretely:
Pujan92posts the C+ checklist so the Sep 15 payment isn't blocked. Nothing else is in the way — the last open item,m-natarajan's Test 3 / Step 6 question, was answered bywar-inon Sep 8, and the PR shipped to production in 9.4.73-3.outerWrapperStylePR already established the precedent (option 1, move to caller) that the policy should codify.Reply with
@MelvinBot create the Phase 4b issueand I'll file it against the parent, carrying the verified inventory above.war-in commentedon Sep 9, 2026
@roryabraham I'm going to take care of the other parts of that issue (enumerated by Melvin) in a future PRs. However, I'd rather wait for #100191 and the next
MenuItemWithTopDescription-related PRs because they'll add more required leaves84 remaining items
Pujan92 commentedon Nov 11, 2026
@MelvinBot open a PR migrating 4 rows to the composable API: the GL code row in
DynamicTagSettingsPage.tsx(MenuItemField, with a plainIconlock as a child when GL codes are locked by the accounting connection, as inMerchantTypeRulePageBaseb73f553), the "Disable" row in 2FAEnabledPage.tsx(MenuItem.Root, with a plain redIconinMenuItem.Leadingusingstyles.popoverMenuIcon, sinceMenuItem.Iconcan't keep a fixed color), and "Create new connection" inCampfireExistingConnectionsPage.tsx/DualEntryExistingConnectionsPage.tsx(MenuItemNavigation, droppingiconStyles={styles.br2}, which is a no-op because the icon container has no background). Keep each row's existingsentryLabelunchanged and don't add or rename labels; gate presses via the presets orcallIfAuthenticated(fn, session). Pure refactor, no new presets or props;Mark it ready for review and write QA steps in the description
MelvinBot commentedon Nov 11, 2026
🤖 Web test steps verification results: ❌ fail
Created MenuItem: migrate GL code, 2FA disable, and accounting connection rows, ready for review and assigned to
Pujan92, with QA steps included. All four existing Sentry labels are unchanged.Browser verification was blocked by a blank dev session. Targeted tests passed: 9 suites, 253 tests; lint and Storybook smoke checks also passed. Other check limitations are documented in the PR.
GL code editable and accounting-locked states
Not verified: blank application prevented navigation.2FA Disable icon, navigation, and Xero warning
Not verified: application controls were unavailable.Campfire and DualEntry connection rows
Not verified: blank application prevented access to Connections.view run · no recording available
[-]MenuItem decomposition Phase 4 — style-prop remnants[/-][+][$175] MenuItem decomposition Phase 4 — style-prop remnants[/+]melvin-bot commentedon Nov 11, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022120560263996522966
melvin-bot commentedon Nov 13, 2026
@Pujan92
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.37-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
MelvinBot commentedon Nov 15, 2026
Status — Nov 15: two more batches merged; latest deployment in regression
Since the Nov 3 update:
No currently open PR was found linking this phase. Next: refresh the remaining style-prop inventory and choose the next batch; these partial migrations do not complete the phase. The previous 49-direct-site count is stale and was not recounted here.
Current labels are
DailyandSkip Payment. A missing C+ checklist should not be treated as the blocker:roryabrahamalready confirmed no checklist is needed. Remaining code work is the reason to keep this open.roryabraham commentedon Nov 16, 2026
@MelvinBot do this.
MelvinBot commentedon Nov 16, 2026
Refreshed style-prop inventory
Verified on
mainat51fc66d.49 direct legacy rows remain: 20
MenuItemand 29MenuItemWithTopDescription. Of these, 31 have known layout-style overrides. This excludes stories, shared-wrapper implementations, and text-style props.Remaining props
Counts include styles supplied through the two traced props-object spreads. Rows can appear under multiple props.
wrapperStylestyleiconStylesinnerContainerStylehoveredStyle,badgeStyle,avatarImageStyles,tooltipWrapperStyleouterWrapperStyle,additionalIconStylesrootWrapperStyle,containerStyle,titleContainerStyle,titleWrapperStyle, andrightIconWrapperStyleare no longer part of the legacy prop declaration.¹ A spread counts as one JSX attribute, following the existing phase-counting convention. That makes two complex rows look artificially small, as detailed below.
Complete under-10 style-bearing inventory
style={[styles.pt2, styles.pb4, styles.ph5, styles.flexRow]}wrapperStyle={[styles.pv2]}wrapperStylewrapperStylefromgetItemBackgroundColorStyle(...); native-onlywrapperStyle: [styles.paymentMethod, listItemStyle]andiconStyles: item.iconStyleswrapperStyle: styles.ph0andiconStyles: bankIcon.iconStylesThe last two should be treated as long-tail work, not easy Phase 4 rows: their spread objects contain substantially more than ten properties.
Larger clusters — overlap with Phase 6
The remaining larger rows belong with Phase 6 — long-tail cleanup:
style: five[styles.moneyRequestMenuItem]sites, twostyles.p0approval-workflow sites, and one conditional deleted-card style.wrapperStyle: the largest repeated family is six task-description rows across trip previews, money requests, and tasks. Three more usesectionMenuItemTopDescription; the rest are individual overrides or forwarded values.iconStyles: three trip-reservation icon containers; the remaining larger sites are onboarding, settings, wallet transfer, and workspace-member card rows.innerContainerStyle: still IndividualExpenseRulesSectionRevamp:248, usingstyles.gap5.Do not delete
outerWrapperStyleorinnerContainerStyleglobally yet. Phase 5 still uses them in the Highlightable wrappers and PopoverMenu.Recommended next batch
Start with the two non-forwarding web rows: Flag comment and Support ticket. Keep the category-selector forwarder separate, and move the two spread-heavy payment rows into the long-tail queue.
This was a source inventory, not visual verification. Counts describe source sites—not rendered rows—and exclude unrestricted forwarded props whose values cannot be established statically.
view run
expensify-chore-bot commentedon Nov 18, 2026
@Pujan92 Huh... This is 4 days overdue. Who can take care of this?
expensify-chore-bot commentedon Nov 20, 2026
@Pujan92 6 days overdue. This is scarier than being forced to listen to Vogon poetry!