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-09-18] [$250] Web - Scan-"Description" and "Category" fields are disabled after dismissing "Allow location" modal #48865

Closed
1 of 6 tasks
IuliiaHerets opened this issue Sep 10, 2024 · 28 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 10, 2024

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: v9.0.31-7
Reproducible in staging?: Y
**Reproducible in production?:**N
Issue was found when executing this PR: #48620
Email or phone of affected tester (no customers): applausetester+shsb22ertt@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

Prerequisite
Make sure the location permission is denied on the browser settings

  1. Log in to the new dot app
  2. Create a new workspace
  3. Go to the workspace chat and click on "+" > Submit expense
  4. Go to the scan tab > Choose file
  5. Upload a receipt to scan and click on submit
  6. After the "Allow location" modal opens up click somewhere else outside the modal
  7. After the modal is dismissed observe the "Description" and "Category" fields

Expected Result:

The "Description" and "Category" fields are clickable and can be edited

Actual Result:

The "Description" and "Category" fields are disabled and can not be clicked

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6598078_1725921708521.2024-09-09_23_24_55.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021833442936289826320
  • Upwork Job ID: 1833442936289826320
  • Last Price Increase: 2024-09-10
  • Automatic offers:
    • akinwale | Reviewer | 103895037
    • Krishna2323 | Contributor | 103896856
    • ikevin127 | Contributor | 103896860
Issue OwnerCurrent Issue Owner: @greg-schroeder
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Sep 10, 2024
Copy link

melvin-bot bot commented Sep 10, 2024

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

Copy link

melvin-bot bot commented Sep 10, 2024

Triggered auto assignment to @greg-schroeder (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 the Daily KSv2 label Sep 10, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Sep 10, 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.

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@mkzie2
Copy link
Contributor

mkzie2 commented Sep 10, 2024

Edited by proposal-police: This proposal was edited at 2023-10-03T12:00:00Z.

Proposal

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

The "Description" and "Category" fields are disabled and can not be clicked

What is the root cause of that problem?

When we press Confirm, we first set didConfirm then call onConfirm:

setDidConfirm(true);
onConfirm?.(selectedParticipants);

didConfirm disables the MenuItems for Category and Description:

At this moment, the location permission modal appears and we close the modal without explicitly deny or grant the permission, at this step, we simply close the modal but didConfirm state set above is still true:

const closeModal = () => {
setShowModal(false);
resetPermissionFlow();
};

resetPermissionFlow={() => setStartLocationPermissionFlow(false)}

So the root cause is that when we close the permision modal, we simply close it without reseting the states inside MoneyRequestConfirmationList states including didConfirm which disabled the IOU's menu items previously.

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

Introduce an effect inside MoneyRequestConfirmationList which reset didConfirm to false when we startLocationPermissionFlow changes from true to false. Of course we need to pass startLocationPermissionFlow to MoneyRequestConfirmationList as well.

useEffect(() => {
   setDidConfirm(!startLocationPermissionFlow);
), [startLocationPermissionFlow]);

Optionally, we can reset other states that we already changed in onConfirm before like formError or didConfirmSplit:

setDidConfirmSplit(true);

setFormError('common.error.invalidAmount');

@flodnv
Copy link
Contributor

flodnv commented Sep 10, 2024

Optionally, we can reset other states that we already changed in onConfirm before like formError or didConfirmSplit:

Let's do that yes

Can you identify the PR which caused this?

@flodnv flodnv assigned mkzie2 and unassigned mkzie2 Sep 10, 2024
@flodnv flodnv added the External Added to denote the issue can be worked on by a contributor label Sep 10, 2024
@melvin-bot melvin-bot bot changed the title Web - Scan-"Description" and "Category" fields are disabled after dismissing "Allow location" modal [$250] Web - Scan-"Description" and "Category" fields are disabled after dismissing "Allow location" modal Sep 10, 2024
Copy link

melvin-bot bot commented Sep 10, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 10, 2024
Copy link

melvin-bot bot commented Sep 10, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 10, 2024
Copy link

melvin-bot bot commented Sep 10, 2024

📣 @akinwale 🎉 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 Sep 10, 2024

📣 @mkzie2 You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@mkzie2
Copy link
Contributor

mkzie2 commented Sep 10, 2024

@flodnv The one mentioned in OP: #48620

@mkzie2
Copy link
Contributor

mkzie2 commented Sep 10, 2024

Am I assigned to this job?

@Krishna2323
Copy link
Contributor

Krishna2323 commented Sep 10, 2024

@flodnv, this is also a regression from the same PR, can I fix both of then in a single PR?

EDIT: I have an emergency and need to go out for 1-2 hours. I'll complete the checklist right after I get back to my workplace.

@flodnv
Copy link
Contributor

flodnv commented Sep 10, 2024

Sure, thanks @Krishna2323

@flodnv flodnv assigned Krishna2323 and unassigned akinwale and mkzie2 Sep 10, 2024
Copy link

melvin-bot bot commented Sep 10, 2024

📣 @Krishna2323 🎉 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 📖

@flodnv flodnv assigned ikevin127 and unassigned greg-schroeder Sep 10, 2024
Copy link

melvin-bot bot commented Sep 10, 2024

📣 @ikevin127 🎉 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 📖

@flodnv
Copy link
Contributor

flodnv commented Sep 10, 2024

Huh? @greg-schroeder I think we need to undo these offers as they are to resolve deploy blockers which were just introduced.

@Julesssss
Copy link
Contributor

Thanks @Krishna2323, please feel free to request a review from me.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels Sep 10, 2024
@luacmartins luacmartins removed the DeployBlockerCash This issue or pull request should block deployment label Sep 10, 2024
@luacmartins
Copy link
Contributor

This is fixed on staging. This is a regression so closing since no payment is due

@luacmartins luacmartins self-assigned this Sep 10, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Sep 11, 2024
@melvin-bot melvin-bot bot changed the title [$250] Web - Scan-"Description" and "Category" fields are disabled after dismissing "Allow location" modal [HOLD for payment 2024-09-18] [$250] Web - Scan-"Description" and "Category" fields are disabled after dismissing "Allow location" modal Sep 11, 2024
Copy link

melvin-bot bot commented Sep 11, 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 Sep 11, 2024
Copy link

melvin-bot bot commented Sep 11, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.31-26 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-09-18. 🎊

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

Copy link

melvin-bot bot commented Sep 11, 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:

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

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

No branches or pull requests

9 participants