Skip to content

Releases: citizensadvice/design-system

v9.2.0

01 Apr 11:31
d27e3b7

Choose a tag to compare

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_boxes and cads_collection_radio_buttons to be used without a form model @davidrapson

New Contributors

Full Changelog: v9.1.0...v9.2.0

v9.1.0

03 Mar 11:50
7a437bf

Choose a tag to compare

New

  • Test against Ruby 4.x

  • Set i18n_customize_full_message by 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_level to cads_error_summary

  • Support custom type when using cads_text_field

  • Allows cads_text_field and cads_textarea to be used without a model

  • Alias cads_textarea and cads_text_area

  • Alias cads_collection_checkboxes and cads_collection_check_boxes

  • Alias cads_checkbox and cads_check_box

Deprecations

  • Allow passing additional attributes to cads_textarea e.g.

    cads_text_area(
      :address,
      autocomplete: "name",
      "data-additional": "example"
    )

    If using the previous named additional_attributes hash, this will log a deprecation warning and will be removed in a future version.

  • Deprecate named parameters for cads_colleciton fields

    All cads_collection fields 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_collection fields
  • Fix missing aria-describedby attributes on all cads_collection fields
  • Fix bug where cads_check_box would generate HTML IDs based on name instead e.g. example_form[confirmation]-error vs example_form_confirmation-error

Full Changelog: v9.0.0...v9.1.0

v9.0.0

23 Oct 09:04
a72e52b

Choose a tag to compare

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 links parameter from breadcrumbs component.

    Before:

    render CitizensAdviceComponents::Breadcrumbs.new(links: [])

    After:

    render CitizensAdviceComponents::Breadcrumbs.new([])

New

  • Add support for Rails 8.1
  • Support size and layout options when using cads_collection_radio_buttons
  • Log a deprecation warning when using the type argument for Textarea and Select components. 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

25 Sep 11:29
ffa70c7

Choose a tag to compare

Fix

  • Reverts an internal refactoring to Textarea and Select components which removed an unintentional type attribute which some consumers were relying on. A deprecation warning will be included in a future release before removal.

v8.3.1

22 Sep 14:52
0fcc543

Choose a tag to compare

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-focusable class. This has never been used in any internal design system or product code.

v8.3.0

27 Aug 15:41
deed9ed

Choose a tag to compare

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

13 Aug 14:35
4b7c6f0

Choose a tag to compare

New

v8.1.0

28 Jul 09:12
c3cb623

Choose a tag to compare

New

  • Support page_heading option for radio and checkbox collections

    This option was added to text inputs, date inputs, and text areas but not radio and checkbox collections. There was a historical legend_heading option 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_breadcrumbs for defining an array of default breadcrumbs to use
    • cads_add_breadcrumb for setting a breadcrumb from within a controller
    • cads_add_breadcrumbs for setting multiple breadcrumbs at once from within a controller

    In addition breadcrumbs can be accessed via a cads_breadcrumbs view 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 links positional argument will still work but will log a deprecation warning.

Full Changelog: v8.0.3...v8.1.0

v8.0.3

30 Jun 14:02
abea66c

Choose a tag to compare

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

12 Jun 16:09
582b908

Choose a tag to compare

Bugfix

  • small visual tweaks to the new header button following designer review to best align with other elements in header