Closed luacmartins closed 1 year ago
Triggered auto assignment to @adelekennedy (External
), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
@luacmartins is this something contributors can work on? Double checking before I open an Upwork job
Yes! The Form refactor project is all open to contributors :)
This issue is being put on hold due to push to page discussions, as per this comment.
Ty ty!
on hold
on hold
on hold
@adelekennedy removing hold! We can post this job on upwork and get contributors to start working on it!
let's gooooo
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (Exported
)
Triggered auto assignment to @sketchydroide (Exported
), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Here are my finding to fix this -
Checked the wrapper component ReimbursementAccountForm.js in CompanyStep.js and so the target will be replacing the ReimbursementAccountForm.js with Form.js.
Iβll be bringing all the existing logic from ReimbursementAccountForm into its parent component CompanyStep.js.
No longer require to have ReimbursementAccountForm dependency and so remove it from CompanyStep.js
Validate callback prop from Form.js to validate.
Next, refactor some inputs props (onChangeText, value, errorTextβ¦) and add prop inputID to work with Form.js
@ravindra-encoresky Thanks for the proposal but it is incomplete. The CompanyStep
is a part of the step navigation, are you sure it is working fine with your changes? Also can you check the guidelines mentioned in the GH body.
Still open for better proposals.
Looks like something related to react-navigation
may have been mentioned in this issue discussion.
As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js
files should not be accepted.
Feel free to drop a note in #expensify-open-source with any questions.
@ravindra-encoresky Thanks for the proposal but it is incomplete. The
CompanyStep
is a part of the step navigation, are you sure it is working fine with your changes? Also can you check the guidelines mentioned in the GH body.Still open for better proposals.
Okay, thanks.
Will submit another soon.
CompanyStep.js is using ReimbursementAccountForm.js as the wrapper for form components. and ReimbursementAccountForm is used by many other files. So first step is to remove the dependency on ReimbursementAccountForm. Because if we refactor ReimbursementAccountForm then we need to refactor other files also. https://github.com/Expensify/App/blob/85a313891bcc4e247e947026febcd9b525d3406a/src/pages/ReimbursementAccount/CompanyStep.js#L203-L211
Next, we use Form.js in place of FormScrollView.js
Create the Company step form id in ONYXKEYS.js and pass it to the form component in CompanyStep.js https://github.com/Expensify/App/blob/85a313891bcc4e247e947026febcd9b525d3406a/src/ONYXKEYS.js#L183-L185
Remove FormAlertWithSubmitButton and pass submit function to Form. https://github.com/Expensify/App/blob/85a313891bcc4e247e947026febcd9b525d3406a/src/pages/ReimbursementAccount/ReimbursementAccountForm.js#L54-L64
Pass inputID
to each form component and remove onChangeText, value, errorText props. Form.js will manage them
Update validate function to use values from the Form component and return errors
Remove state variables for inputs, They are not required now.
Cleanup code
@mananjadhav friendly bump (also removing Orvedue :) )
@ravindra-encoresky I see that you've followed guidelines in the updated proposal. But it still has details missing on:
ReimbursementAccountForm
Can you describe how are you planning to remove it?1/5
and so on). I don't see that happening here. Please look at the Testing guidelines in the GH body as well.Thanks @sketchydroide for the bump. Sorry I missed this I thought it was the same proposal. Do you think it makes sense to double this one? Been open for 14 days now.
@ravindra-encoresky I see that you've followed guidelines in the updated proposal. But it still has details missing on:
- You've mentioned remove the dependency of
ReimbursementAccountForm
Can you describe how are you planning to remove it?- As I've mentioned earlier this step is a part of wizard steps movement (where we show steps
1/5
and so on). I don't see that happening here. Please look at the Testing guidelines in the GH body as well.Thanks @sketchydroide for the bump. Sorry I missed this I thought it was the same proposal. Do you think it makes sense to double this one? Been open for 14 days now.
@mananjadhav thanks for the replies, I conclude my proposal here -
Since ReimbursementAccountForm is a wrapper around form components in the companyStep and other wizard steps, it renders form components as children and a FormAlertWithSubmitButton inside FormScrollView.
Our idea is to replace ReimbursementAccountForm component with FormScrollView inside CompanyStep.js.
Then we will add FormAlertWithSubmitButton from ReimbursementAccountForm to CompanyStep.js and copy other error logic from ReimbursementAccountForm to CompanyStep as well.
Thanks for the update @ravindra-encoresky.
@sketchydroide @ravindra-encoresky's Proposal looks good to me. We'll have to ensure that we follow the Testing and Implementation Guidelines.
πΒ πΒ πΒ C+ reviewed
Thanks for the update @ravindra-encoresky.
@sketchydroide @ravindra-encoresky's Proposal looks good to me. We'll have to ensure that we follow the Testing and Implementation Guidelines.
πΒ πΒ πΒ C+ reviewed
Thanks, I'll follow the guidelines.
How shall I proceed, should I submit a proposal on upwork ? please guide me through.
thanks.
We wait for @sketchydroide to review it and give a π’ to your proposal. After that you can start with your PR and yeah meanwhile you can apply to Upwork. Please refer to these contributing guidelines as well before you start writing any code.
Hope this helps.
We wait for @sketchydroide to review it and give a π’ to your proposal. After that you can start with your PR and yeah meanwhile you can apply to Upwork. Please refer to these contributing guidelines as well before you start writing any code.
Hope this helps.
Hi guys, waiting for the review.
sorry, been really busy with the releases, reviewing now
looks good
π£ @ravindra-encoresky You have been assigned to this job by @sketchydroide! Please apply to this job in Upwork 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 π
π£ @ravindra-encoresky You have been assigned to this job by @sketchydroide! Please apply to this job in Upwork 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 π
Great, yes applied on upwork already, can expect PR by Wednesday 31 Aug 2022.
hi @mananjadhav @sketchydroide @luacmartins @adelekennedy I've shared the PR but the job hasn't awarded on Upwork yet.
@ravindra-encoresky hired you on Upwork!
Coming from this comment, it seems AddressForm
, doesn't work well with Form.js without modifying it.
We are tracking the AddressForm
refactor, here https://github.com/Expensify/App/issues/10738. We've almost through one proposal, and hence I feel we should put this on hold until we merge #10738.
@sketchydroide What do you think?
ahh sorry missed this. yeah lets put this on hold
not overdue
Proposal for the issue on hold was approved, so once that is worked upon and merged we can pick this.
no overdue still waiting on the other issue
I think we are still waiting?
Yes we're still waiting.
The PR for the issue holding this one is complete and almost ready to merge. This should be off hold in 1-2 days.
@ravindra-encoresky @sketchydroide The linked issue PR is merged. @ravindra-encoresky You can take the latest pull from main
branch and continue with the PR.
@ravindra-encoresky Are you still available to pick this up?
@sketchydroide Can we remove the hold label?
@ravindra-encoresky quick bump on this one.
@ravindra-encoresky Are you still available to pick this up?
@sketchydroide Can we remove the hold label?
This has already been done a month ago. On hold from very long from you. Whats next to pick ?
@ravindra-encoresky The issue was on hold because AddressForm wasn't working with your PR. PR for the same is merged and now we can continue with your PR by picking the latest main
changes.
@ravindra-encoresky The issue was on hold because AddressForm wasn't working with your PR. PR for the same is merged and now we can continue with your PR by picking the latest
main
changes.
okay thanks, eagerly waiting for this to finish.
Thanks you can get started on this. Appreciate your patience on this one @ravindra-encoresky
This is off-hold!
Current assignee @adelekennedy is eligible for the External assigner, not assigning anyone new.
Current assignee @mananjadhav is eligible for the External assigner, not assigning anyone new.
Current assignee @sketchydroide is eligible for the External assigner, not assigning anyone new.
Coming from the New Expensify Forms design doc, we should refactor CompanyStep to use the new form component, follow the guidelines below:
Here's an example of a Form refactor: https://github.com/Expensify/App/pull/9056
Guidelines
Testing
Verify that:
fix the errors
link focuses the first input with error