App: [HOLD for payment 2024-02-19] [$250] Remove MoneyRequestDescriptionPage.js and copy any changes since Nov 27 into IOURequestStepDescription.js

This is a part of https://github.com/Expensify/App/issues/29107. You can look at that issue for more context behind the cleanup process.

Problem

The app has two redundant components:

Old Component: MoneyRequestDescriptionPage New Component IOURequestStepDescription

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/~019b522902265a76e3
  • Upwork Job ID: 1747632811433705472
  • Last Price Increase: 2024-01-24
  • Automatic offers:
    • s77rt | Reviewer | 28120097
    • DylanDylann | Contributor | 28120098

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 51 (36 by maintainers)

Most upvoted comments

@s77rt The PR is ready for review

Why would that be a problem? Can’t we use that same component for the split flow?

@s77rt I am not sure that Split flow is in the scope of this epic. Asking here

We are looking to have all the IOU description logic being update from one place. EditRequestDescriptionPage should also get replaced with IOURequestStepDescription.

@s77rt It is a new point to me because I haven’t seen it in the OP. So, we will use 1 component IOURequestStep... instead of EditRequest...Page and MoneyRequest...Page in all these IOU pages like Description, Distance, Merchant, Tag, Category, Date, … And using action params from URL to detect if it is create or edit page

So I think we should update the OP in these issue for more clear

cc @tgolen

@DylanDylann We are looking to have all the IOU description logic being update from one place. EditRequestDescriptionPage should also get replaced with IOURequestStepDescription.

Currently setMoneyRequestDescription_temporaryForRefactor will only update the transaction draft values but that should be the case only when creating a new request. If we are editing the request we should update transaction itself for that we need to add a new param isDraft.

Can you please look into that further and update your proposal?

PS: We should also copy recent changes (if any) from EditRequestDescriptionPage to IOURequestStepDescription