Dismiss modal when closing receipt view#60698
Conversation
|
@rushatgabhane 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] |
|
reviewing friday |
Reviewer Checklist
Screenshots/VideosAndroid: NativeWhatsApp.Video.2025-04-28.at.22.05.50.mp4Android: mWeb ChromeiOS: NativeScreen.Recording.2025-04-29.at.00.50.31.moviOS: mWeb SafariScreen.Recording.2025-04-29.at.00.53.26.movMacOS: Chrome / SafariScreen.Recording.2025-04-29.at.00.53.57.movMacOS: Desktop |
| const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {canBeMissing: true}); | ||
| const [transactionMain] = useOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`, {canBeMissing: true}); | ||
| const [transactionDraft] = useOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {canBeMissing: true}); | ||
| const [reportMetadata = {isLoadingInitialReportActions: true}] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${reportID}`, {canBeMissing: true}); |
There was a problem hiding this comment.
we aren't fetching the data from actions. so canBeMissing should be false in all cases here. right??
| const [reportMetadata = {isLoadingInitialReportActions: true}] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${reportID}`, {canBeMissing: true}); | |
| const [reportMetadata = {isLoadingInitialReportActions: true}] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${reportID}`, {canBeMissing: false}); |
There was a problem hiding this comment.
There was a problem hiding this comment.
We load the report here and reportMetadata is updated inside openReport.
App/src/pages/TransactionReceiptPage.tsx
Lines 52 to 60 in 1d48288
For the transactions, I think I intentionally set it to true, as you already experienced, the alert keeps showing for transactions_undefined. It can happen for transactions_0, transactions_123, or any invalid key. I personally don't like the canBeMissing since a user can easily open the page without the data available.
|
✋ 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/youssef-lr in version: 9.1.40-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.1.40-7 🚀
|
Explanation of Change
Fixed Issues
$ #60101
PROPOSAL: #60101 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
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))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.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4