-
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
[$250] Migrate MoneyRequestConfirmationList to useOnyx #50532
Comments
Triggered auto assignment to @abekkala ( |
Job added to Upwork: https://www.upwork.com/jobs/~021844152421070937252 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.We are trying to migrate the MoneyRequestConfirmationList component from using the withOnyx HOC to the useOnyx hook. What is the root cause of that problem?The current implementation uses withOnyx, which is an older pattern for connecting components to Onyx data. What changes do you think we should make in order to solve the problem?In this file:
App/src/components/MoneyRequestConfirmationList.tsx Lines 978 to 983 in bfdd19b
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Migrate MoneyRequestConfirmationList to useOnyx What is the root cause of that problem?N/A What changes do you think we should make in order to solve the problem?Change from withOnyx here: App/src/components/MoneyRequestConfirmationList.tsx Lines 978 to 1008 in bfdd19b
to useOnyx: const [policyCategoriesReal] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID || '-1'}`);
const [policyCategoriesDraft] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES_DRAFT}${policyID || '-1'}`);
const [policyTags] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_TAGS}${policyID || '-1'}`);
const [defaultMileageRate] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID || '-1'}`, {
selector: DistanceRequestUtils.getDefaultMileageRate,
});
const [mileageRatesReal] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID || '-1'}`, {
selector: (policy: OnyxEntry<OnyxTypes.Policy>) => DistanceRequestUtils.getMileageRates(policy),
});
const [policyReal] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID || '-1'}`);
const [policyDraft] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_DRAFTS}${policyID || '-1'}`);
const [lastSelectedDistanceRates] = useOnyx(ONYXKEYS.NVP_LAST_SELECTED_DISTANCE_RATES);
const [currencyList] = useOnyx(ONYXKEYS.CURRENCY_LIST); And remove the
App/src/components/MoneyRequestConfirmationList.tsx Lines 53 to 57 in bfdd19b
And the parameters from the function App/src/components/MoneyRequestConfirmationList.tsx Lines 1038 to 1039 in bfdd19b
What alternative solutions did you explore? (Optional) |
Triggered auto assignment to @anmurali ( |
@anmurali I'll be ooo until Mon Oct 21; then I can take this back. STATUS: proposals have been posted, waiting on one to be chosen |
@abekkala, @anmurali, @neil-marcellini, @shubham1206agra Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
I like @NJ-2020's proposal best so far since it's sufficiently detailed while the one before it was not quite detailed enough. Hiring! @shubham1206agra please try to review proposals more promptly next time or re-assign. |
📣 @shubham1206agra 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @NJ-2020 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR ready cc: @shubham1206agra |
I'm back from ooo - unassinging @anmurali |
PR not yet deployed Fix: @NJ-2020 |
This issue has not been updated in over 15 days. @abekkala, @neil-marcellini, @shubham1206agra, @NJ-2020 eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
looks like this one had a regression |
This is not merged yet. |
Somehow this was migrated elsewhere, so our work here is done. I don't think any payment is warranted unfortunately, but please feel free to explain if you disagree. |
Ah I see. Thanks for letting me know. Re-opening to handle payment. |
@neil-marcellini Maybe I was confused by the PR (or most likely looking at the wrong PR) There are several PRs linked into this issue. This PR: Migrate MoneyRequestConfirmationList to useOnyx #50848 was Closed and never merged. are you saying that the following payments should still be sent? Fix: @NJ-2020 [$250] |
@abekkala Yes |
PAYMENT SUMMARY: Fix: @NJ-2020 [$250] Offer |
@NJ-2020 payment sent and contract ended - thank you! 🎉 |
@abekkala Offer accepted |
@shubham1206agra payment sent and contract ended - thank you! 🎉 |
Problem
In this PR I made some changes to MoneyRequestConfirmationList, which trigged the ESLint changed files check to error saying that we need to migrate withOnyx to useOnyx
Solution migrate to useOnyx
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @abekkalaThe text was updated successfully, but these errors were encountered: