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-04-10] [$1000] [Regression] Request Money - Amount field not auto focused if suddenly loose focus #16511

Closed
2 of 6 tasks
kbecciv opened this issue Mar 25, 2023 · 59 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 Mar 25, 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!


Issue found when executing PR #16394

Action Performed:

  1. Launch expensify app
  2. Login with any account
  3. Tap on the FAB button -> Send money
  4. Enter numbers
  5. Click outside of numpad
  6. Enter numbers

Expected Result:

Autofocus Amount field if suddenly loose focus

Actual Result:

Amount field not auto focused if suddenly loose focus

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.2.89.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

Bug5992450_16394_Desktop.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01dbf046ada3294608
  • Upwork Job ID: 1640296677002747904
  • Last Price Increase: 2023-03-27
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 25, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Mar 25, 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

@luacmartins
Copy link
Contributor

@mountiny @0xmiroslav @narefyev91 since you worked on #16394. Tapping outside the input doesn't allow for further inputs

@mountiny
Copy link
Contributor

Thanks for the bump here, I will take this one on with @narefyev91 again. Changes to this page open a can of worms sorry

@0xmiros
Copy link
Contributor

0xmiros commented Mar 27, 2023

@mountiny @0xmiroslav @narefyev91 since you worked on #16394. Tapping outside the input doesn't allow for further inputs

yup that's what I was thinking of but solution of just fixing mWeb side went ahead

@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Mar 27, 2023
@melvin-bot melvin-bot bot changed the title Request Money - Amount field not auto focused if suddenly loose focus [$1000] Request Money - Amount field not auto focused if suddenly loose focus Mar 27, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~01dbf046ada3294608

@MelvinBot
Copy link

Current assignee @sonialiap is eligible for the External assigner, not assigning anyone new.

@MelvinBot
Copy link

Current assignee @0xmiroslav is eligible for the External assigner, not assigning anyone new.

@mountiny mountiny changed the title [$1000] Request Money - Amount field not auto focused if suddenly loose focus [$1000] [Regression] Request Money - Amount field not auto focused if suddenly loose focus Mar 27, 2023
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 27, 2023
@MelvinBot
Copy link

Current assignee @mountiny is eligible for the External assigner, not assigning anyone new.

@narefyev91
Copy link
Contributor

I'm Nikolay from Callstack - and i will take a look on this one

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

📣 @narefyev91 You have been assigned to this job by @mountiny!
Please apply to this job in Upwork 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 📖

@mountiny
Copy link
Contributor

@0xmiroslav sorry it wasnt clear from you comment on the PR, your suggestion seemed to introduce a different regression.

Let's try to properly investigate this page and get the best cross platform solution, I truest in @0xmiroslav and @narefyev91 skills here to get to the best solution together 🤝 thanks 🙇

@0xmiros
Copy link
Contributor

0xmiros commented Mar 27, 2023

sorry it wasnt clear from you comment on the PR, your suggestion seemed to introduce a #16394 (comment) regression

yes I knew that so that's why I didn't persist to use my approach.
We should find out way of fixing both issues on web/desktop:

  • clicking on any area don't lose focus (alternative is to use similar approach what we did in mWeb, so listen keydown event and manually focus but not sure I follow that approach)
  • input numbers should be selectable and cursor should be moveable as normal

@narefyev91
Copy link
Contributor

@mountiny @0xmiroslav As a workaround seems we need to have custom event handler to detect onMouseDown event and only preventDefault() if we click on main wrapper, but not on input (to allow user to move cursor)

    /**
     * Listens for mouse down event and applies the action
     *
     * @param {Object} e
     */
    handleMouseDown(e) {
        if (e.target.nodeName !== 'DIV') { return; }
        e.preventDefault();
    }
Screen.Recording.2023-03-27.at.14.52.49.mov

@mountiny
Copy link
Contributor

Currency selector will still work fine?

@narefyev91
Copy link
Contributor

@mountiny yup

Screen.Recording.2023-03-27.at.15.01.24.mov

@mountiny
Copy link
Contributor

Nice, curious for @0xmiroslav thoughts!

Thanks!

@0xmiros
Copy link
Contributor

0xmiros commented Mar 27, 2023

It seems work but as @narefyev91 said, it's a workaround. Any chance of finding better solutions?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Mar 29, 2023
@melvin-bot melvin-bot bot changed the title [$1000] [Regression] Request Money - Amount field not auto focused if suddenly loose focus [HOLD for payment 2023-04-10] [$1000] [Regression] Request Money - Amount field not auto focused if suddenly loose focus Apr 3, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 3, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Apr 3, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.93-4 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-04-10. 🎊

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@MelvinBot
Copy link

MelvinBot commented Apr 3, 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:

  • [@0xmiroslav / @mountiny] The PR that introduced the bug has been identified. Link to the PR:
  • [@0xmiroslav / @mountiny] 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:
  • [@0xmiroslav / @mountiny] 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:
  • [@sonialiap] Determine if we should create a regression test for this bug.
  • [@0xmiroslav] 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:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 Daily KSv2 labels Apr 10, 2023
@mountiny
Copy link
Contributor

@0xmiroslav would you be able to help with the Checklist please? Then we can pay out

@0xmiros
Copy link
Contributor

0xmiros commented Apr 12, 2023

The PR that introduced the bug has been identified. Link to the PR:

This issue existed from the beginning but we missed web desktop case while fixing mWeb issue on #16394

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:

#15855 (comment)

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:

This is already in checklist. I ran the tests on all platforms & verified they passed on: ... so no need further discussion I think.

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.

I think Test Steps in PR can be used for regression test steps.

@mountiny
Copy link
Contributor

Thank you! I think Sonia is ooo so I will ask someone to help with this.

@mountiny
Copy link
Contributor

@sonialiap we should pay $1000 to @0xmiroslav and we should be all set

@Christinadobrzyn Christinadobrzyn self-assigned this Apr 13, 2023
@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Apr 13, 2023

Helping with payment:

Looks like this job is eligible for the speed bonus.
Upwork job - https://www.upwork.com/ab/applicants/1640296677002747904/job-details

@narefyev91 can you please provide your Upwork profile so I can hire you for this job?
@0xmiroslav I submitted a request to hire you for the job, let me know when you accept and I'll pay.

@0xmiros
Copy link
Contributor

0xmiros commented Apr 13, 2023

@Christinadobrzyn I am only the one for upwork payment. @narefyev91 is a callstack member.

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Apr 14, 2023

Ah thank you for confirming @0xmiroslav!

Submitted Test Rail regression test here - https://github.com/Expensify/Expensify/issues/276043

Paid $1000 + $500 speed bonus to @0xmiroslav

Closing this GH

@hayata-suenaga
Copy link
Contributor

I'm coming to this issue from another issue issue.

The event.preventDefault(); was added in the the PR to fix this issue. However, the original issue doesn't seem to be a problem. Isn't it an expected behavior that the text input looses focus if you click outside of it?

@hayata-suenaga
Copy link
Contributor

decided to go with this fix

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

10 participants