-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Simpler input groups #31666
Simpler input groups #31666
Conversation
60bca3d
to
4c184e1
Compare
Consider a |
Given we're no longer supporting multiple inputs, this feels potentially problematic. I'll take a look and see what can be done, but can't promise it'll happen for sure. |
a3001d4
to
7277b45
Compare
"this drops all support for multiple addons, dropdowns, button groups, and multiple inputs" That's a big loss - no more | - | 10 | + | value adjusters, | << | < | > | >> | pagination controls etc. etc. |
Not a fan of this. With this change we won't be able to support multiple input text. I got a feeling, this will introduce more issues than we have now. |
We can do a @opensums-paul Having them on both sides should be doable with latest commit, and without side effects of other components, form validation, etc. Pagination controls, I'd suggest sticking to the pagination component. I know some folks want the jump to a page with an input in there, so maybe we figure out how to do that with our pagination. |
Other than aesthetics, it hit me while working on this that multiple inputs aren't all that necessary. A super wide set of buttons, addons, and inputs doesn't feel all that useful IMO when it could be done with default buttons and form controls already. What kind of issues are you thinking we'd run into? With a simpler approach and fewer supported permutations, my expectation is that we'll have far fewer issues and greater interoperability with other components, styles, themes, etc. |
Having a input group between two inputs seem to work fine in Bootstrap v5.0.0-alpha2. <div class="input-group">
<input type="text" class="form-control" placeholder="Username">
<span class="input-group-text">@</span>
<input type="text" class="form-control" placeholder="Server">
</div> I would like to see this added as an example in the documentation. |
Closing for #31953. |
This PR rewrites input groups, replacing the
.input-group
class with two new classes:.input-group-start
and.input-group-end
. Alongside that, this drops all support for multiple addons, dropdowns, button groups, and multiple inputs. Together, has the advantage of fixing our longstanding rounded corner issue with form validation.All those variations in the component make for an immense amount of difficulty in supporting it long term, and missing important bugs like the rounded corners with form validation. By simplifying things like this with two specific class names, we gain a ton of control.
If you find yourself needing a layout that uses all these now dropped variations, a standard "inline" form layout is most likely the best option (more control over spacing, alignment, and responsive behaviors).
Still more to be done, but I'm liking this simplified direction.
This fixes #25110 and closes #30170. With the changes from #31677, this also fixes #28414.
Thoughts @twbs/css-review?