Decompose MoneyReportHeader into focused subcomponents#40
Decompose MoneyReportHeader into focused subcomponents#40kacper-mikolajczak wants to merge 1 commit into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Split the ~2,040-line MoneyReportHeader into 5 files: - MoneyReportHeader.tsx: orchestrator with shared subscriptions - MoneyReportHeaderContext.tsx: ref-stable context for cross-component triggers - MoneyReportHeaderPrimaryAction.tsx: switch-based primary action renderer - MoneyReportHeaderSecondaryActions.tsx: on-demand secondary action config builder - MoneyReportHeaderModals.tsx: modal dialogs with mount-once trigger registration
af122f6 to
b5a10bd
Compare
Explanation of Change
Split the ~2,040-line
MoneyReportHeaderinto 5 focused files with clear single responsibilities:MoneyReportHeader.tsxMoneyReportHeaderContext.tsxMoneyReportHeaderPrimaryAction.tsxMoneyReportHeaderSecondaryActions.tsxMoneyReportHeaderModals.tsxKey changes:
Profiler results:
Fixed Issues
$ Expensify#84123
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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