-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
feat(v5): Drop bsPrefix from FormGroup #5362
Conversation
www/src/examples/Form/Basic.js
Outdated
<Form.Group controlId="formBasicEmail"> | ||
<Form.Label>Email address</Form.Label> | ||
<Form.Control type="email" placeholder="Enter email" /> | ||
<div className="mb-3"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess this gives us a good excuse to revive the Layout component idea 😉 Would be fantastic if we could get this implemented for V5
wait, hold on – isn't this still useful for DRYing specifying ID between control and label? |
Could users use the FormContext directly? This FormGroup doesn't do much otherwise. ie
|
Probably want to wrap it up a bit better so it just takes the |
But then almost all of our end-users are just going to implement this themselves, so they'd just end up making their own If we feel strongly about dropping this component then we should at least add a "recipes" section in our docs so that end-users will know exactly how they should be making that component. |
Yeah that's true - It's nice to have something that works out of the box. Could we keep this component and remove the |
I think it's a judgment call? This seems in the same category as something like |
Ah ok. In that case, I would vote for just removing |
sgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, in that case i think we'd want to look at generic "layout class" support. idk
yep, having a Layout component would be great since we could handle three major use cases:
Not to mention, this generic layout component API is not anything new in the component library scene (e.g. the Box component from MUI and the Box component from Chakra-UI), so end-users who are switching from other component libraries to ours will already be familiar in some form to the idea behind it. |
I'll merge this now. I created a TODO note to revisit the margins after the Layout component has been added: |
https://v5.getbootstrap.com/docs/5.0/migration/#forms
Changes:
bsPrefix
fromFormGroup
as the class is no longer supported.mb-3
to handle spacing