Fix: Migrated User Modal shows twice#58348
Conversation
|
@ishpaul777 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] |
|
I am updating the video in Android platform Edit: I updated video in Android platform |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-03-16.at.12.28.11.AM.movAndroid: mWeb ChromeScreen.Recording.2025-03-16.at.12.23.03.AM.moviOS: NativeScreen.Recording.2025-03-16.at.12.13.13.AM.moviOS: mWeb SafariScreen.Recording.2025-03-16.at.12.18.43.AM.movMacOS: Chrome / SafariScreen.Recording.2025-03-15.at.11.56.28.PM.movMacOS: DesktopScreen.Recording.2025-03-15.at.11.53.05.PM.mov |
| path?.includes(ROUTES.MIGRATED_USER_WELCOME_MODAL) && | ||
| lastVisitedPath && | ||
| !CONFIG.IS_HYBRID_APP && | ||
| isOnboardingCompleted && | ||
| !wasInvitedToNewDot && | ||
| authenticated && | ||
| !shouldShowRequire2FAModal |
There was a problem hiding this comment.
why do we need these many conditions ??
There was a problem hiding this comment.
I’ve updated the PR to remove the redundant condition. The new condition is:
path?.includes(ROUTES.MIGRATED_USER_WELCOME_MODAL) && lastVisitedPath && !CONFIG.IS_HYBRID_APP && isOnboardingCompleted && authenticated
This ensures the logic only runs if the user is not in a hybrid app (since I can’t test that), the onboarding flow is completed, and the user is authenticated.
There was a problem hiding this comment.
the onboarding flow is completed, and the user is authenticated.
how Is this relevant, will such user ever lands on this route?
also I think !CONFIG.IS_HYBRID_APP is not relevant
There was a problem hiding this comment.
how Is this relevant, will such user ever lands on this route?
When testing the PR without the isOnboardingCompleted condition, the logic in:
App/src/libs/Navigation/NavigationRoot.tsx
Line 122 in fee6c80
doesn’t run because the new logic causes an early return with:
return getAdaptedStateFromPath(lastVisitedPath, linkingConfig.config)
|
we have conflicts @truph01 |
|
@ishpaul777 I just fixed the conflict and removed |
|
✋ 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/neil-marcellini in version: 9.1.17-0 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.1.17-1 🚀
|
Explanation of Change
Fixed Issues
$ #58047
PROPOSAL: #58047 (comment)
Tests
src/hooks/useOnboardingFlow.ts:Or (For QA):
open app and Go to settings Troublshoot > enable Client side logging, then click on "View debug console" execute below command:
Offline tests
QA Steps
src/hooks/useOnboardingFlow.ts:Or (For QA):
open app and Go to settings Troublshoot > enable Client side logging, then click on "View debug console" execute below command:
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
Screen.Recording.2025-03-13.at.15.45.47.mov
Android: mWeb Chrome
Screen.Recording.2025-03-13.at.15.17.38.mov
iOS: Native
output.mp4
iOS: mWeb Safari
Screen.Recording.2025-03-13.at.15.15.07.mov
MacOS: Chrome / Safari
Screen.Recording.2025-03-13.at.15.07.23.mov
MacOS: Desktop
Screen.Recording.2025-03-13.at.15.21.46.mov