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] [$250] Categorizing - RHP closes instead of returning to category list after deleting a category #43616

Closed
6 tasks done
lanitochka17 opened this issue Jun 12, 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. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jun 12, 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: 1.4.82-1
Reproducible in staging?: Y
Reproducible in production?: Y
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:

  • Workspace has disabled all the categories
  1. Go to staging.new.expensify.com
  2. Go to FAB > Track expense > Manual
  3. Track a manual expense
  4. Click Categorize it from the actionable whisper
  5. Select the workspace that has disabled all the categories
  6. Click Edit categories
  7. Click on any category
  8. Click Delete
  9. Delete the category

Expected Result:

RHP will return to category list after deleting a category

Actual Result:

RHP closes

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

Add any screenshot/video evidence

Bug6511282_1718221899351.20240613_034743.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0138b0b86909b7d865
  • Upwork Job ID: 1802749240400742682
  • Last Price Increase: 2024-06-24
  • Automatic offers:
    • Krishna2323 | Contributor | 102863915
Issue OwnerCurrent Issue Owner: @Krishna2323
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 12, 2024
Copy link

melvin-bot bot commented Jun 12, 2024

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

@Krishna2323
Copy link
Contributor

Krishna2323 commented Jun 12, 2024

Proposal

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

Categorizing - RHP closes instead of returning to category list after deleting a category

What is the root cause of that problem?

We dismiss the modal when the deletion is confirmed.

const deleteCategory = () => {
Category.deleteWorkspaceCategories(route.params.policyID, [route.params.categoryName]);
setDeleteCategoryConfirmModalVisible(false);
Navigation.dismissModal();
};

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

We can either apply the same logic used in the HeaderWithBackButton onBackButtonPress callback or can simply call Navigation.goBack() instead of Navigation.dismissModal();.

onBackButtonPress={() => (backTo ? Navigation.goBack(ROUTES.SETTINGS_CATEGORIES_ROOT.getRoute(route.params.policyID, backTo)) : Navigation.goBack())}

What alternative solutions did you explore? (Optional)

We can check for backTo and if not present call Navigation.dismissModal();.

    const deleteCategory = () => {
        Category.deleteWorkspaceCategories(route.params.policyID, [route.params.categoryName]);
        setDeleteCategoryConfirmModalVisible(false);
        if (backTo) {
            Navigation.goBack(ROUTES.SETTINGS_CATEGORIES_ROOT.getRoute(route.params.policyID, backTo));
            return;
        }
        Navigation.dismissModal();
    };

Result

category_modal_closed.mp4

@cretadn22
Copy link
Contributor

Proposal

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

Categorizing - RHP closes instead of returning to category list after deleting a category

What is the root cause of that problem?

const deleteCategory = () => {
Category.deleteWorkspaceCategories(route.params.policyID, [route.params.categoryName]);
setDeleteCategoryConfirmModalVisible(false);
Navigation.dismissModal();

We always dismiss modal after deleting the category

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

We ought to avoid employing the dismissModal function for pages that could serve as both the central pane and the right-hand pane. Instead, we should devise a function specifically for managing the goBack action for the CategorySettingsPage.

const goBack = () => {
        if (backTo) {
            Navigation.goBack(ROUTES.SETTINGS_CATEGORIES_ROOT.getRoute(route.params.policyID, backTo))
            return
        }   
        Navigation.goBack()
}

And utilizing this function in these places

onBackButtonPress={() => (backTo ? Navigation.goBack(ROUTES.SETTINGS_CATEGORIES_ROOT.getRoute(route.params.policyID, backTo)) : Navigation.goBack())}

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Jun 17, 2024
@garrettmknight garrettmknight added the External Added to denote the issue can be worked on by a contributor label Jun 17, 2024
Copy link

melvin-bot bot commented Jun 17, 2024

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

@melvin-bot melvin-bot bot changed the title Categorizing - RHP closes instead of returning to category list after deleting a category [$250] Categorizing - RHP closes instead of returning to category list after deleting a category Jun 17, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 17, 2024
Copy link

melvin-bot bot commented Jun 17, 2024

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

Copy link

melvin-bot bot commented Jun 20, 2024

@garrettmknight, @allroundexperts Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Jun 20, 2024
@melvin-bot melvin-bot bot removed the Overdue label Jun 20, 2024
@garrettmknight garrettmknight added Overdue External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels Jun 20, 2024
Copy link

melvin-bot bot commented Jun 20, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Jun 20, 2024
@garrettmknight
Copy link
Contributor

Reassigning C+ since Sibtain is out - @eVoloshchak can you take a look at this one?

Copy link

melvin-bot bot commented Jun 24, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Jun 24, 2024
@garrettmknight
Copy link
Contributor

@eVoloshchak bump when you get a chance. Thanks!

Copy link

melvin-bot bot commented Jun 25, 2024

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

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

melvin-bot bot commented Jun 25, 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 📖

@Krishna2323
Copy link
Contributor

@allroundexperts, PR ready for review ^

@Krishna2323
Copy link
Contributor

@allroundexperts friendly bump for a review.

@allroundexperts
Copy link
Contributor

@garrettmknight Can you please assign this issue (and the PR) to me? It slipped from my K2 because of this.

@francoisl
Copy link
Contributor

Assigned you @allroundexperts. Will you review the PR too?

@allroundexperts
Copy link
Contributor

Yes, please assign the PR to me as well.

@Krishna2323
Copy link
Contributor

@garrettmknight, PR was deployed to production on 16 July, this is ready for payments.

@allroundexperts
Copy link
Contributor

Checklist

  1. feat: Delete single category #38379
  2. https://github.com/Expensify/App/pull/38379/files#r1694783270
  3. N/A
  4. A regression test would be good.

Regression Test

Pre-req: Workspace has disabled all the categories

  1. Open the app and Go to FAB -> Track expense -> Manual
  2. Track a manual expense
  3. Click Categorize it from the actionable whisper
  4. Select the workspace that has disabled all the categories
  5. Click Edit categories and click on any category
  6. Click Delete and delete the category

Verify that the RHP will return to category list after deleting a category

Do we 👍 or 👎 ?

@Krishna2323
Copy link
Contributor

@garrettmknight, friendly bump for payments.

@Krishna2323
Copy link
Contributor

@garrettmknight, friendly bump for payments. @allroundexperts can you pls bump this on slack? thanks

@garrettmknight
Copy link
Contributor

@Krishna2323 sorry about this one, on it now!

@garrettmknight
Copy link
Contributor

Payment Summary:

@garrettmknight garrettmknight added the Awaiting Payment Auto-added when associated PR is deployed to production label Aug 9, 2024
@garrettmknight garrettmknight changed the title [$250] Categorizing - RHP closes instead of returning to category list after deleting a category [HOLD FOR PAYMENT] [$250] Categorizing - RHP closes instead of returning to category list after deleting a category Aug 9, 2024
@garrettmknight
Copy link
Contributor

Leaving weekly for payment request @allroundexperts

@allroundexperts
Copy link
Contributor

@garrettmknight I have noted this down for payment. Feel free to close the issue.

@github-project-automation github-project-automation bot moved this from Release 1: Spring 2024 (May) to Done in [#whatsnext] #wave-collect Aug 13, 2024
@JmillsExpensify
Copy link

$250 approved for @allroundexperts

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. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
No open projects
Status: Done
Development

No branches or pull requests

8 participants