Skip to content

[HOLD for payment 2024-04-15] [$250] Remove MoneyRequestConfirmPage.js and copy any changes since Nov 27 into IOURequestStepConfirmation.js #34615

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: MoneyRequestConfirmPage
New Component IOURequestStepConfirmation

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/~01d384157eb0d34e8a
  • Upwork Job ID: 1747632941224689664
  • Last Price Increase: 2024-01-17
  • Automatic offers:
    • DylanDylann | Contributor | 28109099

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

  3. lancer-spaid commented on Jan 16, 2024

    @lancer-spaid

    Proposal

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

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

    What is the root cause of that problem?

    Cleaning of MoneyRequestConfirmPage

    What changes do you think we should make in order

    The component here will be deleted.



    Remove this line from ModalStackNavigation.js:



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

    

History page here has a few changes. Most of these are with the violations feature. We will take a look at the specific logic changes and add the changes to IOURequestStepConfirmation

  4. njmulsqb commented on Jan 17, 2024

    @njmulsqb

    I would love to take this!

  5. DylanDylann commented on Jan 17, 2024

    @DylanDylann
    Contributor

    Proposal

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

    Remove MoneyRequestConfirmPage.js and copy any changes since Nov 27 into IOURequestStepConfirmation.js

    What is the root cause of that problem?

    Remove deprecated component

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

    1. Remove MoneyRequestConfirmPage component and all traces like

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

    [SCREENS.MONEY_REQUEST.CONFIRMATION]: ROUTES.MONEY_REQUEST_CONFIRMATION.route,

    App/src/ROUTES.ts

    Lines 261 to 264 in a2f5bd5

    MONEY_REQUEST_CONFIRMATION: {
    route: ':iouType/new/confirmation/:reportID?',
    getRoute: (iouType: string, reportID = '') => `${iouType}/new/confirmation/${reportID}` as const,
    },

    CONFIRMATION: 'Money_Request_Confirmation',

    [SCREENS.MONEY_REQUEST.CONFIRMATION]: {
    iouType: string;
    reportID: string;
    };

    1. For new component IOURequestStepConfirmation

    In here

    App/src/ROUTES.ts

    Lines 308 to 311 in a2f5bd5

    MONEY_REQUEST_STEP_CONFIRMATION: {
    route: 'create/:iouType/confirmation/:transactionID/:reportID',
    getRoute: (iouType: ValueOf<typeof CONST.IOU.TYPE>, transactionID: string, reportID: string) => `create/${iouType}/confirmation/${transactionID}/${reportID}` as const,
    },

    We need to use the new :action param (instead of being hard-coded with "create") like we did here

    App/src/ROUTES.ts

    Lines 362 to 366 in a2f5bd5

    MONEY_REQUEST_STEP_SCAN: {
    route: ':action/:iouType/scan/:transactionID/:reportID',
    getRoute: (action: ValueOf<typeof CONST.IOU.ACTION>, iouType: ValueOf<typeof CONST.IOU.TYPE>, transactionID: string, reportID: string, backTo = '') =>
    getUrlWithBackToParam(`${action}/${iouType}/scan/${transactionID}/${reportID}`, backTo),
    },

    1. Copy changes since 27 Nov to new components based on list commit here: https://github.com/Expensify/App/commits/main/src/pages/iou/IOURequestStepConfirmation.js

    What alternative solutions did you explore? (Optional)

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jan 17, 2024
  7. melvin-bot commented on Jan 17, 2024

    @melvin-bot
  8. changed the title [-]Remove MoneyRequestConfirmPage.js and copy any changes since Nov 27 into IOURequestStepConfirmation.js[/-] [+][$500] Remove MoneyRequestConfirmPage.js and copy any changes since Nov 27 into IOURequestStepConfirmation.js[/+] on Jan 17, 2024
  9. melvin-bot commented on Jan 17, 2024

    @melvin-bot

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

  10. 63 remaining items

  11. changed the title [-][$250] Remove MoneyRequestConfirmPage.js and copy any changes since Nov 27 into IOURequestStepConfirmation.js[/-] [+][HOLD for payment 2024-04-15] [$250] Remove MoneyRequestConfirmPage.js and copy any changes since Nov 27 into IOURequestStepConfirmation.js[/+] on Apr 8, 2024
  12. melvin-bot commented on Apr 8, 2024

    @melvin-bot

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

  13. melvin-bot commented on Apr 8, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 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-04-15. 🎊

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

  14. melvin-bot commented on Apr 8, 2024

    @melvin-bot
  15. parasharrajat commented on Apr 9, 2024

    @parasharrajat
    Member

    This is not a bug but a code refactor. Bug-zero checklist does not apply. cc: @adelekennedy

  16. adelekennedy commented on Apr 9, 2024

    @adelekennedy
    Contributor

    No checklist - payment is due on 4/15

  17. adelekennedy commented on Apr 15, 2024

    @adelekennedy
    Contributor

    Payouts due:

  18. parasharrajat commented on May 20, 2024

    @parasharrajat
    Member

    Payment requested as per #34615 (comment)

  19. JmillsExpensify commented on May 31, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @parasharrajat

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions