govuk_publishing_components
govuk_publishing_components copied to clipboard
[DO NOT MERGE] Refactor organisation styles and upgrade to govuk-frontend v5.7.1
What / Why
- Removes generic
.brand__color
class, which was used to give organisations custom link colours fromgovuk-frontend
. However we keep a namespaced.brand__color
style forprime-ministers-office-10-downing-street
, so that links will remain black on the no 10 page only. - Also removes the
brand
option from theshare_links
component, and replaces it withblack_icons
andblack_links
. These are needed because the default brand styles are now going to be a black icon with our standard blue links, but the No 10 page needs black links as well, hence needing both options. Onlycollections
used thebrand
variant of this component, so this shouldn't break any other pages. Using these new options incollections
is simple: https://github.com/alphagov/collections/pull/3802 - The two above points will introduce minor tech debt in the sense that
collections
will be passingbrand:
to the share links component when that is no longer a variant, and organisation components will have abrand__colour
class on them which isn't doing anything now that they all use the default blue colour. These two things may be a backendy thing to resolve, as thebrand
options incollections
seem quite tightly coupled to the backend/models of the org pages. - This also updates the DSIT class override we have, instead of removing it. We need this because the class was renamed in
govuk-frontend
fromdepartment-for-science-innovation-and-technology
todepartment-for-science-innovation-technology
( - theand
was dropped.) Ourwhitehall
model still uses the old class name, and therefore renders the page using the old class name, so we need to keep this temporary class in for now. Once we've updatedwhitehall
model to use the new class name, it will grab the styles directly fromgovuk-frontend
allowing us to remove the class in our gem.
Testing
- To test this, you'll need to run
static
with this gem. Then runcollections
with this branch: https://github.com/alphagov/collections/pull/3802 while pointing at your localstatic
and this version of the gem.