[CP Staging] Partially revert PR related to expense flow#73379
[CP Staging] Partially revert PR related to expense flow#73379
Conversation
Codecov Report❌ Patch coverage is
... and 13 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
@sobitneupane 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] |
|
@allroundexperts 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
| ); | ||
| removeTransaction(iouTransactionID); | ||
| } | ||
| }, [ |
There was a problem hiding this comment.
❌ PERF-6 (docs)
In useCallback, specify individual object properties as dependencies instead of passing entire objects.
The dependency array includes duplicateTransactions and duplicateTransactionViolations objects which will cause the callback to re-execute whenever any property in these objects changes. Consider extracting specific properties that are actually used in the callback.
| ); | ||
| removeTransaction(iouTransactionID); | ||
| } | ||
| }, [ |
There was a problem hiding this comment.
❌ PERF-6 (docs)
The useCallback dependency array includes entire objects (duplicateTransactions, duplicateTransactionViolations, moneyRequestReport, report, requestParentReportAction, iouReport, chatIOUReport) instead of specific properties. This causes the callback to re-create whenever any property of these objects changes, even unrelated ones.
Consider specifying only the specific properties that are actually used within the callback:
}, [
duplicateTransactions, // These might be arrays, so could be acceptable if they're primitive arrays
duplicateTransactionViolations, // Same as above
caseID,
iouTransactionID,
isSingleTransactionView,
moneyRequestReport?.reportID, // Only the specific property used
removeTransaction,
report?.reportID, // Only if report.reportID is used in the callback
requestParentReportAction?.reportActionID, // Only specific properties used
isReportArchived,
isMoneyRequestReportArchived,
iouReport?.reportID, // Only specific properties used
chatIOUReport?.reportID, // Only specific properties used
isChatIOUReportArchived,
currentUserPersonalDetails.accountID, // Add this if it's used in the callback
]);|
LGTM |
(cherry picked from commit 137b260) (cherry-picked to staging by blimpich)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/blimpich in version: 9.2.37-5 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.2.37-8 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/blimpich in version: 9.2.38-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.2.38-5 🚀
|
Trying to figure out what broke #73330
Explanation of Change
This is a partial revert, specifically reverting this section: #72086 (comment)
We are partially reverting because we can't straight revert the whole PR
Fixed Issues
$ #73330
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 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
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2025-10-23.at.4.27.43.PM.mov
MacOS: Desktop