Fix: Onboarding modal shows up after refreshing page with 2FA setup when xero connected and 2FA disabled#46750
Conversation
…en xero connected and 2FA disabled
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
Reviewer Checklist
Screenshots/VideosAndroid: NativeCleanShot.2024-08-05.at.11.40.16.mp4Android: mWeb ChromeCleanShot.2024-08-05.at.11.43.49.mp4iOS: NativeCleanShot.2024-08-05.at.11.31.11.mp4iOS: mWeb SafariCleanShot.2024-08-05.at.11.24.09.mp4MacOS: Chrome / SafariCleanShot.2024-08-05.at.11.25.26.mp4MacOS: DesktopCleanShot.2024-08-05.at.11.47.18.mp4 |
| initialReportID = ReportUtils.findLastAccessedReport(!canUseDefaultRooms, shouldOpenOnAdminRoom(), activeWorkspaceID)?.reportID; | ||
| const initialReport = ReportUtils.findLastAccessedReport(!canUseDefaultRooms, shouldOpenOnAdminRoom(), activeWorkspaceID); | ||
| initialReportID = initialReport?.reportID ?? ""; |
There was a problem hiding this comment.
When a user logs in, initially there is no data in ONYX when 2FA is disabled with Xero (Because server not responding with any data when 2FA is required), in this case initialReportID will stay undefined and below code
will result into
initialParams as r/undefined and app will treat undefined as reportId which will result into Hmm...not found page in report. To prevent this scenario, we need to avoid keeping initialReportID as undefined.Hence above code will keep
initialReportID as "" empty string when initialReportID is undefined.
This scenario is thoroughly explained in proposal's result section with video.
|
Hi @tushar-a-b, I see an issue with our linter |
|
@Julesssss fixed it 👍 |
|
✋ 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/Julesssss in version: 9.0.18-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.18-10 🚀
|
Details
This PR addresses an issue where the onboarding modal appears after refreshing the page with 2FA setup when xero is connected and 2FA is disabled.
Fixed Issues
$ #46026
PROPOSAL: #46026 (comment)
Tests
Precondition:
Offline tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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_native.mp4
Android: mWeb Chrome
android_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
mac_chrome.mp4
MacOS: Desktop
mac_desktop.mp4