fix: Handle brief NotFound page on the Request Money flow#32849
Conversation
| if (!transaction.transactionID) { | ||
| // The draft transaction is initialized only after the component is mounted, | ||
| // which will lead to briefly displaying the Not Found page without this loader. | ||
| return <FullScreenLoadingIndicator />; | ||
| } |
There was a problem hiding this comment.
@tgolen even though this was not in the original proposal, I've noticed that the NotFound page shows also while the modal is opening. The root cause here is different – it's caused by the draft transaction being initialized only after the component is mounted, by calling IOU.startMoneyRequest_temporaryForRefactor.
Please let me know if you think this change is not suitable here – I couldn't come up with a better fix for this case so far.
There was a problem hiding this comment.
Thanks for digging into that. I think this fix is fine and I 💚 the fix here.
| // If the transaction does not have a transactionID, then the transaction no longer exists in Onyx as a full transaction and the not-found page should be shown | ||
| const isFocused = useIsFocused(); | ||
|
|
||
| // If the transaction does not have a transactionID, then the transaction no longer exists in Onyx as a full transaction and the not-found page should be shown. |
There was a problem hiding this comment.
Would you mind updating this comment to explain why isFocused is part of the logic?
|
@getusha Are you able to get to the checklist today? |
|
@tgolen on it, thanks. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2023-12-12.at.7.27.33.PM.movAndroid: mWeb ChromeScreen.Recording.2023-12-12.at.7.25.09.PM.moviOS: NativeScreen.Recording.2023-12-12.at.7.30.40.PM.moviOS: mWeb SafariScreen.Recording.2023-12-12.at.7.20.58.PM.movMacOS: Chrome / SafariScreen.Recording.2023-12-12.at.7.17.03.PM.movMacOS: DesktopScreen.Recording.2023-12-12.at.7.35.50.PM.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…t-found fix: Handle brief NotFound page on the Request Money flow (cherry picked from commit c21f455)
|
Tested in staging. This is a pass. |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.11-25 🚀
|
Details
This fixes the NotFound page that is briefly shown on the Request Money modal show & hide.
Fixed Issues
$ #32807
PROPOSAL: #32807 (comment)
Tests
Same as QA
Offline tests
Same as QA
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.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)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-compressed.mp4
Android: mWeb Chrome
chrome-compressed.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
safari.mp4
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov