Skip to content

[$250] Remove MoneyRequestDatePage.js and copy any changes since Nov 27 into IOURequestStepDate.js #34608

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: MoneyRequestDatePage
New Component IOURequestStepDate

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/~0155d041c50cef598e
  • Upwork Job ID: 1747632794805731328
  • Last Price Increase: 2024-01-24
  • Automatic offers:
    • DylanDylann | Contributor | 28130672
    • brunovjk | Contributor | 28132561

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 @muttmuure (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. Krishna2323 commented on Jan 16, 2024

    @Krishna2323
    Contributor

    Proposal

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

    Remove MoneyRequestDatePage.js and copy any changes since Nov 27 into IOURequestStepDate.js

    What is the root cause of that problem?

    Component update

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

    I checked all the commits after 27th Nov and the new component is updated according to the old component, we just need to remove the file and route created for it. I checked the commits thoroughly but will check again in the PR. There are total 7 commits after 27th Nov in the old component and most of them are about renaming constants and DatePicker component and imports.

    Component to remove:
    https://github.com/Expensify/App/blob/main/src/pages/iou/MoneyRequestDatePage.js

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

    We also need to remove all traces from src/libs/Navigation/types.ts & src/libs/Navigation/linkingConfig.ts

    [SCREENS.MONEY_REQUEST.DATE]: ROUTES.MONEY_REQUEST_DATE.route,

    [SCREENS.MONEY_REQUEST.DATE]: {

    Note: The below 2 steps can be omitted because we only use IOURequestStepDate for IOU creation flow.

    Need to update to :action here:

    route: 'create/:iouType/date/:transactionID/:reportID',

    Need to pass the action here:

    Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_DATE.getRoute(iouType, transaction.transactionID, reportID, Navigation.getActiveRouteWithoutParams()));

    Result

  4. njmulsqb commented on Jan 17, 2024

    @njmulsqb

    I would love to take this!

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

    @melvin-bot
  8. melvin-bot commented on Jan 17, 2024

    @melvin-bot

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

  9. ishpaul777 commented on Jan 17, 2024

    @ishpaul777
    Contributor

    Would love to work on this

  10. 35 remaining items

  11. brunovjk commented on Feb 5, 2024

    @brunovjk
    Contributor

    @DylanDylann I'm working on it right now, but I'm having a problem with 'edit/split'. In your PRs ( #35641 and #35137) I saw that you 'hard coded' the 'ioutype' in MoneyRequestView.tsx:

    getRoute(
                                             CONST.IOU.ACTION.EDIT,
                                             CONST.IOU.TYPE.REQUEST,
    

    I thought that we needed to pass a dynamic iouType. Like we do it at MoneyTemporaryForRefactorRequestConfirmationList.

    /create/request/date/, /edit/request/date/ and /create/split/date/ works fine. I'm 100% into it now, as soon I get the /edit/split/date/ I will raise the PR.

  12. DylanDylann commented on Feb 5, 2024

    @DylanDylann
    Contributor

    As I know MoneyRequestView.tsx is only used for REQUEST flow, and isn't used in SPLIT_BILL flow. It is the reason why I hardcoded CONST.IOU.TYPE.REQUEST

  13. brunovjk commented on Feb 5, 2024

    @brunovjk
    Contributor

    Awesome! Thank you :D

  14. added
    ReviewingHas a PR in review
    and removed on Feb 5, 2024
  15. brunovjk commented on Feb 5, 2024

    @brunovjk
    Contributor

    @DylanDylann The PR is ready for review, but I found a bug, also reproduced on 'staging' that I believe needs to be resolved so that the 'date' flow is perfect, I didn't find a related issue. In PR I bring more information.

  16. DylanDylann commented on Feb 20, 2024

    @DylanDylann
    Contributor

    @muttmuure The PR was deployed to production 5 days ago. It seems the automation bot doesn't work on this issue. Please help to move forward this one

  17. brunovjk commented on Feb 21, 2024

    @brunovjk
    Contributor

    @muttmuure 👉👈

  18. muttmuure commented on Feb 27, 2024

    @muttmuure
    Contributor

    All paid up

  19. 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