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
[HOLD for payment 2024-03-13] [$1000] Android - Personal Details - User can open both Address and Date of birth when quick tap on them #32753
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor
Version Number: 1.4.10-0 Reproducible in staging?: Y Reproducible in production?: Y 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 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
Open staging.new.expensify.com
Navigate to Settings> Profile > Personal details
Tap on Address field and than quickly tap Date of birth
Expected Result:
User should navigate to Address screen when tap on Address field
Actual Result:
User navigates to Address screen and than land on Date of birth screen
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Android - Personal Details - User can open both Address and Date of birth when quick tap on them[/-][+][$500] Android - Personal Details - User can open both Address and Date of birth when quick tap on them[/+]on Dec 8, 2023
Please re-state the problem that we are trying to solve in this issue.
User can open both Address and Date of birth when quick tap on them
What is the root cause of that problem?
We do not restrict a single action at a time. That's why even while an action is executing, another action can push to the queue.
What changes do you think we should make in order to solve the problem?
We can apply the useWaitForNavigation - isExecuting - singleExecution approach that we have been using across the app to make sure it only allow a single execution at a time. For example here.
Please re-state the problem that we are trying to solve in this issue.
User navigates to Address screen and than land on Date of birth screen
What is the root cause of that problem?
This is happening with almost all the MenuItem navigates to another page. This is because the user clicks on the second menu item before the first menu item finishes navigating.
What changes do you think we should make in order to solve the problem?
We used to fix this in another place using a combination of singleExecution and waitForNavigate as can be seen here.
But this is happening with all MenuItem so I think we should come up with a global fix to avoid this occurring again. Here's my suggestions:
Create a MenuItemGroup component which will use the useSingleExecution and provide a singleExecution method to its children via a context
Wrap the MenuItems or MenuItemWithTopDescriptions inside a screen (where we want to fix) in 1 MenuItemGroup
Update the MenuItem component to get singleExecution from context (from the MenuItemGroup passed down). If singleExecution exists, then wrap its onPress call inside it (and inside waitForNavigate)
So any time we create a new group of MenuItem, we'll wrap them inside MenuItemGroup, then it will have double tap prevention logic baked in and won't ever have this issue.
What alternative solutions did you explore? (Optional)
In step 3, if we don't want to add waitForNavigate there, we can add it to the MenuItem or MenuItemWithTopDescription individually when we use it.
Instead of using a Context, we can iterate the children and add singleExecution to the children, but I prefer Context since it will work well for any level of nested MenuItem inside other components.
Do we have any examples of Context used like this?
I see we have a MenuItemList component with iterative approach for MenuItems.
I think we like to selectively use the singleExecution for certain MenuItems and MenuItemsWithTopDescription only so I don't think we want to keep the Context at a top level so that deeply nested components get the value. If we use singleExecution for certain items only then we want to wrap only those items with provider. While Context can be beneficial in some cases where we can wrap many items, I don't see how it is beneficial than moving the logic to MenuItem and using a prop flag.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Dec 8, 2023
Triggered auto assignment to @adelekennedy (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Dec 8, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01cc50fcdb96ee2879
[-]Android - Personal Details - User can open both Address and Date of birth when quick tap on them[/-][+][$500] Android - Personal Details - User can open both Address and Date of birth when quick tap on them[/+]melvin-bot commentedon Dec 8, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 8, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @c3024 (
External)gijoe0295 commentedon Dec 8, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
User can open both Address and Date of birth when quick tap on them
What is the root cause of that problem?
We do not restrict a single action at a time. That's why even while an action is executing, another action can push to the queue.
What changes do you think we should make in order to solve the problem?
We can apply the
useWaitForNavigation-isExecuting-singleExecutionapproach that we have been using across the app to make sure it only allow a single execution at a time. For example here.For example:
What alternative solutions did you explore? (Optional)
Check for other places using
MenuItembecause it may have the same issue.neonbhai commentedon Dec 8, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
User can open both Address and Date of birth when quick tap on them
What is the root cause of that problem?
Logic to prevent quick tap in this Menu Item is missing on the
PersonalDetailsInitialPage.What changes do you think we should make in order to solve the problem?
We will use the
useSingleExecutionhook when navigation on this page.This will be coupled with
Then replace:
App/src/pages/settings/Profile/PersonalDetails/PersonalDetailsInitialPage.js
Line 84 in adbeba1
with
App/src/pages/settings/Profile/PersonalDetails/PersonalDetailsInitialPage.js
Line 90 in adbeba1
with
App/src/pages/settings/Profile/PersonalDetails/PersonalDetailsInitialPage.js
Line 97 in adbeba1
with
tienifr commentedon Dec 9, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
User navigates to Address screen and than land on Date of birth screen
What is the root cause of that problem?
This is happening with almost all the MenuItem navigates to another page. This is because the user clicks on the second menu item before the first menu item finishes navigating.
What changes do you think we should make in order to solve the problem?
We used to fix this in another place using a combination of
singleExecutionandwaitForNavigateas can be seen here.But this is happening with all MenuItem so I think we should come up with a global fix to avoid this occurring again. Here's my suggestions:
MenuItemGroupcomponent which will use theuseSingleExecutionand provide asingleExecutionmethod to its children via a contextMenuItems orMenuItemWithTopDescriptions inside a screen (where we want to fix) in 1MenuItemGroupMenuItemcomponent to getsingleExecutionfrom context (from theMenuItemGrouppassed down). IfsingleExecutionexists, then wrap itsonPresscall inside it (and insidewaitForNavigate)MenuItemGroup, then it will have double tap prevention logic baked in and won't ever have this issue.What alternative solutions did you explore? (Optional)
In step 3, if we don't want to add
waitForNavigatethere, we can add it to theMenuItemorMenuItemWithTopDescriptionindividually when we use it.Instead of using a Context, we can iterate the children and add
singleExecutionto the children, but I prefer Context since it will work well for any level of nestedMenuIteminside other components.c3024 commentedon Dec 9, 2023
@tienifr
Do we have any examples of Context used like this?
I see we have a MenuItemList component with iterative approach for MenuItems.
I think we like to selectively use the singleExecution for certain MenuItems and MenuItemsWithTopDescription only so I don't think we want to keep the Context at a top level so that deeply nested components get the value. If we use singleExecution for certain items only then we want to wrap only those items with provider. While Context can be beneficial in some cases where we can wrap many items, I don't see how it is beneficial than moving the logic to MenuItem and using a prop flag.
107 remaining items
melvin-bot commentedon Mar 13, 2024
Payment Summary
Upwork Job
BugZero Checklist (@adelekennedy )
adelekennedy commentedon Mar 13, 2024
This job closed so I re-used the posting - @c3024 & @tienifr will you apply here: https://www.upwork.com/jobs/~01d9acddb96214da33
tienifr commentedon Mar 14, 2024
@adelekennedy I applied, thanks!
adelekennedy commentedon Mar 18, 2024
@c3024 have you applied as well?
c3024 commentedon Mar 18, 2024
Yes @adelekennedy Applied. Thanks.
adelekennedy commentedon Mar 20, 2024
hmm I hired you both on Monday but it didn't seem to go through - I've just done it again in Upwork 🤞
tienifr commentedon Mar 20, 2024
@adelekennedy I’ve accepted the offer, thanks!
c3024 commentedon Mar 20, 2024
I've accepted too @adelekennedy
adelekennedy commentedon Mar 20, 2024
Done! Thank you both for bearing with me