-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tushar-a-b Can you explain this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
initialParams={getCentralPaneScreenInitialParams(centralPaneName, initialReportID)} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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