perf: extract useExpenseSubmission hook from IOURequestStepConfirmation#87487
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@abdulrahuman5196 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] |
|
@sobitneupane @cristipaval One of you needs to 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: f98c1beb80
ℹ️ 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".
|
@OlimpiaZurek, FYI: I removed the parent issue from the Fixed Issues section to avoid the automatic comments related to payments on it when this PR hits production |
|
No product review needed |
Julesssss
left a comment
There was a problem hiding this comment.
Could you record some example span timings please.
|
@bernhardoj can you please prioritize this review? |
|
Oh no sorry, my delay led to conflicts. Feel free to merge tomorrow @cristipaval |
5557345
|
oh no, can't believe it. Conflicts again |
02e0535 to
dcccf18
Compare
Fixed! |
|
phew, finally! Thanks @OlimpiaZurek 🙏 |
|
🚧 @cristipaval 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/cristipaval in version: 9.3.61-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This is a pure internal refactoring that extracts 6 submission callbacks and a helper into a new |
|
Hi @OlimpiaZurek @cristipaval Any tests here? Thanks |
|
@izarutskaya Added test steps to the PR description. |
|
This PR failing because of the issue #88503 |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.3.61-4 🚀
|
|
The per diem flow introduced in this PR calls |
Explanation of Change
This PR scopes the
TRANSACTION_VIOLATIONSsubscription from collection-wide to per-key (currentTransactionID) and extracts 6 submission callbacks (requestMoney,trackExpense,createDistanceRequest,submitPerDiemExpense,createTransaction,sendMoney) plus thegetCurrentPositionWithGeolocationSpanhelper into a newuseExpenseSubmissionhook. The hook receives transaction/report/policy data from the parent and exposes only{createTransaction, sendMoney}. Removed fromIOURequestStepConfirmation:** all 6 callback definitions, theNVP_RECENT_WAYPOINTSsubscription, and ~810 lines of submission logic.Part of the ongoing
IOURequestStepConfirmationdecomposition effort.Fixed Issues
$ #86986
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
same as tests
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