Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.gitignore
#	CHANGELOG.md
#	CONTRIBUTING.md
#	Gemfile
#	README.md
#	Rakefile
#	demo/config/database.yml
#	test/bootstrap_form_test.rb
#	test/dummy/Rakefile
#	test/dummy/app/controllers/application_controller.rb
#	test/dummy/app/views/layouts/application.html.erb
#	test/dummy/bin/bundle
#	test/dummy/config/application.rb
#	test/dummy/config/boot.rb
#	test/dummy/config/environment.rb
#	test/dummy/config/environments/development.rb
#	test/dummy/db/schema.rb
#	test/gemfiles/5.0.gemfile
#	test/test_helper.rb
  • Loading branch information
John Yeates committed Sep 17, 2018
2 parents 857ed25 + 67f35a8 commit 20fdac0
Show file tree
Hide file tree
Showing 67 changed files with 4,146 additions and 513 deletions.
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
.bundle/
log/*.log
pkg/
test/dummy/db/*.sqlite3
test/dummy/log/*.log
test/dummy/tmp/
demo/db/*.sqlite3
demo/log/*.log
demo/tmp/
*.gem
.rbenv-gemsets
*.swp
Gemfile.lock
test/gemfiles/*.lock
.ruby-version
Vagrantfile
.vagrant
92 changes: 74 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,81 @@
## [Pending Release][]

Bugfixes:
- Your contribution here!
### Breaking changes

Features:
- Your contribution here!
* [#344](https://github.com/bootstrap-ruby/rails-bootstrap-forms/pull/344): Allow HTML in help translations by using the '_html' suffix on the key - [@unikitty37](https://github.com/unikitty37)
* [#325](https://github.com/bootstrap-ruby/rails-bootstrap-forms/pull/325): Support :prepend and :append for the `select` helper - [@donv](https://github.com/donv).
* Your contribution here!

### New features

* [#476] Give a way to pass classes to the `div.form-check` wrapper for check boxes and radio buttons - [@lcreid](https://github.com/lcreid).
* [461](https://github.com/bootstrap-ruby/bootstrap_form/pull/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](https://github.com/lancecarlson).
* Your contribution here!
* The `button`, `submit`, and `primary` helpers 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 an `extra_class` 'test-button' will have its final CSS classes declaration as 'btn btn-primary test-button'.

### Bugfixes

* Your contribution here!
* [#347](https://github.com/bootstrap-ruby/bootstrap_form/issues/347) Fix `wrapper_class` and `wrapper` options for helpers that have `html_options`.
* [#472](https://github.com/bootstrap-ruby/bootstrap_form/pull/472) Use `id` option value as `for` attribute of label for custom checkboxes and radio buttons.
* [#478](https://github.com/bootstrap-ruby/bootstrap_form/issues/478) Fix offset for form group without label when multiple label widths are specified.


## [4.0.0.alpha1][] (2018-06-16)

🚨 **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](https://getbootstrap.com/docs/4.0/migration/) 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_form` gem has been completely removed
* The `icon` option is no longer supported (Bootstrap v4 does not include icons)
* The deprecated Rails methods `check_boxes_collection` and `radio_buttons_collection` have been removed
* `hide_label: true` and `skip_label: true` on 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 of `bootstrap_form`, and you used `check_box` or `radio_button` with either of those options
* `static_control` will no longer properly show error messages. This is the result of bootstrap changes.
* `static_control` will also no longer accept a block, use the `value` option instead.
* `form_group` with a block that produces arbitrary text needs to be modified to produce validation error messages (see the UPGRADE-4.0 document). [@lcreid](https://github.com/lcreid).
* `form_group` with a block that contains more than one `check_box` or `radio_button` needs to be modified to produce validation error messages (see the UPGRADE-4.0 document). [@lcreid](https://github.com/lcreid).
* [#456](https://github.com/bootstrap-ruby/bootstrap_form/pull/456): Fix label `for` attribute when passing non-english characters using `collection_check_boxes` - [@ug0](https://github.com/ug0).
* [#449](https://github.com/bootstrap-ruby/bootstrap_form/pull/449): Bootstrap 4 no longer mixes in `.row` in `.form-group`. `bootstrap_form` adds `.row` to `div.form-group` when layout is horizontal.

### New features

* Support for Rails 5.1 `form_with` - [@lcreid](https://github.com/lcreid).
* Support Bootstrap v4's [Custom Checkboxes and Radios](https://getbootstrap.com/docs/4.0/components/forms/#checkboxes-and-radios-1) with a new `custom: true` option
* Allow HTML in help translations by using the `_html` suffix on the key - [@unikitty37](https://github.com/unikitty37)
* [#408](https://github.com/bootstrap-ruby/bootstrap_form/pull/408): Add option[:id] on static control #245 - [@duleorlovic](https://github.com/duleorlovic).
* [#455](https://github.com/bootstrap-ruby/bootstrap_form/pull/455): Support for i18n `:html` subkeys in help text - [@jsaraiva](https://github.com/jsaraiva).
* Adds support for `label_as_placeholder` option, which will set the label text as an input fields placeholder (and hiding the label for sr_only).
* [#449](https://github.com/bootstrap-ruby/bootstrap_form/pull/449): Passing `.form-row` overrides default `.form-group.row` in horizontal layouts.
* Added an option to the `submit` (and `primary`, 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 the `button` helper (and having to manually insert the typical Bootstrap classes). - [@jsaraiva](https://github.com/jsaraiva).
* Add `:error_message` option to `check_box` and `radio_button`, so they can output validation error messages if needed. [@lcreid](https://github.com/lcreid).
* Your contribution here!

### Bugfixes

* [#357](https://github.com/bootstrap-ruby/bootstrap_form/pull/357) if provided,
use html option `id` to specify `for` attribute on label
[@duleorlovic](https://github.com/duleorlovic)


## [2.7.0][] (2017-04-21)

Features:
* [#325](https://github.com/bootstrap-ruby/rails-bootstrap-forms/pull/325): Support :prepend and :append for the `select` helper - [@donv](https://github.com/donv).
* [#325](https://github.com/bootstrap-ruby/bootstrap_form/pull/325): Support :prepend and :append for the `select` helper - [@donv](https://github.com/donv).

## [2.6.0][] (2017-02-03)

Bugfixes:
- Fix ambiguous first argument warning (#311, @mikenicklas)

Features:
- Add a FormBuilder#custom_control helper [#289](https://github.com/bootstrap-ruby/rails-bootstrap-forms/pull/289)
- Add a FormBuilder#custom_control helper [#289](https://github.com/bootstrap-ruby/bootstrap_form/pull/289)

## [2.5.3][] (2016-12-23)

Expand All @@ -35,7 +90,7 @@ Bugfixes:
## [2.5.1][] (2016-09-23)

Bugfixes:
- Fix getting help text for elements when using anonymous models (see [issue 282](https://github.com/bootstrap-ruby/rails-bootstrap-forms/issues/282))
- Fix getting help text for elements when using anonymous models (see [issue 282](https://github.com/bootstrap-ruby/bootstrap_form/issues/282))

## [2.5.0][] (2016-08-12)

Expand Down Expand Up @@ -128,7 +183,7 @@ Features:
## 2.1.0 (2014-04-01)

Moved GitHub repository from https://github.com/potenza/bootstrap_form
to https://github.com/bootstrap-ruby/rails-bootstrap-forms
to https://github.com/bootstrap-ruby/bootstrap_form

Bugfixes:

Expand Down Expand Up @@ -168,11 +223,12 @@ Features:
- Added support for bootstrap_form_tag (@baldwindavid)


[Pending Release]: https://github.com/bootstrap-ruby/rails-bootstrap-forms/compare/v2.7.0...HEAD
[2.7.0]: https://github.com/bootstrap-ruby/rails-bootstrap-forms/compare/v2.6.0...v2.7.0
[2.6.0]: https://github.com/bootstrap-ruby/rails-bootstrap-forms/compare/v2.5.3...v2.6.0
[2.5.3]: https://github.com/bootstrap-ruby/rails-bootstrap-forms/compare/v2.5.2...v2.5.3
[2.5.2]: https://github.com/bootstrap-ruby/rails-bootstrap-forms/compare/v2.5.1...v2.5.2
[2.5.1]: https://github.com/bootstrap-ruby/rails-bootstrap-forms/compare/v2.5.0...v2.5.1
[2.5.0]: https://github.com/bootstrap-ruby/rails-bootstrap-forms/compare/v2.4.0...v2.5.0
[2.4.0]: https://github.com/bootstrap-ruby/rails-bootstrap-forms/compare/v2.3.0...v2.4.0
[Pending Release]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v4.0.0.alpha1...HEAD
[4.0.0.alpha1]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.7.0...v4.0.0.alpha1
[2.7.0]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.6.0...v2.7.0
[2.6.0]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.5.3...v2.6.0
[2.5.3]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.5.2...v2.5.3
[2.5.2]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.5.1...v2.5.2
[2.5.1]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.5.0...v2.5.1
[2.5.0]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.4.0...v2.5.0
[2.4.0]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.3.0...v2.4.0
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The release of Bootstrap 4 and Rails 5.1 have implications for the future
direction of `bootstrap_form`. Don't worry. We plan to move this gem forward to
Bootstrap 4 and to support Rails 5.1 and beyond. If you're thinking of
contributing to `bootstrap_form`, please read
[issue #361](https://github.com/bootstrap-ruby/rails-bootstrap-forms/issues/361).
[issue #361](https://github.com/bootstrap-ruby/bootstrap_form/issues/361).

Your comments are welcome.

Expand Down Expand Up @@ -35,9 +35,9 @@ For the project. Optionally, create a branch you want to work on
- Update the README if necessary.
- Add a line to the CHANGELOG for your bug fix or feature.

You may find using test/dummy application useful for development and debugging.
You may find using demo application useful for development and debugging.

- `cd test/dummy`
- `cd demo`
- `rake db:schema:load`
- `rails s`
- Navigate to http://localhost:3000
Expand All @@ -50,8 +50,8 @@ You may find using test/dummy application useful for development and debugging.
### 6. Done!

Somebody will shortly review your pull request and if everything is good will be
merged into master brach. Eventually gem will be published with your changes.
merged into master branch. Eventually gem will be published with your changes.

---

Thanks to all the great contributors over the years: https://github.com/bootstrap-ruby/rails-bootstrap-forms/graphs/contributors
Thanks to all the great contributors over the years: https://github.com/bootstrap-ruby/bootstrap_form/graphs/contributors
2 changes: 1 addition & 1 deletion Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ end
# Did you remove the CHANGELOG's "Your contribution here!" line?
# ------------------------------------------------------------------------------
if has_changelog_changes
if IO.read("CHANGELOG.md").scan(/^\s*- Your contribution here/i).count < 2
if IO.read("CHANGELOG.md").scan(/^\s*[-\*] Your contribution here/i).count < 3
fail(
"Please put the `- Your contribution here!` line back into CHANGELOG.md.",
:sticky => false
Expand Down
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ gemspec
# gem "rails", "~> 5.2.0.beta2"

group :development do
gem "chandler", ">= 0.7.0"
gem "htmlbeautifier"
end

group :test do
# can relax version requirement for Rails 5.2.beta3+
gem "minitest", "~> 5.10.3"

gem "diffy"
gem "equivalent-xml"
gem "mocha"
gem "sqlite3"
gem "timecop", "~> 0.7.1"
end

gem "minitest", "~> 5.10.3"
Loading

0 comments on commit 20fdac0

Please sign in to comment.