Skip to content

Releases: x-govuk/govuk-form-builder

Version 3.2.0

10 Nov 20:39
7b20630
Compare
Choose a tag to compare
  • Fix a bug where classes passed in via label/hint/legend/caption hashes replaced the defaults rather than appending to them #397 - thanks @cpjmcquillan
  • Update supported Rails versions to 6.1.7 and 7.0.4 #387
  • Update supported GOV.UK frontend version to 4.3.1 #387
  • Stop using official assets in the guide #388
  • Fix the exclusive checkboxes example in the guide #391 - thanks @c0nspiracy
  • Improve the contrast in code snippets in the guide and fix a minor display bug #392, #393
  • Add a CodeQL scanning workflow task f9379fb

Upgrade notes

When passing additional custom classes in via label, caption, hint or legend hashes they are added to the default class rather than overwriting it. This brings the behaviour in line with the rest of the library and considered a bug fix rather than a breaking change.

Given the input:

f.govuk_text_area :details, label: { text: "Some details", class: "special-class" }

Output before this release

<label for="model-details-field" class="special-class">Some details</label>

Output after this release

<label for="model-details-field" class="govuk-label special-class">Some details</label>

Version 3.1.2

15 Aug 16:01
84a22d5
Compare
Choose a tag to compare
  • Upgrade to GOV.UK Frontend 4.3.0 #380
  • Various small version updates including rouge, sass and rubocop-govuk #377 #378 #379

Version 3.1.1

24 Jul 17:58
842cd45
Compare
Choose a tag to compare
  • Ensure govuk_date_field works correctly when omit_day: true. Rails ignores the field when the day segment parameter is missing, this change follows the Rails convention and adds a hidden day field. Thank you @thomasleese for diagnosing and fixing this #376
  • Add a configuration flag that disables the auto-bolding of radio button labels when hints are present. The form builder's default behaviour will remain the same (it matches an older version of the design system's guidance that suggested doing this which was removed in 2020) to avoid breakages but may be toggled at the next major release. Thanks @paulrobertlloyd for suggesting this #373
  • Fix the copyright information in the LICENCE 45bf925

Version 3.1.0

27 Jun 15:38
9575a00
Compare
Choose a tag to compare
  • Support GOV.UK Design System 4.1.0 #371
  • Switch the guide from libsass to dart-sass #367
  • Upgrade to html-attributes-utils version 0.9.2 #370

Version 3.0.3

19 May 09:23
c888c32
Compare
Choose a tag to compare
  • Support GOV.UK Design System 4.1.0
  • Increase supported Ruby version to 3.1.2
  • Increase supported Rails version to 7.0.3
  • Remove patterns and wildcards from the date inputs #363
  • Switch to from deep_merge gem to html-attributes-utils to combining HTML attributes #357
  • Remove aria-live attribute from the text area #364
  • Various minor dependency updates

Version 3.0.2

12 Feb 19:20
af07b7a
Compare
Choose a tag to compare

Version 3.0.1

22 Jan 13:42
ec7231a
Compare
Choose a tag to compare
  • Change default_error_summary_turbo_prefix from turbolinks to turbo - as everything else is geared towards getting up and running with the latest version of Rails it makes sense to target turbo by default. #345

    To continue prefixing error summary links for turbolinks add this line to your config:

      config.default_error_summary_turbo_prefix = 'turbolinks'
  • Run the quality check/guide building step using Ruby 3.1 instead of Ruby 3.0 because Nanoc switched to using the latest version of Psych's keyword argument style over positional #347

Version 3.0.0

07 Jan 12:10
4e4e066
Compare
Choose a tag to compare
  • Support GOV.UK Design System version 4.0.0
    • always render hints in div elements, never span. Previously the form builder would render text arguments in span and blocks in div 8189646
    • error messages are now rendered in p tags 02c43fc
  • Update the guide. Massive thanks to @paulrobertlloyd for making it look professional!
  • Drop support for Ruby 2.6.X and Rails 6.0.X
  • Add support for Ruby 3.1.0 and Rails 7.0.0
  • Change the default branch from master to main

Support for older versions

As the upgrade to GOV.UK Design System 4.0.0 will take some time, the 2.8 series of the form builder will continue to receive critical bug fixes but all new features will be for version 3.0.0 and above

Version 2.8.0

01 Dec 15:25
48ec42c
Compare
Choose a tag to compare
  • Allow maxlength to be optionally set on date inputs. Thanks @willfish for implementing this #329
  • Add a configuration option that implicitly trusts (and calls #html_safe on) error messages. It might be useful if additional formatting is needed within the error. It is disabled by default. Thanks @darokel for this one #330
  • Improve the building of CSS classes via #build_classes #323

Version 2.7.6

17 Nov 15:23
568f1d1
Compare
Choose a tag to compare
  • Update supported Ruby and Rails versions #324
  • Add support for Turbo #322
  • Allow error presenters to fully override link targets - thanks to @elliotcm for raising this and providing the initial implementation #326