You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2022-05-20] [$500] Refactor StatePicker to be compatible with Form #7537
With the implementation of our new Form component we need to refactor StatePicker to be Form compatible. Here are the changes that need to be made:
An optional isFormInput prop.
If isFormInput is true, require a inputID prop. Use getInputIDPropTypes to enforce this propType rule.
Add an optional shouldSaveDraft prop. Defaults to false.
Make the value prop optional.
In the input’s onBlur method, call props.onBlur().
Rename the input's onChange method to onInputChange.
In the input’s onInputChange method (or equivalent e.g. onTextChange, etc), call props.onInputChange().
Remove the hasError prop.
Add an optional errorText prop. Defaults to an empty string.
Update the error message to display if errorText is truthy.
Update the inline error display style so it is left aligned with the label and input value. See example image for TextInput:
Make sure that props.ref is attached to the appropriate DOM node. This could involve forwarding the ref to a child component. This is important so we can call ref.focus().
Add the input to the test Form stories and make sure that it works. You can check this by running npm run storybook and testing the component in the example form.
Remove any unused code.
There's an example of a refactor to TextInput in this PR.
changed the title [-][$500] Refactor StatePicker to be compatible with Form[/-][+][HOLD for payment 2022-05-20] [$500] Refactor StatePicker to be compatible with Form[/+]on May 13, 2022
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.57-17 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Activity
MelvinBot commentedon Feb 2, 2022
Triggered auto assignment to @MitchExpensify (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.MitchExpensify commentedon Feb 2, 2022
MelvinBot commentedon Feb 2, 2022
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (
Exported)MelvinBot commentedon Feb 2, 2022
Triggered auto assignment to @thienlnam (
Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.77 remaining items
jayeshmangwani commentedon Apr 23, 2022
PR raised
@parasharrajat
[-][$500] Refactor StatePicker to be compatible with Form[/-][+][HOLD for payment 2022-05-20] [$500] Refactor StatePicker to be compatible with Form[/+]melvin-bot commentedon May 13, 2022
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.57-17 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2022-05-20. 🎊
MitchExpensify commentedon May 20, 2022
https://www.upwork.com/jobs/~0116994c22a1b60fb6 mind applying here @parasharrajat so I can issue C+ payment?
MitchExpensify commentedon May 20, 2022
Paid @jayeshmangwani , thank you very much!
jayeshmangwani commentedon May 20, 2022
@MitchExpensify Thankyou
parasharrajat commentedon May 20, 2022
@MitchExpensify Done.
MitchExpensify commentedon May 23, 2022
Done! Thanks all