Releases: x-govuk/govuk-components
Version 3.2.0
- 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 flagrequire_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 withnil
. 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
- 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
- Allow footer
meta_items
keyword argument to take an array of hashes in addition to a plain hash. The new format matches that used in the official Nunjucks macros. There's a new section in the guide covering use. Thanks to @rhysbarrett for suggesting it. #349 - Nudge the test coverage back up to 100% #350
Version 3.1.3
- 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 inas_button: true
. Thanks @thomasleese for his work on this #343 - Some minor development dependency version bumps #344, #345
Version 3.1.2
Version 3.1.1
- 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
- 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 overwritenil
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
Version 3.0.5
- 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 theclasses
argument like before, or as aclass:
entry inhtml_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.