fix:68830: clear error on BA confirmation step#69228
Conversation
|
@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] |
|
The PR is ready. I combined two of my solutions: clearing upon returning from the page and clearing errors upon entering the page. I added clearing the error when entering the page, I did this so that after reloading the page, the error would also be cleared (and also, if the user goes to another page via the URL without closing this one, and then clicks “Add Bank account” again, the error will also be cleared). - If the error is cleared only after going back, the error will remain in these two cases when the page is opened again. Added a comment to useEffect. If you think this is unnecessary and only clearing the error when going back is sufficient, please let me know. cc: @allroundexperts |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppUnable to build android Android: mWeb ChromeScreen.Recording.2025-09-01.at.7.21.40.AM.moviOS: HybridAppScreen.Recording.2025-09-01.at.7.19.56.AM.moviOS: mWeb SafariScreen.Recording.2025-09-01.at.7.17.42.AM.movMacOS: Chrome / SafariScreen.Recording.2025-09-01.at.7.12.19.AM.movMacOS: DesktopScreen.Recording.2025-09-01.at.7.16.03.AM.mov |
| hideBankAccountErrors(); | ||
| return () => { | ||
| hideBankAccountErrors(); | ||
| }; |
There was a problem hiding this comment.
Even if you reload, the unmount function does get called. I think only one of these is necessary here.
There was a problem hiding this comment.
No, that's not actually the case. I recorded a video with two cases where the error is not cleared if it is not cleared before entering the page, because useEffect on unmount is not called before reloading/changing the page URL.
-.-2025-09-01-.-10.14.30.mp4
|
✋ 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/carlosmiceli in version: 9.2.3-0 🚀
|
|
🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.2.5-0 🚀
|
|
🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.2.8-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.2.8-4 🚀
|
Explanation of Change
Fixed Issues
$#68830
PROPOSAL:#68830 (comment)
Tests
Offline tests
No offline tests as related to backend validation
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))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
68830-android-native.mp4
Android: mWeb Chrome
68830-android-web.mp4
iOS: Native
68139-ios-native.mp4
iOS: mWeb Safari
68830-ios-web.mp4
MacOS: Chrome / Safari
68830-desktop-web.mp4
MacOS: Desktop
68830-Desktop.mp4