Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.36k stars 2.79k forks source link

[HOLD for payment 2024-08-07] [$250] Taxes - App blinks after saving tax code #45684

Closed lanitochka17 closed 1 month ago

lanitochka17 commented 2 months ago

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: 9.0.9-1 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team

Action Performed:

Precondition:

Expected Result:

App will not blink after saving tax code

Actual Result:

App blinks after saving tax code

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/4f4bfd53-b32e-49af-90fa-29f932f62bfb

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c99af8616c4c904d
  • Upwork Job ID: 1813973597069496991
  • Last Price Increase: 2024-07-18
  • Automatic offers:
    • dominictb | Contributor | 103179553
Issue OwnerCurrent Issue Owner: @puneetlath
melvin-bot[bot] commented 2 months ago

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

github-actions[bot] commented 2 months ago

:wave: 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.
carlosmiceli commented 2 months ago

The blinking doesn't happen only when you edit a tax code, but also when you click on a tax to edit it. However, it's such an imperceptible/small issue that I wouldn't call this a blocker.

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @puneetlath (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.

dominictb commented 2 months ago

Proposal

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

App blinks after saving tax code

What is the root cause of that problem?

We use dismiss modal here to clear the page with outdated tax code before navigating here

However dismissModal is not suitable for this purpose because it will clear the modal entirely and when navigating it creates a new modal. The ideal UX here is to clear the page with outdated tax code only and retain the modal, when we navigate we use that same modal.

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

Replace https://github.com/Expensify/App/blob/6e7852d1d00cfaf41919c732552208ab1192a6b9/src/pages/workspace/taxes/WorkspaceTaxCodePage.tsx#L44 by

Navigation.goBack();

[Small cleanup] While investigating I found that the variable canEditTaxCode here was named incorrectly, because the user can edit tax code only if it's control policy.

So it can be updated to be equal to PolicyUtils.isControlPolicy(policy) and then we negate the condition here

What alternative solutions did you explore? (Optional)

NA

fedirjh commented 2 months ago

@dominictb Thanks for the proposal. proposal looks good to me and works as expected.

πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed

melvin-bot[bot] commented 2 months ago

Current assignees @puneetlath and @carlosmiceli are eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

puneetlath commented 2 months ago

@carlosmiceli I'll let you take CME on this one.

melvin-bot[bot] commented 2 months ago

πŸ“£ @dominictb πŸŽ‰ 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 πŸ“–

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

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

If no regressions arise, payment will be issued on 2024-08-07. :confetti_ball:

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

melvin-bot[bot] commented 2 months ago

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:

puneetlath commented 1 month ago

@dominictb has been paid.

@fedirjh bump on the checklist for you.

fedirjh commented 1 month ago

BugZero Checklist:

Regression Test Proposal

Precondition: Workspace is under Control plan

1. Go to staging.new.expensify.com
2. Go to Control workspace settings
3. Go to Taxes
4. Click on any tax
5. Click Tax code
6. Edit the tax code and Save it
7. Verify that: Tax code is saved and App will not blink after saving tax code 
puneetlath commented 1 month ago

Payment summary:

Thanks everyone!

garrettmknight commented 3 weeks ago

$250 approved for @fedirjh