-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[HOLD for payment 2023-09-06] [$1000] Android - Clicking on different option quickly opens many tabs #23867
Comments
Triggered auto assignment to @mallenexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.click on two options quickly in the settings, two pages open simultaneously due to multiple navigation actions being fired What is the root cause of that problem?two navigation actions are triggered in quick succession, and we don't have a mechanism in place to prevent multiple navigations from happening simultaneously. What changes do you think we should make in order to solve the problem?Instead of directly calling the navigation function as shown in the code snippet below: App/src/pages/settings/InitialSettingsPage.js Lines 187 to 189 in eb02006
We will create a new debounced navigation function that ensures the navigation is not called multiple times within a short period. This will prevent rapid and unintended navigation. constructor(props) {
this.navigate = _.debounce(this.navigate.bind(this), 300);
...
}
navigate(route) {
Navigation.navigate(route);
}
...
action: () => {
// add to all actions
thsi.navigate(ROUTES.SETTINGS_SHARE_CODE);
} What alternative solutions did you explore? (Optional)we can introduce a disableOptionForNavigation flag to prevent the navigation function from being called again while the previous navigation is still being processed. This flag should be set to true when the first navigation is triggered and reset to false when the setting focus change (if blurred mean navigation is complete ) componentDidUpdate(prevProps) {
// if focus change we need to reset flage
if (this.props.isFocused !== prevProps.isFocused && this.disableOptionForNavigation ) {
this.disableOptionForNavigation = false;
}
}
const NavigateWithDisable (route ) {
if (this.disableOptionForNavigation){
return;
}
Navigation.navigate(route);
this.this.disableOptionForNavigation = true;
} |
Job added to Upwork: https://www.upwork.com/jobs/~016e037ea65271ad6b |
Current assignee @mallenexpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
Was able to repro on Daniel Silva's phone, I wasn't able to via BrowserStack. Seems like an External issue... |
ProposalPlease re-state the problem that we are trying to solve in this issue.The app opens all the clicked options What is the root cause of that problem?We're not preventing users from selecting other options when the first option's navigation is in progress. What changes do you think we should make in order to solve the problem?This issue has happened before, but for the This problem is the same, just that it does not apply to one single element, but a menu, where we only want 1 execution to complete before another one, so I propose that we address them with a general solution.
What this will do is, with any action passed in, it will only allow 1 such action to occur at a time. This is the same approach we're already using for the
With this, only 1 MenuItem clicks will happen at a time, and the rest of the MenuItem will be disabled when one is executing What alternative solutions did you explore? (Optional)Other places that use |
Hey @kbecciv @mananjadhav @mallenexpensify. |
This comment was marked as outdated.
This comment was marked as outdated.
I investigated this further. I generally would want to avoid I think @tienifr's approach of 🎀 👀 🎀 C+ reviewed. |
Triggered auto assignment to @youssef-lr, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@mananjadhav, @youssef-lr, @mallenexpensify Huh... This is 4 days overdue. Who can take care of this? |
I like @tienifr's solution as well! |
📣 @mananjadhav Please request via NewDot manual requests for the Reviewer role ($1000) |
@mallenexpensify I didn't get paid yet. |
@mallenexpensify This couldn't be pinpointed to a specific PR. This was an lag in the App we fixed by adding a throttling/single thread execution. Considering this is prevalent more on Android only. I don't think we need regression test steps. |
$1,000 approved for payment via NewDot based on BZ summary. |
Not overdue. |
@muxriddinmuqimov77 I assumed you were the below, is that not correct? |
Not it is not me.
2023 sen 11, Dush, 11:35 Matt Allen ***@***.***>:
… @muxriddinmuqimov77 <https://github.com/muxriddinmuqimov77> I assumed you
were the below, is that not correct?
[image: image]
<https://user-images.githubusercontent.com/22508304/266928104-0c24a871-2564-4714-bc3f-b0d631f7ddc9.png>
—
Reply to this email directly, view it on GitHub
<#23867 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYFDM5LCJTQE563OXNRD6DDXZ2WKJANCNFSM6AAAAAA24T6HYI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Requested refund from the contributor I screenshotted above Can you please provide a screenshot of your profile with name/avatar so I can be sure to pay the correct person. Thx |
When you submit an offer to the job, I'll accept it. Thanks |
Hey @mallenexpensify. Any updates? |
@muxriddinmuqimov77 hired, can you please accept the job and reply here once you have? |
@mejed-alkoutaini I figured out the issue! That said... @muxriddinmuqimov77 's bug reported wasn't acted up so, if you hadn't reported the bug again, we wouldn't have fixed it. Therefore, I think it's fair to compensate for reporting the bug, you don't need to approve the refund I requested. reminder to self, payment owed is $250 for @muxriddinmuqimov77 for reporting, I think I hired them for $1000 by mistake. |
@mallenexpensify Will you send updated offer or update the amount after I accept the offer? |
New offer sent for $250 @muxriddinmuqimov77 ! |
@mallenexpensify Accepted. Thanks! |
@mallenexpensify I approved the refund 2 days ago, can you create a new milestone for it ? |
@mananjadhav, @youssef-lr, @mallenexpensify, @tienifr Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Final payment recap @mejed-alkoutaini , I issued you a bonus on the original contract so it should show up for you, thanks for the patience. Finally.... @mananjadhav , can you please fill out the BZ checklist above from above so we can get this issue closed? |
@mallenexpensify Please check my comment here. Let me know if you need further information. |
Thanks @mananjadhav , closing |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
The app should opens only the first clicked option
Actual Result:
The app opens all the clicked options
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.47-2
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
Notes/Photos/Videos: Any additional supporting documentation
Screen_Recording_20230728-231420.mp4
Screen_Recording_20230729_132217_New.Expensify.mp4
Expensify/Expensify Issue URL:
Issue reported by: @muxriddinmuqimov77
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688707995939759
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: