Extract money report header more content#87090
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
06069bd to
79eb4af
Compare
|
@abzokhattab Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79eb4af24e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
reviewing .. |
|
I see that the extraction introduces duplicate Onyx subscriptions rather than removing them. For example:
Should we pass the already-available data ( |
|
@abzokhattab it's intentional and follows the CLEAN-REACT-PATTERNS-2 rule. Each component fetches its own data - it reduces coupling so children can evolve independently without parent changes |
|
Okay fair enough then |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-04-08.at.14.26.47.movAndroid: mWeb ChromeScreen.Recording.2026-04-08.at.14.29.15.moviOS: HybridAppScreen.Recording.2026-04-08.at.14.26.47.moviOS: mWeb SafariScreen.Recording.2026-04-08.at.14.29.15.movMacOS: Chrome / SafariScreen.Recording.2026-04-08.at.11.00.56.mov |
|
merged latest main to resolve conflict |
|
🚧 @rlinoz 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.3.55-0 🚀
Bundle Size Analysis (Sentry): |
|
This PR is a pure internal code refactoring — it decomposes No help site documentation changes are required. |
Explanation of Change
Continues the
MoneyReportHeaderdecomposition by extracting the "more content" section (next step bar, status bar, search navigation) into dedicated components:useOptimisticNextStephook — encapsulates the entire next step computation logic including DEW error/offline overrides and strict policy rule violationsMoneyReportHeaderNextStep— renders the next step status bar or skeleton loader, consuming the hook aboveMoneyReportHeaderMoreContent— gate component that checks visibility cheaply (paid policy, not invoice, no status bar) and only mounts the expensive body when needed. Body handles transaction thread resolution, status bar section, and search navigation arrows.Removed duplicate Onyx subscriptions where parent already guarantees conditions that children were re-deriving.
Fixed Issues
$ #77173
$ #84123
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
ioss.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
weeb.mov