[C+ Checklist Needs Completion] [$75] Migrate withReportAndPrivateNotesOrNotFound from withOnyx to useOnyx
Coming from https://expensify.slack.com/archives/C01GTK53T8Q/p1725973460005309?thread_ts=1725905735.105989&cid=C01GTK53T8Q
Migrate src/pages/home/report/withReportAndPrivateNotesOrNotFound.tsx to use useOnyx instead of withOnyx.
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021834283616679002875
- Upwork Job ID: 1834283616679002875
- Last Price Increase: 2024-09-12
- Automatic offers:
- akinwale | Reviewer | 103949144
- nkdengineer | Contributor | 103949146
Issue Owner
Current Issue Owner: @akinwale
Triggered auto assignment to @greg-schroeder (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.
Job added to Upwork: https://www.upwork.com/jobs/~021834283616679002875
Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External)
Upwork job price has been updated to $100
Upwork job price has been updated to $75
Proposal
Please re-state the problem that we are trying to solve in this issue.
Migrate withReportAndPrivateNotesOrNotFound from withOnyx to useOnyx
What is the root cause of that problem?
This is a migration
What changes do you think we should make in order to solve the problem?
Remove the withOnyx here and use useOnyx. Also, remove the onyx-type props here
https://github.com/Expensify/App/blob/7748eff72fc43ecaf3db6159928d8d581a63ab99/src/pages/home/report/withReportAndPrivateNotesOrNotFound.tsx#L94
What alternative solutions did you explore? (Optional)
NA
resilienta Your proposal will be dismissed because you did not follow the proposal template.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Migrate withReportAndPrivateNotesOrNotFound from withOnyx to useOnyx
What is the root cause of that problem?
Feature request
What changes do you think we should make in order to solve the problem?
remove withOnyx from here
https://github.com/Expensify/App/blob/7748eff72fc43ecaf3db6159928d8d581a63ab99/src/pages/home/report/withReportAndPrivateNotesOrNotFound.tsx#L93-L100
And also we need to add
const [session] = useOnyx(ONYXKEYS.SESSION);
We should also remove session from here https://github.com/Expensify/App/blob/7748eff72fc43ecaf3db6159928d8d581a63ab99/src/pages/home/report/withReportAndPrivateNotesOrNotFound.tsx#L36 Optional: we can also remove type props.
What alternative solutions did you explore? (Optional)
Edited by proposal-police: This proposal was edited at 2024-09-12 17:40:14 UTC.
[## Proposal
Please re-state the problem that we are trying to solve in this issue.
Migration of withOnyx to useOnyx
What is the root cause of that problem?
Migration
What changes do you think we should make in order to solve the problem?
Remove these lines and remove prop types for the same -
https://github.com/Expensify/App/blob/7748eff72fc43ecaf3db6159928d8d581a63ab99/src/pages/home/report/withReportOrNotFound.tsx#L107-L123
We shall convert it to useOnyx hook.
const [isLoadingReportData] = useOnyx(ONYXKEYS.IS_LOADING_REPORT_DATA)
and same for other keys as well
What alternative solutions did you explore? (Optional)
NA
📣 @akinwale 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
PR in review
@akinwale is next up!
@roryabraham has final review here then should be good to merge it appears
Left a review. This might need to HOLD on withReportOrNotFound
Okay, thanks Rory! I'll keep my eye out and adjust if needed
PR is still under review
going on parental leave, need to reassign. @youssef-lr I'm choosing you at random, hope you don't mind ❤️
PR is still under review
Looks like @youssef-lr is next up to complete the final requested review on the PR
Review in progress
This is on staging. Awaiting deploy to prod
Reviewing label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.53-1 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/49238
If no regressions arise, payment will be issued on 2024-11-01. :confetti_ball:
For reference, here are some details about the assignees on this issue:
- @akinwale requires payment automatic offer (Reviewer)
- @nkdengineer requires payment automatic offer (Contributor)
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
- [ ] [@akinwale] The PR that introduced the bug has been identified. Link to the PR:
- [ ] [@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
- [ ] [@akinwale] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
- [ ] [@akinwale] Determine if we should create a regression test for this bug.
- [ ] [@akinwale] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
- [ ] [@greg-schroeder] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Could you complete the checklist @akinwale? Thanks!
- [x] [@akinwale] The PR that introduced the bug has been identified. Link to the PR:
- [x] [@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
- [x] [@akinwale] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
Not a regression. This is a migration.
- [x] [@akinwale] Determine if we should create a regression test for this bug.
- [x] [@akinwale] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Regression Test Steps
- Launch Expensify
- Create a workspace
- Navigate to the workspace chat
- Click on the chat header and select Details > Private notes
- Attempt to edit the private notes
- Verify that editing and saving private notes works properly.
Do we agree 👍 or 👎?