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 2024-08-05] [$250] Track Expense - Blue Border Appears on the Track Expense Button #45570

Closed
2 of 6 tasks
izarutskaya opened this issue Jul 17, 2024 · 24 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 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Jul 17, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: v9.0.8-1
Reproducible in staging?: Y
Reproducible in production?: N
Email or phone of affected tester (no customers): [email protected]
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Navigate to FAB > Track Expense.
  2. Add an amount and press Enter to proceed.
  3. Observe that a blue border appears on the Track Expense button.

Expected Result:

The blue border should not appear on the Track Expense button when Enter is pressed.

Actual Result:

A blue border appears on the Track Expense button when Enter is pressed.

Note: It is also reproducible on Submit expense flow

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

Bug6544741_1721198919290.Screen_Recording_2024-07-16_at_11.47.29_PM.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0137b996b36a246d89
  • Upwork Job ID: 1813481853685332253
  • Last Price Increase: 2024-07-17
  • Automatic offers:
    • akinwale | Reviewer | 103180951
    • nkdengineer | Contributor | 103180952
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

Triggered auto assignment to @CortneyOfstad (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Jul 17, 2024

Triggered auto assignment to @techievivek (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jul 17, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@izarutskaya
Copy link
Author

We think this issue might be related to the #vip-vsb

@izarutskaya
Copy link
Author

Production

bandicam.2024-07-17.10-19-43-201.mp4

@techievivek techievivek added External Added to denote the issue can be worked on by a contributor Daily KSv2 and removed DeployBlocker Indicates it should block deploying the API DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0137b996b36a246d89

@melvin-bot melvin-bot bot changed the title Track Expense - Blue Border Appears on the Track Expense Button [$250] Track Expense - Blue Border Appears on the Track Expense Button Jul 17, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

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

@techievivek
Copy link
Contributor

Not a deploy blocker since it's just an UI concern.

@nkdengineer
Copy link
Contributor

nkdengineer commented Jul 17, 2024

Proposal

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

A blue border appears on the Track Expense button when Enter is pressed.

What is the root cause of that problem?

In

confirmButtonRef.current?.focus();
, we manually trigger focus on the confirm button, this causes the blue border.

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

There's no need to manually trigger the focus on confirm button because the button has pressOnEnter here so its onPress will be triggered if we press enter.

We should simply replace this line by document.activeElement.blur();, so it will not automatically focus on other elements, the confirm button will be triggered on Enter so it can be considered to have the focus already, no manual focus needed.

We can create an util blurActiveElement to wrap the document.activeElement.blur(); logic on web, for other platforms that does not have blur focus ring, blurActiveElement will be a noop

What alternative solutions did you explore? (Optional)

Only call blurActiveElement if we check that the focus is not on the confirm button but on other buttons

Moreover, if we use blurActiveElement we don't really need timeout as in here, we can just run blurActiveElement directly in useCallback of useFocusEffect. This will also help avoid the blue focus ring showing and disappearing in the back button momentarily.

@nkdengineer
Copy link
Contributor

Proposal updated to add an alternative approach

@akinwale
Copy link
Contributor

@nkdengineer's proposal works here.

🎀👀🎀 C+ reviewed.

Copy link

melvin-bot bot commented Jul 19, 2024

Current assignee @techievivek is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jul 22, 2024
@nkdengineer
Copy link
Contributor

@akinwale The PR is here.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 29, 2024
@melvin-bot melvin-bot bot changed the title [$250] Track Expense - Blue Border Appears on the Track Expense Button [HOLD for payment 2024-08-05] [$250] Track Expense - Blue Border Appears on the Track Expense Button Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.13-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 2024-08-05. 🎊

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

Copy link

melvin-bot bot commented Jul 29, 2024

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:

  • [@akinwale] The PR that introduced the bug has been identified. Link to the PR:
  • [@akinwale] 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:
  • [@akinwale] 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:
  • [@akinwale] Determine if we should create a regression test for this bug.
  • [@akinwale] 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.
  • [@CortneyOfstad] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@CortneyOfstad CortneyOfstad removed the Bug Something is broken. Auto assigns a BugZero manager. label Jul 31, 2024
@CortneyOfstad CortneyOfstad removed their assignment Jul 31, 2024
@CortneyOfstad CortneyOfstad added the Bug Something is broken. Auto assigns a BugZero manager. label Jul 31, 2024
Copy link

melvin-bot bot commented Jul 31, 2024

Triggered auto assignment to @stephanieelliott (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 31, 2024
@CortneyOfstad CortneyOfstad self-assigned this Jul 31, 2024
@CortneyOfstad
Copy link
Contributor

@stephanieelliott I am heading OoO so reassigned so there is no delay in payment.

At this stage, we're waiting on @akinwale to complete the checklist and the automatic offer links for both @nkdengineer an @akinwale can be found here. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Aug 2, 2024
@techievivek
Copy link
Contributor

Not overdue, waiting for the checklists and payment to be done.

@techievivek
Copy link
Contributor

Dummy comment to remove overdue label.

@akinwale
Copy link
Contributor

akinwale commented Aug 5, 2024

  • [@akinwale] The PR that introduced the bug has been identified. Link to the PR:
  • [@akinwale] 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:

This was a regression from #44932. Comment.

  • [@akinwale] 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:
  • [@akinwale] Determine if we should create a regression test for this bug.
  • [@akinwale] 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.

Regression Test Steps

  1. Launch Expensify.
  2. Navigate to the Self-DM chat report.
  3. Click on the FAB and select Track expense.
  4. Enter a valid amount and continue to the next step.
  5. Verify that the confirm button does not have a blue border indicating active focus.

Do we agree 👍 or 👎?

@stephanieelliott
Copy link
Contributor

Summarizing payment on this issue:

Upwork job is here: https://www.upwork.com/jobs/~0137b996b36a246d89
Regression test is here: https://github.com/Expensify/Expensify/issues/418072

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 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

6 participants