You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Awaiting Miro Payment] [$1000] Timezone select page does not navigate back to timezone initial page after user changes timezone to automatic from another device #24516
From device A, go to the timezone details page and turn off automatic timezone selection
From device B, go to the timezone select page.
From device A, turn on automatic timezone selection.
Notice in device B, user remains on the timezone select page, and if they come back to timezone details page, they cant go back to the select page because their timezone is automatic
Expected Result:
User should be redirected back to timezone details page if they update their timezone to automatic
Actual Result:
User is not redirected back to timezone details page if they update their timezone to automatic
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.53-1 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
Please re-state the problem that we are trying to solve in this issue.
We want the user to navigate back to the initial timezone page from the select page, if they change their timezone to automatic from another device.
What is the root cause of that problem?
We are not navigating the user back to initial timezone page when they change their timezone to automatic from another device.
What changes do you think we should make in order to solve the problem?
We are already listening to the props.currentUserPersonalDetails in TimezoneSelectPage so we just need to navigate back to timezone initial page from the timezone select page whenever
User updates their timezone to automatic from another device
User loads the timezone select page URL /settings/profile/timezone/select
something like this pseudocode here and here
Please re-state the problem that we are trying to solve in this issue.
We want the user to navigate back to the initial timezone page from the select page, if they change their timezone to automatic from another device.
What is the root cause of that problem?
We are not navigating the user back to initial timezone page when they change their timezone to automatic from another device.
What changes do you think we should make in order to solve the problem?
We are already listening to the props.currentUserPersonalDetails in TimezoneSelectPage so we just need to navigate back to timezone initial page from the timezone select page whenever
User updates their timezone to automatic from another device
User loads the timezone select page URL /settings/profile/timezone/select
Please re-state the problem that we are trying to solve in this issue.
User can access the timezone selection page and even select a new timezone even though the user has already turned on the automatic timezone.
What is the root cause of that problem?
This issue was previously fixed here #14340 where we decided to disable the list when the automatic timezone is turned on. However, this stops working after :
OptionsSelector uses OptionsList which renders OptionRow as its item and it will have a condition to disable the OptionRow. We can basically disable it by disabling the whole list (props.isDisabled), each section (section.isDisabled), or each item (item.isDisabled)
and the page is migrated to the function component.
Notice that the timezone is a ref and it never updates when we change it (turn on/off the automatic timezone) from other devices/browser tabs.
I only use section.isDisabled for the disabled condition because only the timezone list that uses SelectionListRadio and the disabled state is on the section object.
I don't think anyone is going to really run into the scenario in the OP in practice. That said, if I'm following it correctly and there's a regression insofar as being able to load the list of timezones from a URL and a fix here resolves that as well, let's go ahead.
changed the title [-]Timezone select page does not navigate back to timezone initial page after user changes timezone to automatic from another device[/-][+][$1000] Timezone select page does not navigate back to timezone initial page after user changes timezone to automatic from another device[/+]on Aug 14, 2023
@trjExpensify I received a new offer for reporting, however, I already accepted an offer before. Please let me know if we should go with the new or old one.
changed the title [-][$1000] Timezone select page does not navigate back to timezone initial page after user changes timezone to automatic from another device[/-][+][Awaiting Miro Payment] [$1000] Timezone select page does not navigate back to timezone initial page after user changes timezone to automatic from another device[/+]on Sep 19, 2023
Activity
melvin-bot commentedon Aug 13, 2023
Triggered auto assignment to @trjExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Aug 13, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)m-natarajan commentedon Aug 13, 2023
Proposal by @huzaifa-99
Please re-state the problem that we are trying to solve in this issue.
We want the user to navigate back to the initial timezone page from the select page, if they change their timezone to automatic from another device.
What is the root cause of that problem?
We are not navigating the user back to initial timezone page when they change their timezone to automatic from another device.
What changes do you think we should make in order to solve the problem?
We are already listening to the
props.currentUserPersonalDetailsinTimezoneSelectPageso we just need to navigate back to timezone initial page from the timezone select page whenever/settings/profile/timezone/selectsomething like this pseudocode here and here
What alternative solutions did you explore? (Optional)
N/A
huzaifa-99 commentedon Aug 13, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
We want the user to navigate back to the initial timezone page from the select page, if they change their timezone to automatic from another device.
What is the root cause of that problem?
We are not navigating the user back to initial timezone page when they change their timezone to automatic from another device.
What changes do you think we should make in order to solve the problem?
We are already listening to the
props.currentUserPersonalDetailsinTimezoneSelectPageso we just need to navigate back to timezone initial page from the timezone select page whenever/settings/profile/timezone/selectsomething like this pseudocode here and here
What alternative solutions did you explore? (Optional)
N/A
ahmedGaber93 commentedon Aug 13, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Timezone select page does not navigate back to timezone initial page after user changes timezone to automatic from another device
What is the root cause of that problem?
User can open select timezone page by link normally without any handling to hide this when the timezone is automatic.
What changes do you think we should make in order to solve the problem?
We need to wrap page content with
FullPageNotFoundViewWe can also display specific message in FullPageNotFoundView like you can't select timezone
What alternative solutions did you explore? (Optional)
N/A
bernhardoj commentedon Aug 14, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
User can access the timezone selection page and even select a new timezone even though the user has already turned on the automatic timezone.
What is the root cause of that problem?
This issue was previously fixed here #14340 where we decided to disable the list when the automatic timezone is turned on. However, this stops working after :
OptionsSelectortoSelectionListRadioThe timezone is disabled if the automatic timezone is on here:
App/src/pages/settings/Profile/TimezoneSelectPage.js
Line 79 in a03a21d
OptionsSelectorusesOptionsListwhich rendersOptionRowas its item and it will have a condition to disable theOptionRow. We can basically disable it by disabling the whole list (props.isDisabled), each section (section.isDisabled), or each item (item.isDisabled)App/src/components/OptionsList/BaseOptionsList.js
Lines 162 to 174 in a03a21d
However, the
SelectionListRadiodon't have a condition to disable its item (RadioListItem).App/src/components/SelectionListRadio/BaseSelectionListRadio.js
Lines 160 to 170 in a03a21d
Notice that the timezone is a ref and it never updates when we change it (turn on/off the automatic timezone) from other devices/browser tabs.
App/src/pages/settings/Profile/TimezoneSelectPage.js
Line 79 in a03a21d
What changes do you think we should make in order to solve the problem?
and disable the pressable of the item.
App/src/components/SelectionListRadio/RadioListItem.js
Lines 29 to 33 in a03a21d
I only use
section.isDisabledfor the disabled condition because only the timezone list that usesSelectionListRadioand the disabled state is on thesectionobject.timezoneobjectApp/src/pages/settings/Profile/TimezoneSelectPage.js
Line 38 in a03a21d
just like what we did in the timezone initial page
App/src/pages/settings/Profile/TimezoneInitialPage.js
Line 29 in a03a21d
trjExpensify commentedon Aug 14, 2023
I don't think anyone is going to really run into the scenario in the OP in practice. That said, if I'm following it correctly and there's a regression insofar as being able to load the list of timezones from a URL and a fix here resolves that as well, let's go ahead.
[-]Timezone select page does not navigate back to timezone initial page after user changes timezone to automatic from another device[/-][+][$1000] Timezone select page does not navigate back to timezone initial page after user changes timezone to automatic from another device[/+]melvin-bot commentedon Aug 14, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01b0a8cd3364d19ad6
melvin-bot commentedon Aug 14, 2023
Current assignee @trjExpensify is eligible for the External assigner, not assigning anyone new.
32 remaining items
0xmiroslav commentedon Sep 18, 2023
If you're waiting for price confirmation:
1.5k (original price stated on GH title plus efficiency bonus applies based on #24516 (comment))
trjExpensify commentedon Sep 18, 2023
Thanks, super helpful! So confirming payments due as follows:
$250 to @huzaifa-99 for the bug report
$1,500 to @0xmiroslav for the C+ review & #urgency bonus
$1,500 to @bernhardoj for the fix & #urgency bonus
Offers sent!
huzaifa-99 commentedon Sep 18, 2023
@trjExpensify I received a new offer for reporting, however, I already accepted an offer before. Please let me know if we should go with the new or old one.
trjExpensify commentedon Sep 19, 2023
@bernhardoj - paid!
@huzaifa-99 - paid!
@0xmiroslav - waiting on you now.
[-][$1000] Timezone select page does not navigate back to timezone initial page after user changes timezone to automatic from another device[/-][+][Awaiting Miro Payment] [$1000] Timezone select page does not navigate back to timezone initial page after user changes timezone to automatic from another device[/+]melvin-bot commentedon Sep 26, 2023
@trjExpensify, @mountiny, @bernhardoj, @0xmiroslav Eep! 4 days overdue now. Issues have feelings too...
0xmiroslav commentedon Sep 26, 2023
Not overdue
trjExpensify commentedon Sep 28, 2023
@0xmiroslav like the other issue, if you're tracking this somewhere else. I'm going to close it!