-
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
[$4000] IOS - Timezone - Toggle switch back to online results after enabled connection #15641
Comments
Triggered auto assignment to @abekkala ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~01aa6eaf96fa7c4cfe |
Current assignee @abekkala is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
Triggered auto assignment to @aldo-expensify ( |
I don't understand why this is considered a bug. |
I think the expected/actual results are poorly described, or at least I don't understand when I read this: "should not switch back to online results". Anyway, from looking at the video, I understand that the problem is that it doesn't keep the settings the user chose while offline, the setting reverts back to detecting automatically the timezone. @osofus thanks for having a look. I think we may consider it a bug because: The user changes its settings from X to Y, it should stay in Y no matter the connection status. We shouldn't force back on the user to have automatic detection of timezone just because they regained connection. |
Thanks @aldo-expensify, when I watched the video again till the end I understood the problem. |
Yep, I think we should expect that the setting should not change at all when going offline/online/offline/etc |
ProposalPlease re-state the problem that we are trying to solve in this issue."Automatically Determine Time Zone" switch should not be available in offline mode What is the root cause of that problem?Root cause is network status not check in timezone page What changes do you think we should make in order to solve the problem?We need the check network status in timezone page and make switch disabled while network goes offline. Add "withNetwork" to compose and add networkPropTypes to propTypes export default compose(
withLocalize,
withNetwork(),
withCurrentUserPersonalDetails,
)(TimezoneInitialPage); Change switch component isOn prop like this. (If network goes offline then make switch off. We will eliminate onToggle too) <Switch
isOn={timezone.automatic && !props.network.isOffline} // check network here
onToggle={updateAutomaticTimezone}
/> Test VideosSimulator.Screen.Recording.-.iPhone.14.Pro.-.2023-03-04.at.12.13.55.mp4Please watch switch component with the offline status at bottom left !! |
ProposalPlease re-state the problem that we are trying to solve in this issue.Timezone selection set when network is offline resets when network is back online. What is the root cause of that problem?The root cause of this issue is that while offline, network requests for setting timezone fail. Since we have not defined any failureData, the selection is switched back when the connection becomes available again. What changes do you think we should make in order to solve the problem?We need to add the following here and here.
For the optimistic data defined above, we can add What alternative solutions did you explore? (Optional)None |
No updates on my side, I'll give some time for @mananjadhav to have a first look at the proposals |
I'll review the proposals today. |
@mananjadhav have you had a moment to review? |
I think the root cause and the solution for this issue are the same as that I mentioned in this proposal |
Triggered auto assignment to @flaviadefaria ( |
This comment was marked as duplicate.
This comment was marked as duplicate.
@flaviadefaria Current Status:
when it's time for payments: |
@allroundexperts yes, I believe that is the case. We don't want to change the pattern, we just want to fix the settings changing the value when we come back online. This seems to only happen in IOUs devices (not the emulator), and I don't have one to debug this further. |
No overdue! |
I'll remove the HOLD because there is something to fix (maybe) not related to the replay effect (see this) |
@mananjadhav @flaviadefaria @aldo-expensify this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks! |
Hey @aldo-expensify , I think this bug has been solved by changes from this PR https://github.com/Expensify/App/pull/16093/files#diff-61e10fef9d79a42e783dbaeb95dc420f23738d0d64c8f7d242208b9e36d54076R23-R27 In short, we sort requests and let CONST.NETWORK.COMMAND.RECONNECT_APP to the last. The only last bug I found is toggle 2 times => it shows incorrect "automatic timezone" setting until we refresh whole page |
Thanks for pointing that out @hoangzinh . @mananjadhav can you check if this is still reproduce for you in IOS? |
@hoangzinh toggle it 2 times while offline and then go online? |
yes it is. let me attach the recording on my end Screen.Recording.2023-03-27.at.22.40.05-1080.mp4 |
@aldo-expensify I am not able to reproduce the original bug. But I am able to reproduce the bug @hoangzinh reported. |
@mananjadhav This is due to the request/response timing issues. The response from the ReconnectApp command is received before the second request is completed in the backend. So if you refresh the app again you'll get the right value back for the timezone. In one of the previous issues I had recommended to only send one request (the final one) to the server for all toggle-able actions that are added while being offline. I would recommend to do the same here. Edit: The other option is to call the ReconnectApp again after the last queued request is completed but that will still cause the flicker behaviour. |
my point of view is we can close this GH issue because the original bug is solved (or not able to reproduce again with latest Expensify version). I can help to report this new issue base on my finding so we have a fresh GH issue and get more proposals But if we think we should fix this new bug here. I will send my proposal here too. |
I'll just close this because it is true that the original bug reported was fixed, and I don't think it is right to modify this issue's description to make it about a different bug. The "replay problem" is being worked here: #12775 Thanks again @hoangzinh for finding out it was fixed. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
Toggle "Automatically determine your location" should not switch back after recovering internet connection
Actual Result:
Toggle "Automatically determine your location" switches back after recovering internet connection
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.78.0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
RPReplay_Final1677856847.MP4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: