Skip to content

[HOLD for payment 2024-03-04] [$250] Remove MoneyRequestCategoryPage.js and copy any changes since Nov 27 into IOURequestStepCategory.js #34606

Closed

Description

@tgolen

This is a part of #29107. You can look at that issue for more context behind the cleanup process.

Problem

The app has two redundant components:

Old Component: MoneyRequestCategoryPage
New Component IOURequestStepCategory

Solution

Following the examples (example 1, example 2), the Old Component needs to be completely removed from the codebase

  1. Look at the history of the Old Component
  2. If there are any changes since Nov 27, 2023 which have not been added to the New Component, copy those changes
  3. Replace all uses of the Old Component with the New Component
  4. Remove all traces of Old Component
  5. Be sure to update all routes and navigation to use the new :action param (instead of being hard-coded with "create")
  6. Update any logic like isEditing to use the new action param from the route
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01aa1b22b861ac0e42
  • Upwork Job ID: 1747632761920925696
  • Last Price Increase: 2024-01-24
  • Automatic offers:
    • DylanDylann | Contributor | 28129737
    • dukenv0307 | Contributor | 28130978

Activity

  1. added
    Help WantedApply this label when an issue is open to proposals by contributors
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 16, 2024
  2. melvin-bot commented on Jan 16, 2024

    @melvin-bot

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

  3. neonbhai commented on Jan 16, 2024

    @neonbhai
    Contributor

    would love to work on this!

  4. tgolen commented on Jan 16, 2024

    @tgolen
    ContributorAuthor

    Please add a proposal for the changes that are necessary (I know I gave a brief overview, but your proposal should cover more details as I copy/pasted that into at least a dozen issues).

  5. neonbhai commented on Jan 16, 2024

    @neonbhai
    Contributor

    Proposal

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

    Remove MoneyRequestCategoryPage.js and copy any changes since Nov 27 into IOURequestStepCategory.js

    What is the root cause of that problem?

    Clean Up
 of MoneyRequestCategoryPage

    What changes do you think we should make in order

    We will be deleting the component here:

    function MoneyRequestCategoryPage({route, report, iou}) {
    const styles = useThemeStyles();
    const {translate} = useLocalize();
    const reportID = lodashGet(route, 'params.reportID', '');

    This file will be removed. Checking history (link), it seems like useTheme import was updated, which seems correct in IOURequestStepCategory.js.

    We will remove the screen from ModalStackNavigators.tsx

    [SCREENS.MONEY_REQUEST.CATEGORY]: () => require('../../../pages/iou/MoneyRequestCategoryPage').default as React.ComponentType,

    

We will make sure the IOURequestStepCategory component works correctly.

  6. lindseydortch commented on Jan 16, 2024

    @lindseydortch

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

    We want to remove the MoneyRequestCategoryPage and make sure any changes after November 27 have been included into these new components.

    What is the root cause of that problem?

    This is a part of the Wave 5 cleanup effort, so the goal is to refactor the navigation among screens.

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

    1. A new component IOURequestStepCategory has been created and history has been checked against MoneyRequestCategoryPage.
    2. There is only one change since November 27 which moved the location of the useThemeStyles import was changed to Line 10 instead of 13, so no changes need to be copied into the IOURequestStepCategory because it is already ikn there.
      import useThemeStyles from '@hooks/useThemeStyles';

      3 and 4. The only instance where this component is called and needs to be replaced with new component is
      [SCREENS.MONEY_REQUEST.CATEGORY]: () => require('../../../pages/iou/MoneyRequestCategoryPage').default as React.ComponentType,
    3. The route will then need to be updated in (if applicable)
      route: ':action/:iouType/scan/:transactionID/:reportID',
    4. I didn't see any updating logic in this file, so we should be able to skip this step here

    What alternative solutions did you explore? (Optional)

    N/A

  7. njmulsqb commented on Jan 17, 2024

    @njmulsqb

    I would love to take this!

  8. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jan 17, 2024
  9. changed the title [-]Remove MoneyRequestCategoryPage.js and copy any changes since Nov 27 into IOURequestStepCategory.js[/-] [+][$500] Remove MoneyRequestCategoryPage.js and copy any changes since Nov 27 into IOURequestStepCategory.js[/+] on Jan 17, 2024
  10. melvin-bot commented on Jan 17, 2024

    @melvin-bot
  11. 38 remaining items

  12. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 16, 2024
  13. melvin-bot commented on Feb 16, 2024

    @melvin-bot

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

  14. anmurali commented on Feb 16, 2024

    @anmurali

    Rotating for backup during my OOO till Feb 29th

  15. self-assigned this
    on Feb 16, 2024
  16. stephanieelliott commented on Feb 19, 2024

    @stephanieelliott
    Contributor

    PR is being actively reviewed

  17. stephanieelliott commented on Feb 27, 2024

    @stephanieelliott
    Contributor

    PR was deployed to staging a few hours ago!

  18. melvin-bot commented on Feb 28, 2024

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  19. stephanieelliott commented on Mar 5, 2024

    @stephanieelliott
    Contributor

    This was deployed to prod on 2/28, seems the automation didn't work so am updating manually

  20. changed the title [-][$250] Remove MoneyRequestCategoryPage.js and copy any changes since Nov 27 into IOURequestStepCategory.js[/-] [+][HOLD for payment 2024-03-04] [$250] Remove MoneyRequestCategoryPage.js and copy any changes since Nov 27 into IOURequestStepCategory.js[/+] on Mar 5, 2024
  21. stephanieelliott commented on Mar 6, 2024

    @stephanieelliott
    Contributor

    Summarizing payment on this issue:

    Upwork job is here: https://www.upwork.com/jobs/~01aa1b22b861ac0e42

  22. melvin-bot commented on Mar 11, 2024

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions