-
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 that flashes for user transitioning from OldDot #49263
Fix onboarding modal that flashes for user transitioning from OldDot #49263
Conversation
src/libs/actions/Report.ts
Outdated
const hasCompletedGuidedSetupFlow = hasCompletedGuidedSetupFlowSelector(onboarding); | ||
|
||
// We need skip deeplinking if the user hasn't completed the guided setup flow. | ||
if (!hasCompletedGuidedSetupFlow) { | ||
Welcome.isOnboardingFlowCompleted({ | ||
onNotCompleted: () => OnboardingFlow.startOnboardingFlow(), | ||
}); | ||
return; | ||
} |
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.
Are you sure we can fully remove this?
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.
After consulting with @adamgrzybowski I'm not so sure 😅
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.
I'll revert it for now, as in some flows we might never hit the redirect to onboarding because of 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.
Need more testing and I don't want to block this PR, what do you think we could clean the onboarding logic a bit in a follow-up PR?
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.
I think the logic there is redundant a bit, right? we check if the modal should show and then we call Welcome.isOnboardingFlowCompleted
which does the same technically, so we could refactor this to only check hasCompletedGuidedSetupFlowSelector
and run OnboardingFlow.startOnboardingFlow()
if the modal should show.
but we can leave this for later
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.
Oh right, that looks redundant too. I was focusing around the fact that we also navigate the user in NavigationRoot.tsx
:
// If the user haven't completed the flow, we want to always redirect them to the onboarding flow.
// We also make sure that the user is authenticated.
if (!NativeModules.HybridAppModule && !hasCompletedGuidedSetupFlow && authenticated && !shouldShowRequire2FAModal) {
const {adaptedState} = getAdaptedStateFromPath(getOnboardingInitialPath(), linkingConfig.config);
return adaptedState;
}
I think we should create an issue to clean this up a bit, because I don't see a reason why we have many places in the code where we redirect to onboarding flow 🤷♂️
… OldDot" This reverts commit 46960fd.
@ikevin127 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] |
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / SafariScreen.Recording.2024-09-16.at.8.26.26.PM.movScreen.Recording.2024-09-16.at.8.30.11.PM.movMacOS: DesktopScreen.Recording.2024-09-16.at.8.37.57.PM.movAndroid: NativeScreen.Recording.2024-09-16.at.8.46.48.PM.movAndroid: mWeb ChromeScreen.Recording.2024-09-16.at.8.42.43.PM.moviOS: NativeScreen.Recording.2024-09-16.at.8.52.41.PM.moviOS: mWeb SafariScreen.Recording.2024-09-16.at.8.54.19.PM.mov |
The P/S makes sense to me and is logical too, working on videos now; |
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.
Change is simple and works well, have tested for all platform 👍
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.
Thanks!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@blazejkustra I am not sure if the QA team can run this step, could you help?
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.36-0 🚀
|
@kavimuru Yes, you should be able to do it on staging as shown on the video from description |
@kavimuru correct, you have to do it from the testing account from oldDot from console on inbox page |
We need clearer instructions on step 2, when we create an account on OldDot we are redirected to NewDot and the Onboarding modal is present. bandicam.2024-09-17.14-16-40-845.mp4 |
@IuliiaHerets Oh right, when you use a public domain like gmail.com in your email you are automatically redirected to NewDot and the onboarding modal should be displayed. However that's not the case when it’s a new user logging on private domain like @expensify.com (or @swmansion.com) for example in OldDot, they would not be redirected and they would not get this NVP therefore modal would not be displayed when logging on NewDot. Does that clear things up? |
@blazejkustra We can use Gmail and @applause.expensifail.com accounts. With the @applause.expensifail.com account we don't have an Onboarding modal at all. |
When account was created on OldDot:
When account was created on NewDot, the modal should be displayed. I guess that should do it @IuliiaHerets |
Yes i think you will need to test by;
|
🚀 Deployed to production by https://github.com/grgia in version: 9.0.36-2 🚀
|
@blazejkustra This PR introduced this bug: #49404 It also breaks my PR #49092 |
@CyberAndrii Fix is on its way, no need for a revert |
Details
Link to thread on slack that explains the issue.
There are two issues currently:
nvp_onboarding
isundefined
for a second, because of the default false value here, the modal is displayed. Thenvp_onboarding
is then updated to either:[]
(empty array) - modal disappears{ signupQualifier: whatever }
- modal is still displayed as we are hitting the default value@vit
mentioned above,
nvp_onboarding
could be an object when transitioning from OldDot to NewDot if there are other values in the NVP such assignupQualifier
(+hasCompletedGuidedSetupFlow
isundefined
). With the current default value the modal is shown, which isn't intended.Assuming we want to show the modal only for the users with the NVP where
hasCompletedGuidedSetupFlow
is set tofalse
. I think the easiest fix would be to change the default value in thehasCompletedGuidedSetupFlowSelector
totrue
.In other words, the modal will be displayed only when the nvp is loaded and
hasCompletedGuidedSetupFlow
===false
Fixed Issues
$ #49245
PROPOSAL: N/A
Tests
nvp_onboarding
on OldDot with this snippetNVP.set('onboarding', VALUE)
, do it in the OldDot console. (different values to test are:{}
,{test: true}
,{hasCompletedGuidedSetupFlow:true}
,{hasCompletedGuidedSetupFlow:false}
,null
)Offline tests
N/A
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 methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.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 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
MacOS: Chrome / Safari
test.1.mov