-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[HybridApp] Disable ExitSurvey in HybridApp #47856
[HybridApp] Disable ExitSurvey in HybridApp #47856
Conversation
Why do we need a timeout? |
@AndrewGable We need it because we can get stuck on that action if the connection is poor. |
Is it because the request will be canceled once we switch to Expensify Classic? And we need to wait for the API to finish before clearing out the values? |
I think we have two issues here
The first problem is easy to solve (we could move clearing fields to the optimistic data) but the second issue is the harder one because we can't tell when the API request finishes. In that situation we need timeout to always redirect the user |
Why can't we tell when the API finishes? |
Oh, sorry, I meant we can't predict how long the API call will take to end. And if so we could be showing a spinner for a long time. If the user decides to go back from the |
Why can't we redirect the user when the API finishes? Why do we have to guess with a timeout? |
It also seems that the request just hanged, and was never resolved, nor rejected. If it did, the state of the form would have changed. The fact that button had the spinner indicates that the request never set In that case we believe it is better to set a timeout - if the request takes too long or hangs, it is better to just send the user to OldDot - also from the UX point of view 😄 |
I've posted the comment at the same time as you've asked the question, so to address it a bit better by adding a couple more words 😄 Previously we were setting the In that case we've decided that it is better to set a timeout, instead of waiting forever for the call to resolve. In the end, the most important thing for the user is to switch experience, and the result of this particular call is not essential for the app to work correctly 😄 |
Adding my two cents 😄 We found that the main cause of the issue (not clearing the survey values, and blocked button with a spinner) was the hanging We decided that the best solution is to set a timeout and when the request hangs or takes way longer than expected we optimistically switch to NewDot. It helps us improve the UX because users won't get stuck in the NewDot app when they want to return to the OldDot. If you've got any other ideas/opinions, we'd love to hear them! |
I have been thinking about this:
|
@AndrewGable I tried making the button not async and this is the result :) Screen.Recording.2024-08-26.at.13.16.38.movThank you for your arguments and please let me know if you have any other questions/suggestions 🙏 |
This looks great, but we just talked internally and I think we are OK to remove this survey all together for HybridApp |
@AndrewGable Great news 🚀 Should I handle this here? |
Yes, let's do that on this PR 🚀 |
643bff5
to
84788f1
Compare
@hungvu193 @AndrewGable One of you needs to 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] |
Does this need a C+ review 😄 ? |
I think @AndrewGable will handle this one :) |
Looks great! Simulator.2024-08-29.at.15.33.06.mp4 |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
@@ -206,7 +206,7 @@ function signOutAndRedirectToSignIn(shouldResetToHome?: boolean, shouldStashSess | |||
if (!isAnonymousUser()) { | |||
// In the HybridApp, we want the Old Dot to handle the sign out process | |||
if (NativeModules.HybridAppModule && killHybridApp) { | |||
NativeModules.HybridAppModule.closeReactNativeApp(true); | |||
NativeModules.HybridAppModule.closeReactNativeApp(true, false); |
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.
Named parameters would be nice here
✋ 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/AndrewGable in version: 9.0.27-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.0.27-1 🚀
|
Details
Fixed Issues
$ #43142
PROPOSAL:
Tests
On HybridApp (the NewApp flow should not change)
NewDot
go toSettings
->Switch to Expensify Classic
Offline tests
QA Steps
NewDot
go toSettings
->Switch to Expensify Classic
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop