Repository navigation
MenuItem decomposition - remove titleContainerStyle - #103040
roryabraham merged 11 commits into
Conversation
The 4px gap the column added between the date line and the title now lives on the caller's own titleComponent as mt1. The justifyContentStart was a no-op: the column's content is always at least its 40px min height. Pixel-identical in Storybook across hotel, car, flight, cancelled and centered-icon variants.
The name row now composes MenuItem.Root, Row, Content and Trailing. Its headline is the caller's own Text, which keeps the custom emoji path through TextWithEmojiFragment. The centered variant puts the title and further details in a caller View with alignItemsCenter, where it used titleContainerStyle before. That View takes mrn3 while the chevron shows. Row's gap3 would otherwise narrow the area the title centers in and change where it wraps. The workspace row underneath becomes a MenuItemField. Pixel-identical in Storybook for these variants. Centered short, long workspace chat, two-line thread, custom emoji, no rename permission, and push row with and without rename permission, including a long unbroken workspace name.
Each integration now renders as MenuItemSectionRoot JSX. The page no longer builds a MenuItem config object for it. On wide layouts the Uber badge sits in Trailing. On narrow layouts it sits in its own line under the Row, with legacy's ml13 and mt2. The error renders through FormHelpMessage with mt3, as before. Legacy's badge spacing came from its mr2 and the brick road dot's ml1. Trailing's gap2 matches the first. The badge takes mr1 when the dot shows, which matches the second. Pixel-identical in Storybook, wide and narrow, with and without the badge, the brick road dot and the error, and with a long description.
The prop has no callers left. Adds gallery cards for the two composable shapes that replaced its last two call sites.
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@codex review |
Code reviewI found no blocking issues. The refactor keeps the old behavior in all three areas, and CI is green apart from the approval check. Two optional notes:
What I checked
|
|
PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself. |
|
Conflicts 😅 |
# Conflicts: # src/pages/DynamicReportDetailsPage/ReportDetailsNameSection.tsx
|
@Pujan92 fixed! |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb Safari |
|
@war-in resolve conflicts again 🙏 |
# Conflicts: # src/pages/workspace/receiptPartners/WorkspaceReceiptPartnersPage.tsx
|
@Pujan92 done! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.15-1 🚀
|
|
No help site update is needed. This PR refactors how |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.5.15-3 🚀
Bundle Size Analysis (Sentry): |


Explanation of Change
Removes
titleContainerStylefrom the legacyMenuItem. Trip reservation rows move theirgap1onto their own title (mt1). The report details name rows and the receipt partner rows move to the composableMenuItemAPI. The Uber row is extracted intoUberConnectionRow, with the badge, the red dot and the menu inTrailing.Fixed Issues
$ #100159
PROPOSAL:
Tests
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari