Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.36k stars 2.79k forks source link

[$75] Migrate withFullTransactionOrNotFound from withOnyx to useOnyx #49109

Open roryabraham opened 2 weeks ago

roryabraham commented 2 weeks ago

Coming from https://expensify.slack.com/archives/C01GTK53T8Q/p1725973460005309?thread_ts=1725905735.105989&cid=C01GTK53T8Q

Migrate src/pages/iou/request/step/withFullTransactionOrNotFound.tsx to use useOnyx instead of withOnyx.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021834284905584427771
  • Upwork Job ID: 1834284905584427771
  • Last Price Increase: 2024-09-12
  • Automatic offers:
    • mkhutornyi | Reviewer | 103949092
Issue OwnerCurrent Issue Owner: @mkhutornyi
melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

Upwork job price has been updated to $75

abhinaybathina commented 2 weeks ago

Proposal

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

Migrate from withOnyx HOC to useOnyx hook

What is the root cause of that problem?

withOnyx HOC is deprecated

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

Whatever props are coming from withOnyx HOC in withFullTransactionOrNotFound should be replaced with useOnyx hook

What alternative solutions did you explore? (Optional)

daledah commented 2 weeks ago

Proposal

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

Migrate withFullTransactionOrNotFound from withOnyx to useOnyx

What is the root cause of that problem?

Migration issue.

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

Move these logic inside the WithFullTransactionOrNotFound component and use useOnyx:

https://github.com/Expensify/App/blob/e740011fb3f39d5bf487683b6356942f3adb154b/src/pages/iou/request/step/withFullTransactionOrNotFound.tsx#L71-L81

melvin-bot[bot] commented 2 weeks ago

📣 @mkhutornyi 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job

melvin-bot[bot] commented 2 weeks ago

📣 @daledah You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing 📖

roryabraham commented 2 weeks ago

assigning to @daledah since @abhinaybathina is assigned to https://github.com/Expensify/App/issues/49110

daledah commented 1 week ago

@roryabraham PR is ready.

roryabraham commented 1 week ago

Awaiting review by @mkhutornyi