Releases: x-govuk/govuk-form-builder
Releases · x-govuk/govuk-form-builder
Version 2.4.0
- Allow date inputs to retrieve values from a multiparam attribute hash as well as date objects #255
Version 2.3.0
- allow custom HTML attributes to be set across more form helpers. Thanks to @callumacrae for getting the ball rolling on this one #251
- various code cleanup and refactoring #248
- various guide updates #253, #254
Upgrade notes
The approach for setting custom HTML attributes has been standardised and now they are set via keyword arguments. Previously, the #govuk_collection_select
helper allowed a html_options
keyword argument (Rails-style), but this behaviour is no longer supported and will log a deprecation warning.
To upgrade, remove the html_options
kwarg and move the custom attributes to the method call:
- = govuk_collection_select :favourite_colour, @colours, :id, :name, html_options: { autofocus: false }
+ = govuk_collection_select :favourite_colour, @colours, :id, :name, autofocus: false
Version 2.2.0
- Support Ruby 3.0.0 #232
- Drop support for Rails 5.2.4 - Rails 3.0.0 doesn't support Rails 5.2.4 so the build matrix fails. It's very likely that the form builder will continue to work with Rails 5.2.x for the foreseeable future but it will no longer be automatically tested or officially supported #232
- Allow the submit button's
formnovalidate
value to be configured #242 - Various spec and guidance updates, thanks @david-mears-dfe for adding a new example to the radio buttons page #244, #245, #247
- Upgrade to GOV.UK Rubocop 4.0.0.pre.1 #246
Version 2.1.9
- This release brings some improvements to the collection form helpers:
- Add
include_blank
support to#govuk_collection_check_boxes
. This brings the checkboxes variant of the collection helper in line with the radio buttons one. Thanks to @njseeto for reporting #238 - Bring the default
include_blank
arguments in line with Rails' defaults by setting them totrue
by default. Previously the value wasfalse
in#govuk_collection_radio_buttons
91db189 - Add a configuration options so the default values for
include_blank
can be set for the check box and radio button helpers individually. To change the behaviour to how it was prior to2.1.9
use this configuration:
- Add
GOVUKDesignSystemFormBuilder.configure do |conf|
conf.default_collection_check_boxes_include_hidden = true
conf.default_collection_radio_buttons_include_hidden = false
end
Version 2.1.8
- Upgrade to GOV.UK Frontend version 3.11.0. The main change here was the addition of support for button groups. Now, whenever a block of content is passed into
#govuk_submit
, the submit element and all the additional content is wrapped in adiv.govuk-button-group
element, which automatically arranges and spaces the buttons/links within. The old behaviour of adding some margin to the right of the submit element has been dropped completely #237
Version 2.1.7
- Officially support Rails 6.1.1 #236
- Improve behaviour on collection methods when passed symbols by converting them to strings. When labels are generated within procs using symbols instead of strings the output is malformed and they didn't link to the corresponding input correctly. This is very much an edge case and noticed when reviewing an example in the guide #235
- Several refactorings based on vanilla Rubocop violations #234
- Add ability to publish gems via Github actions #229
Version 2.1.6
Version 2.1.5
- Upgrade to Version 3.10.0 of the GOV.UK Frontend #221
- Add support for adding wildcards to date patterns via the
wildcards
option on#govuk_date_field
#220 - Migrate from TravisCI to Github Actions #219
Version 2.1.4
- Fix a bug where custom attributes aren't applied to legends. The root of the problem was that the legend implementation differed heavily from the label and hint implementations; this change brings them inline and the bug #216 is fixed as a result. Thanks to @paulrobertlloyd for reporting and diagnosing the bug. #217
Version 2.1.3
- Fix a bug where
hint: nil
was not suppressing hints when matching localisations exist. Thanks to @cpjmcquillan for reporting this. #212, #213