Skip to content
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-11-29] [$500] mWeb - AFN currency appears when double tapping currency in BNP page. #30508

Closed
1 of 6 tasks
kbecciv opened this issue Oct 27, 2023 · 43 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Oct 27, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.3.92.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:

  1. Go to https://staging.new.expensify.com/
  2. Tap fab
  3. Tap request money
  4. Double tap on currency

Expected Result:

Select a currency page is showing when double tapping currency in BNP page.

Actual Result:

AFN currency appears when double tapping currency in BNP page.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Android: Native
Android: mWeb Chrome
Bug6253124_1698401047780.afn.mp4
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01568b3bf483e166b4
  • Upwork Job ID: 1717886996267233280
  • Last Price Increase: 2023-10-27
  • Automatic offers:
    • getusha | Reviewer | 27599049
    • BhuvaneshPatil | Contributor | 27599050
Issue OwnerCurrent Issue Owner: @sonialiap
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 27, 2023
@melvin-bot melvin-bot bot changed the title mWeb - AFN currency appears when double tapping currency in BNP page. [$500] mWeb - AFN currency appears when double tapping currency in BNP page. Oct 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

Triggered auto assignment to @sonialiap (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01568b3bf483e166b4

@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha (External)

@spectreintegrated
Copy link

Proposal

Please re-state the problem that we are trying to solve in this issue.

AFN currency is selected when double tapping BNP

What is the root cause of that problem?

The user taps on the currency menu before they can even see it.

What changes do you think we should make in order to solve the problem?

Disable selection until list is visible.

What alternative solutions did you explore? (Optional)

@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

📣 @spectreintegrated! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@spectreintegrated
Copy link

spectreintegrated commented Oct 27, 2023

Contributor details
Your Expensify account email: info@spctr.ltd
Upwork Profile Link: https://www.upwork.com/freelancers/~01e0f115879dbdd44f

@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

⚠️ Missing/invalid email or upwork profile link. Please make sure you add both your Expensify email and Upwork profile link in the format specified.

@BhuvaneshPatil
Copy link
Contributor

BhuvaneshPatil commented Oct 27, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

AFN currency appears when double tapping currency in BNP page

What is the root cause of that problem?

When user taps twice, the currency is selected even before the screen transition ends.

What changes do you think we should make in order to solve the problem?

We shall disable/do nothing until the transition has ended.
To achieve this -
We shall change the onSelectRow method in IOUCurrencySelection component.
We can make it something like this

                onSelectRow={(option) => {
                    if (!canSelect) {
                        return;
                    }
                    confirmCurrencySelection(option);
                }}

canSelect is the state, that will be false initially and we will set it to true using onEntryTransitionEnd.
result -

Screen.Recording.2023-10-27.at.8.11.23.PM.mov

What alternative solutions did you explore? (Optional)

@tienifr
Copy link
Contributor

tienifr commented Oct 27, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

AFN currency appears when double tapping currency in BNP page.

What is the root cause of that problem?

When the user taps twice, the second tap will land on the new currency screen, causing a random currency on that screen to be selected.

What changes do you think we should make in order to solve the problem?

We've had this use case before and the agreed method was to use useSingleExecution along with useWaitForNavigation to fix it. useSingleExecution is so that one execution of the button press will occur at a time, and useWaitForNavigation is so that an execution of the button press is not considered complete until the screen transition is successful.

We should use the two hooks and fix the currency button same as in this line.

We can enhance the useWaitForNavigation hook a bit so that it will additionally rely on a timeout to make sure we wait out the animation, similar to what we did when auto focusing an input here, this is to make it even more reliable.

What alternative solutions did you explore? (Optional)

We can fix it inside BaseSelectionList and BaseOptionsSelector so that the ListItem will remain disabled until the screen transition ends. This will make sure the user won't be able to select an option before the screen transition animation finishes. This is a global fix that will work for all pages.

@getusha
Copy link
Contributor

getusha commented Oct 27, 2023

@BhuvaneshPatil tested your solution on mWeb and it seems to work fine, could you also test your solution on native to check if it will have any side-effects?

@tienifr we recently removed the useSingleExecution code on the rnw-upgrade PR for web, which means it will not work after that PR gets merged. 0551c8b, i think until now it's being used only for native issues.

@BhuvaneshPatil
Copy link
Contributor

@getusha Sure

@BhuvaneshPatil
Copy link
Contributor

Uploading Screen Recording 2023-10-27 at 9.07.56 PM.mov…

It's working

@tienifr
Copy link
Contributor

tienifr commented Oct 27, 2023

@tienifr we recently removed the useSingleExecution code on the rnw-upgrade PR for web, which means it will not work after that PR gets merged

@getusha just curious why was it removed for web? It's useful in many scenarios like this one too.

i think until now it's being used only for native issues

If it's only because of this then we have a valid use case for it on web here. I think we should have a standardize way to fix this kind of issues rather than case by case.

@getusha
Copy link
Contributor

getusha commented Oct 27, 2023

@tienifr InteractionManager is behaving completely different and if i am not mistaken we experienced this issue #24482 (comment)
I remember confirming the usage of the functionality with you before removing the code via slack :)

@tienifr
Copy link
Contributor

tienifr commented Oct 27, 2023

@getusha ah yes, it was not mandatory needed on web but I do think it’s useful though.

can you also check the alternate solution in my proposal, it is a global fix too.

@getusha
Copy link
Contributor

getusha commented Oct 27, 2023

Thanks for the proposal @tienifr but i think we should go with the proposal @BhuvaneshPatil made, the solution works and they're the first to come up with the solution to prevent the selection before the transition ends.

Quick suggestion: Instead of having a separate state we should use didScreenTransitionEnd from ScreenWrapper

Screenshot 2023-10-27 at 8 17 12 PM

🎀 👀 🎀
C+ Reviewed

@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

Triggered auto assignment to @amyevans, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@tienifr
Copy link
Contributor

tienifr commented Oct 30, 2023

InteractionManager is behaving completely different and if i am not mistaken we experienced this issue #24482 (comment)

@getusha if we can get to the root of this and fix it, and recover the singleExecution implementation for web, do you think singleExecution would be a better solution?

I think we should have a more global fix here rather than a case-by-case.

@melvin-bot melvin-bot bot added the Overdue label Oct 30, 2023
@getusha
Copy link
Contributor

getusha commented Oct 30, 2023

@tienifr the root cause is the task queue of InteractionManager from react-native-web, i still think to reimplement the signleExecution code we still need to use debouncing or setTimeout for the replacement. using the transition state is a good solution, and we can apply it anywhere easily.

@melvin-bot melvin-bot bot removed the Overdue label Oct 30, 2023
@melvin-bot melvin-bot bot removed the Overdue label Nov 9, 2023
@amyevans
Copy link
Contributor

amyevans commented Nov 9, 2023

Sorry I haven't properly reviewed this yet, will handle later today

@amyevans
Copy link
Contributor

amyevans commented Nov 9, 2023

Good discussion, thanks for your engagement @tienifr. I agree with @getusha's assessment here though:

Even if we come up with a solution for singleExecution we still have to rely on a timeout, making it over-engineered solution for an issue we can simply fix using the actual transition end state. it's basically the same with additional code.

Let's go with the simple and straightforward approach outlined by @BhuvaneshPatil

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 9, 2023
Copy link

melvin-bot bot commented Nov 9, 2023

📣 @getusha 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Nov 9, 2023

📣 @BhuvaneshPatil 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

Copy link

melvin-bot bot commented Nov 10, 2023

@amyevans @sonialiap @BhuvaneshPatil @getusha this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@BhuvaneshPatil
Copy link
Contributor

WIP 🏗️, will raise PR by tonight

Copy link

melvin-bot bot commented Nov 10, 2023

@amyevans @sonialiap @BhuvaneshPatil @getusha this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Nov 11, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 22, 2023
@melvin-bot melvin-bot bot changed the title [$500] mWeb - AFN currency appears when double tapping currency in BNP page. [HOLD for payment 2023-11-29] [$500] mWeb - AFN currency appears when double tapping currency in BNP page. Nov 22, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 22, 2023
Copy link

melvin-bot bot commented Nov 22, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Nov 22, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.1-13 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-11-29. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Nov 22, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@getusha] The PR that introduced the bug has been identified. Link to the PR:
  • [@getusha] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@getusha] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@getusha] Determine if we should create a regression test for this bug.
  • [@getusha] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@sonialiap] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

Copy link

melvin-bot bot commented Nov 22, 2023

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@BhuvaneshPatil
Copy link
Contributor

FYI, changes made for this issue didn't cause any regression.
#31687 (comment)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 28, 2023
@getusha
Copy link
Contributor

getusha commented Nov 30, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@getusha] The PR that introduced the bug has been identified. Link to the PR: N/a this is an edge case we never handled before.
  • [@getusha] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: N/a
  • [@getusha] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/a
  • [@getusha] Determine if we should create a regression test for this bug. No, this is an edge case.
  • [@getusha] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

@sonialiap
Copy link
Contributor

@BhuvaneshPatil $500 - paid ✔️
@getusha $500 - paid ✔️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants