-
Notifications
You must be signed in to change notification settings - Fork 355
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
Handle inline radio buttons and check boxes for Bootstrap 4. #410
Conversation
Here's an example of a CHANGELOG.md entry (place it immediately under the * [#410](https://github.com/bootstrap-ruby/bootstrap_form/pull/410): Handle inline radio buttons and check boxes for Bootstrap 4. - [@lcreid](https://github.com/lcreid). Generated by 🚫 Danger |
FYI you can append |
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.
Looks great. Nice code cleanup ✨
I do however see an issue that maybe warrants a separate issue or PR. Our documentation is not clear on how you properly create an inline form.
Some parts of the README imply that you just add layout: :inline
to bootstrap_form_for
and you are done. But that is either broken or the doc is wrong, because as I see in the tests, you must explicitly pass inline: true
to each radio or checkbox (in addition to passing layout: :inline
for the form?).
Furthermore the inline example in demo/
makes the same mistake, and the inline checkboxes there do not render nicely as a result.
I think we need to either change both the demo and the README, or our radio/check helpers need to perhaps assume inline: true
if they are within a form that is layout: :inline
. The latter sounds like it could be harder to get right.
Nice catch. I was so into just mechanically changing the existing test cases that I didn't notice that we weren't testing the case where the form has the |
Sounds good! If you could open the issue tomorrow I'd appreciate it. |
…ap-ruby#410) * Inline checkboxes. * Rebase from PR bootstrap-ruby#409.
The Bootstrap 4 tags for radio buttons and check boxes is more regular, so the helpers are somewhat shorter, at the cost of perhaps making the review more difficult.
If there's a way to show the diff without comparing white space, it might give you a better idea of the real changes, most notably in the test cases.
This PR partially addresses #395.