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-03-22] Refactor CheckboxWithLabel to be compatible with Form #7531
With the implementation of our new Form component we need to refactor CheckboxWithLabel 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().
In the input’s onChange method (or equivalent e.g. onTextChange, etc), call props.onChange().
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.
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.42-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
changed the title [-]Refactor CheckboxWithLabel to be compatible with Form[/-][+][HOLD for payment 2022-03-22] Refactor CheckboxWithLabel to be compatible with Form[/+]on Mar 15, 2022
Activity
MelvinBot commentedon Feb 2, 2022
Triggered auto assignment to @mallenexpensify (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.thesahindia commentedon Feb 2, 2022
Proposal
I think the requirements are quite clear and I would like to work on it.
(Also worked on PhoneTextInput component #7328)
MelvinBot commentedon Feb 3, 2022
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
Exported)MelvinBot commentedon Feb 3, 2022
Triggered auto assignment to @tgolen (
Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.29 remaining items
mallenexpensify commentedon Feb 23, 2022
PR is being worked on
mallenexpensify commentedon Mar 3, 2022
PR is being reviewed 🚂
mallenexpensify commentedon Mar 9, 2022
Waiting on one.. last.. change before PR is merged
botify commentedon Mar 15, 2022
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.42-6 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-03-22. 🎊
[-]Refactor CheckboxWithLabel to be compatible with Form[/-][+][HOLD for payment 2022-03-22] Refactor CheckboxWithLabel to be compatible with Form[/+]MelvinBot commentedon Mar 25, 2022
@tgolen, @mallenexpensify, @rushatgabhane, @thesahindia Whoops! This issue is 2 days overdue. Let's get this updated quick!
mallenexpensify commentedon Mar 25, 2022
Paid @rushatgabhane and @thesahindia $250 each for the fix and C+ Sorry for the delay