Releases: bootstrap-ruby/bootstrap_form
5.1.0
What's Changed
New features
- Enable include hidden by @a5-stable in #627
- Consider human attribute name for labels by @koenpunt in #565
- Add support for Ransack::Search object to the first argument of bootrap_form_for by @harada4atsushi in #549
- Add support for append and prepend on collection_select (fixes #428) by @judylovesruby in #641
Bugfixes
- Update hide_class from sr-only to visually-hidden by @aki77 in #615
- Allow overriding the wrapper class by @donv in #618
- Add
generate_validation_failedmethod to not override help text by @antpaw in - Add margin below check boxes in the vertical layout by @donv in #638
- Fix text alignment in alert message when there is no error summary by @isaac in #634
- Update the inline form layout by @donv in #639
Documentation
- Typo in Contributing Doc by @lcreid in #620
- Demo 7.0 by @lcreid in #624
#300 - Add example images to README.md by @donv in #635
- Add generated HTML for the examples in README.md by @donv in #636
- Update the generated HTML for the trix editor example by @donv in #640
- Need 7.0.2 for file upload test by @lcreid in #643
- Use docker-compose by @lcreid in #644
New Contributors
- @aki77 made their first contribution in #615
- @a5-stable made their first contribution in #627
- @isaac made their first contribution in #634
- @harada4atsushi made their first contribution in #549
- @judylovesruby made their first contribution in #641
Full Changelog: v5.0.0...v5.1.0
Closed issues: 2021-11-12...2022-06-25
5.0.0
Breaking changes
- Generates markup for Bootstrap 5.
New features
- #572: Simplify the formatting of the file upload control to follow the new Bootstrap 5 styles
- #573: Add support for Bootstrap 5's floating labels
Bugfixes
- #582: Fix tests in bootstrap-5 branch, removes Rubocop offenses, and adds testing with Rails 6.1.
4.5.0
4.4.0
4.3.0
4.2.0
4.1.0
4.0.0
🚨 This release adds support for Bootstrap v4 and drops support for Bootstrap v3. 🚨
If your app uses Bootstrap v3, you should continue using bootstrap_form 2.7.x instead.
Bootstrap v3 and v4 are very different, and thus bootstrap_form now produces different markup in order to target v4. The changes are too many to list here; you can refer to Bootstrap's Migrating to v4 page for a detailed explanation.
In addition to these necessary markup changes, the bootstrap_form API itself has the following important changes in this release.
Breaking changes
- See Migrating to v4.
New features
- [#476] Give a way to pass classes to the
div.form-checkwrapper for check boxes and radio buttons - @lcreid. - 461: default form-inline class applied to parent content div on date select helpers. Can override with a :skip_inline option on the field helper - @lancecarlson.
- The
button,submit, andprimaryhelpers can now receive an additional option,extra_class. This option allows us to specify additional CSS classes to be added to the corresponding button/input, while maintaining the original default ones. E.g., a primary button with anextra_class'test-button' will have its final CSS classes declaration as 'btn btn-primary test-button'.
Bugfixes
4.0.0.alpha1
🚨 This release adds support for Bootstrap v4 and drops support for Bootstrap v3. 🚨
If your app uses Bootstrap v3, you should continue using bootstrap_form 2.7.x instead.
Bootstrap v3 and v4 are very different, and thus bootstrap_form now produces different markup in order to target v4. The changes are too many to list here; you can refer to Bootstrap's Migrating to v4 page for a detailed explanation.
In addition to these necessary markup changes, the bootstrap_form API itself has the following important changes in this release.
Breaking changes
- Rails 4.x is no longer supported
- Ruby 2.2 or newer is required
- Built-in support for the
nested_formgem has been completely removed - The
iconoption is no longer supported (Bootstrap v4 does not include icons) - The deprecated Rails methods
check_boxes_collectionandradio_buttons_collectionhave been removed hide_label: trueandskip_label: trueon individual check boxes and radio buttons apply Bootstrap 4 markup. This means the appearance of a page may change if you're upgrading from the Bootstrap 3 version ofbootstrap_form, and you usedcheck_boxorradio_buttonwith either of those optionsstatic_controlwill no longer properly show error messages. This is the result of bootstrap changes.static_controlwill also no longer accept a block, use thevalueoption instead.form_groupwith a block that produces arbitrary text needs to be modified to produce validation error messages (see the UPGRADE-4.0 document). @lcreid.form_groupwith a block that contains more than onecheck_boxorradio_buttonneeds to be modified to produce validation error messages (see the UPGRADE-4.0 document). @lcreid.- #456: Fix label
forattribute when passing non-english characters usingcollection_check_boxes- @ug0. - #449: Bootstrap 4 no longer mixes in
.rowin.form-group.bootstrap_formadds.rowtodiv.form-groupwhen layout is horizontal.
New features
- Support for Rails 5.1
form_with- @lcreid. - Support Bootstrap v4's Custom Checkboxes and Radios with a new
custom: trueoption - Allow HTML in help translations by using the
_htmlsuffix on the key - @unikitty37 - #408: Add option[:id] on static control #245 - @duleorlovic.
- #455: Support for i18n
:htmlsubkeys in help text - @jsaraiva. - Adds support for
label_as_placeholderoption, which will set the label text as an input fields placeholder (and hiding the label for sr_only). - #449: Passing
.form-rowoverrides default.form-group.rowin horizontal layouts. - Added an option to the
submit(andprimary, by transitivity) form tag helper,render_as_button, which when truthy makes the submit button render as a button instead of an input. This allows you to easily provide further styling to your form submission buttons, without requiring you to reinvent the wheel and use thebuttonhelper (and having to manually insert the typical Bootstrap classes). - @jsaraiva. - Add
:error_messageoption tocheck_boxandradio_button, so they can output validation error messages if needed. @lcreid.
Bugfixes
- #357 if provided,
use html optionidto specifyforattribute on label
@duleorlovic