Releases: citizensadvice/design-system
v9.2.0
Changes
New
- Remove support for end-of-life Ruby 3.2.x versions @davidrapson
- Support Date-like objects in date fields @akamike
- Improve compatibility for collection fields, allows
cads_collection_check_boxesandcads_collection_radio_buttonsto be used without a form model @davidrapson
New Contributors
- @akamike made their first contribution in #4023
- @michelesr made their first contribution in #4056
Full Changelog: v9.1.0...v9.2.0
v9.1.0
New
-
Test against Ruby 4.x
-
Set
i18n_customize_full_messageby default -
Feature parity for Rails form builder components:
This release introduces some preparatory work to bring feature parity to the Rails form builder components and the original view component interfaces. This is preparation for a future release which will make the form builder interfaces the default going forwards and eventually deprecate the view component interfaces. If you have not yet moved your forms over to use Rails form builder methods this release should make it easier to do so.
-
Add support for
heading_leveltocads_error_summary -
Support custom
typewhen usingcads_text_field -
Allows
cads_text_fieldandcads_textareato be used without a model -
Alias
cads_textareaandcads_text_area -
Alias
cads_collection_checkboxesandcads_collection_check_boxes -
Alias
cads_checkboxandcads_check_box
Deprecations
-
Allow passing additional attributes to
cads_textareae.g.cads_text_area( :address, autocomplete: "name", "data-additional": "example" )
If using the previous named
additional_attributeshash, this will log a deprecation warning and will be removed in a future version. -
Deprecate named parameters for
cads_collecitonfieldsAll
cads_collectionfields have been updated to support equivalent arguments to the Rails native equivalents e.g.cads_collection_radio_buttons(attribute, collection, value_method, text_method, options = {}, html_options = {}
The previous arguments using named parameters are still supported but a deprecation warning will be logged and will
be removed in a future major version.
Fix
- Fix missing welsh translation for "Optional" label on all
cads_collectionfields - Fix missing aria-describedby attributes on all
cads_collectionfields - Fix bug where
cads_check_boxwould generate HTML IDs based on name instead e.g.example_form[confirmation]-errorvsexample_form_confirmation-error
Full Changelog: v9.0.0...v9.1.0
v9.0.0
Breaking changes
-
Remove support for end-of-life Rails 7.1.x versions
-
Remove icon font
Products still using the icon font for their own components will need to self-host a copy of the icon font from a previous release until they are able to fully migrate away.
-
Remove deprecated
linksparameter from breadcrumbs component.Before:
render CitizensAdviceComponents::Breadcrumbs.new(links: [])
After:
render CitizensAdviceComponents::Breadcrumbs.new([])
New
- Add support for Rails 8.1
- Support
sizeandlayoutoptions when usingcads_collection_radio_buttons - Log a deprecation warning when using the
typeargument forTextareaandSelectcomponents. Neither textarea nor select elements accept a type. This argument will be removed in a future version.
Full Changelog: v8.3.2...v9.0.0
v8.3.2
Fix
- Reverts an internal refactoring to
TextareaandSelectcomponents which removed an unintentionaltypeattribute which some consumers were relying on. A deprecation warning will be included in a future release before removal.
v8.3.1
Fix
- Inline text styles for the badge component, instead of using
@include cads-typographic-scale-text-small;. This resolves a breaking change introduced by host apps using scss >= v1.92 - Remove
.cads-sr-only-focusableclass. This has never been used in any internal design system or product code.
v8.3.0
New
- Footer: a new additional logo slot has been added in the footer to include any additional logos (e.g., the Fundraising Regulator logo for the public-website).
v8.2.0
New
- Officially support ViewComponent 4
- Header: by default there is now only a single skip link (to the main content), following best practice accessility guidance.
v8.1.0
New
-
Support
page_headingoption for radio and checkbox collectionsThis option was added to text inputs, date inputs, and text areas but not radio and checkbox collections. There was a historical
legend_headingoption which performed a similar function so this has been brought in line with the new behaviour.The previous option is supported but will log a deprecation warning.
-
Add breadcrumb helpers for use in Rails applications.
Make the following helpers available in controllers:
cads_default_breadcrumbsfor defining an array of default breadcrumbs to usecads_add_breadcrumbfor setting a breadcrumb from within a controllercads_add_breadcrumbsfor setting multiple breadcrumbs at once from within a controller
In addition breadcrumbs can be accessed via a
cads_breadcrumbsview helper:render CitizensAdviceComponents::Breadcrumbs.new(cads_breadcrumbs)Typically used from within your application layout:
<div class="cads-page"> <div class="cads-page-header"> <%= render AppHeaderComponent.new %> </div> <div class="cads-page-wrapper"> <%= render CitizensAdviceComponents::Breadcrumbs.new(cads_breadcrumbs) %> <div id="cads-main-content"><%= yield %></div> </div> <div class="cads-page-footer"><%= render AppFooterComponent.new %></div> </div>
To provide a cleaner interface for the newly provided breadcrumbs helpers the breadcrumbs
component has also been updated to accept breadcrumbs as the first argument:render CitizensAdviceComponents::Breadcrumbs.new([])
The previous
linkspositional argument will still work but will log a deprecation warning.
Full Changelog: v8.0.3...v8.1.0
v8.0.3
Bugfix
- when header links are collapsed into the nav menu, always show the nav menu when the header links are hidden
- fix the colour of the text on the header button when focussed and active
v8.0.2
Bugfix
- small visual tweaks to the new header button following designer review to best align with other elements in header