-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PAY 29/04] [$250] Remove deprecated ReportActionUtils.getAllReportActions()
method
#39091
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01944da5c2a9fee46a |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws ( |
Triggered auto assignment to @bfitzexpensify ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Remove deprecated What is the root cause of that problem?We have Line 86 in 9dbec73
here. : App/src/libs/WorkspacesSettingsUtils.ts Line 60 in 9dbec73
and App/src/libs/WorkspacesSettingsUtils.ts Lines 69 to 72 in 9dbec73
and Lines 4556 to 4566 in 9dbec73
and here : Lines 4259 to 4265 in 9dbec73
What changes do you think we should make in order to solve the problem?we need to remove it Add a test here to verify that we do not export
What alternative solutions did you explore? (Optional)N/A |
Updated Proposal |
Proposed Solution:
|
📣 @EzraEllette! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
ProposalPlease re-state the problem that we are trying to solve in this issue.Remove deprecated What is the root cause of that problem?We need to get away with What changes do you think we should make in order to solve the problem?
So for the App/src/libs/actions/ReportActions.ts Line 81 in e542ba7
This would be changed to: const childActions: OnyxCollection<ReportActions> = {};
Onyx.connect({
key: ONYXKEYS.COLLECTION.REPORT_ACTIONS,
callback: (actions, key) => {
if (!key || !actions) {
return;
}
const reportID = CollectionUtils.extractCollectionItemID(key);
childActions[reportID] = actions;
},
}); Similar changes would be applied at all other places and then finally remove: App/src/libs/ReportActionsUtils.ts Lines 772 to 774 in e542ba7
What alternative solutions did you explore? (Optional)N/A |
Updated Proposal with test step as well |
@godofoutcasts94 was first here so I think it's fair he gets this one. |
Current assignee @tgolen is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
📣 @Ollyws 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @godofoutcasts94 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@godofoutcasts94 Are you able to get a PR started for this? |
@tgolen If there is a deadline you need to meet, I can deliver a PR by EOD. |
Yes definitely today I will do it, I will start a draft PR. Actually, I was out somewhere I will start today itself or latest by tomorrow morning @tgolen |
📣 @EzraEllette You have been assigned to this job! |
A PR can be expected once I finish testing on all platforms and and double check that my contribution meets the guidelines (Midday CST). |
@tgolen @Ollyws @bfitzexpensify @EzraEllette this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
Quick update: I'm having a tough time getting the android build running, even after following the steps and doing some googling. I just need to test the android functionality before I create the PR. |
Any chance we could bump the compensation on this one? It was a bit more work than expected. Thanks! |
I'm OK bumping it up to $250. Thanks for asking |
ReportActionUtils.getAllReportActions()
methodReportActionUtils.getAllReportActions()
method
Upwork job price has been updated to $250 |
Thanks! |
Can someone trigger the bot to send me an offer on upwork? |
Is the offer up here still valid? #39091 (comment) |
I already applied to that job. I wonder if it is still assigned to godofoutcasts? |
@bfitzexpensify Could you help us out here, please? |
I've hired you on Upwork @EzraEllette. Looks like the PR was deployed to prod two days ago. Updating this to daily and updating the title to reflect the payout date. |
ReportActionUtils.getAllReportActions()
methodReportActionUtils.getAllReportActions()
method
All done here. |
@bfitzexpensify Also C+ payment due for me, thanks. |
This is coming from #27262. You can read the issue description there to get the context behind the problem being solved and the mess being cleaned up.
Problem
ReportActionUtils.getAllReportActions()
is called from several view components and other action files which is an anti-pattern.Why this is important to fix
It maintains a more pure and exact flow of data through the react application. If the view is using report action data, then it needs to subscribe to the data in Onyx so that it's guaranteed that the data will never be stale or out-of-date.
Solution
withOnyx()
to load the data in view componentsOnyx.connect()
to load the data in other action filesReportUtils.getAllReportActions()
or at least prevent it from being exported by adding a test to https://github.com/Expensify/App/blob/main/tests/actions/EnforceActionExportRestrictions.tsUpwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @bfitzexpensifyThe text was updated successfully, but these errors were encountered: