Skip to content

Releases: x-govuk/govuk-components

Version 3.2.0

04 Sep 14:41
a698a03
Compare
Choose a tag to compare
  • Make the library configurable. This change was made with the help of internal-ruby-gems team, Massive thanks to @JonF1, @HettieS and @robyoung91 for their contributions 🎉 #355
  • Allow visually_hidden_text to be required on all summary list action items. This option is controlled by the new configuration flag require_summary_list_action_visually_hidden_text and is false by default, maintaining the old behaviour. When toggled to true all actions must be accompanied by some visually hidden text unless explicitly overridden with nil. Thanks to @frankieroberto for implementing this and @josephhull676 for making it configurable #354
  • Update view_component to 2.69.0 #365
  • Ensure the tests are run using matrix variables #364

Upgrade notes

As part of #355 the visually_hidden_next_text and visually_hidden_previous_text arguments were removed from GovukComponent::PaginationComponent. These were superfluous and unnecessary so treated like a bug and removed. The visually hidden text should either passed in as a block of HTML or set via the default_pagination_next_text and default_pagination_previous_text config options.

Version 3.1.5

15 Aug 15:37
9b0b296
Compare
Choose a tag to compare
  • Upgrade to GOV.UK Frontend 4.3.0, thanks @frankieroberto for checking this - the header's menu button now has a hidden attribute #356
  • Update the minimum supported Ruby version referenced in publish.yml. Thanks @josephhull676 for spotting and fixing this #357

Version 3.1.4

11 Jul 17:53
0d8e2de
Compare
Choose a tag to compare

Version 3.1.3

05 Jul 17:32
7e20bb2
Compare
Choose a tag to compare
  • Allow the start button component to render a form with a <button> element (via Rails' button_to) instead of the usual styled link. This can be enabled by passing in as_button: true. Thanks @thomasleese for his work on this #343
  • Some minor development dependency version bumps #344, #345

Version 3.1.2

27 Jun 20:12
57e209c
Compare
Choose a tag to compare
  • Make Pagy a dependency. My previous effort to make it optional fell foul of Zeitwerk's eager loading which is usually enabled in CI/production envs. Huge thanks @tvararu for helping diagnose #341

Version 3.1.1

27 Jun 18:41
b900e6e
Compare
Choose a tag to compare
  • Fix bug in the pagination component where the link helper is called too early in the lifecycle and doesn't yet have access to the controller context when running in a real Rails app #339

Version 3.1.0

27 Jun 15:44
d024b62
Compare
Choose a tag to compare
  • Support GOV.UK Frontend 4.2.0 #337
  • Add the Pagination component. It allows pagination to be built manually or by passing in a Pagy object #316
  • Upgrade ViewComponent to 2.56.2 #332
  • Handle classes: nil more gracefully (now we overwrite nil with an empty array so the subsequent appending won't fail). Thanks @frankieroberto for suggesting this. #335
  • Upgrade to html-attributes-utils version 0.9.2 #338

Version 3.0.6

09 Jun 09:17
84bb30f
Compare
Choose a tag to compare
  • Fix a bug in 3.0.5 where Zeitwork expects a module to be present that is no longer present. Thanks to @cwrw for reporting and diagnosing #331

Version 3.0.5

08 Jun 14:43
9afb13e
Compare
Choose a tag to compare
  • Add missing button attributes to govuk_button_to helper. Thanks @tvararu #326
  • Integrate the html_attributes_utils gem. This allows custom classes to be passed in either via the classes argument like before, or as a class: entry in html_attributes - classes will eventually be deprecated #323.
  • Various minor version updates for guide dependencies #327, #328, #329
  • Switch to Dart Sass due to libsass being eol #324
  • Add a section break helper Thanks @paulrobertlloyd for requesting and @cpjmcquillan for implementing #325

Update notes

This change shouldn't affect most users, but if you're inheriting from GovukComponent::Base it probably will. #default_classes has been replaced by #default_attributes.

This can usually be remedied by changing from:

def default_classes
  %w(x y z)
end

to

def default_attributes
  { class: %w(x y z) }
end

Additionally, the id: param has been dropped in several places and can should also be supplied via html_attributes, so id: "my-val" becomes html_attributes: { id: "my-val" }

However, more complicated use cases might need a little more work. I'm happy to assist, feel free to cc me (@peteryates) on any PRs that are problematic.

Version 3.0.4

13 Jun 10:53
8cb1016
Compare
Choose a tag to compare
  • Support GOV.UK Design System 4.1.0 #317
  • Update supported Rails version to 7.0.2 #310
  • Update supported Ruby version to 3.1.2 #310
  • Various minor dependency updates