paragon
paragon copied to clipboard
Remove react-bootstrap dependency from `Form` component
This issue has the same rationale as #2484, i.e. we extend Form
component when we really shouldn't be doing that anymore. However, this task is a bit more complicated as some of the consumers use react-bootstrap's Form
API instead of Paragon's, we'll need to address that too in order not to make a breaking change. Judging by the list of compound components that react-bootstrap's Form
has, Paragon currently does not provide the following
-
Form.Row
, which is used by consumers and is present on our docs site, we'll need to implement our own version of this component -
Form.Check
, which is replaced by ourForm.Checkbox
, but is still available and used by consumers, we'll need to updated consuming MFEs to useForm.Checkbox
instead -
Form.File
, I don't see it being used by consumers and it is not present on our docs site, should be safe to remove
### Tasks
- [ ] Implement `FormRow` component that has the same functionality as react-bootstrap's `Form.Row`, make it available as a standalone export under `FormRow` name and as a compound component `Form.Row`
- [ ] Open PRs to consuming MFEs that replace `Form.Check` usage with `Form.Checkbox`, validate that this does not break the UI. (you can use this [link](https://github.com/search?q=org%3Aopenedx%20Form.Check&type=code) to find usages of `Form.Check` across consuming MFEs)
- [ ] Implement our own `Form` component that behaves the same way as react-bootstrap's one and replace usages of react-bootstrap's `Form` with newly created component