Skip to content

Releases: x-govuk/govuk-form-builder

Version 2.3.0

30 Mar 15:46
fd74b18
Compare
Choose a tag to compare
  • 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

09 Mar 12:23
f2cb41f
Compare
Choose a tag to compare
  • 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

17 Feb 10:57
571426e
Compare
Choose a tag to compare
  • 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 to true by default. Previously the value was false 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 to 2.1.9 use this configuration:
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

10 Feb 16:14
5e446fa
Compare
Choose a tag to compare
  • 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 a div.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

27 Jan 15:56
18a4b27
Compare
Choose a tag to compare
  • 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

18 Dec 12:39
f7b9ba6
Compare
Choose a tag to compare
  • Add support for Rails 6.1.0 #226
  • Increase supported version of govuk-frontend to 3.10.2 #228
  • Add an option to include a hidden field in #govuk_collection_radio_buttons #227

Version 2.1.5

28 Nov 14:03
b6b5bca
Compare
Choose a tag to compare

Version 2.1.4

07 Nov 11:17
6f71f51
Compare
Choose a tag to compare
  • 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

03 Nov 16:38
d269218
Compare
Choose a tag to compare
  • Fix a bug where hint: nil was not suppressing hints when matching localisations exist. Thanks to @cpjmcquillan for reporting this. #212, #213

Version 2.1.2

28 Oct 13:22
c417111
Compare
Choose a tag to compare
  • Fix a bug where localised fieldset hints were being applied to the checkboxes within. Thanks to @zheileman for diagnosing and fixing this! #211