govuk_publishing_components icon indicating copy to clipboard operation
govuk_publishing_components copied to clipboard

[DO NOT MERGE] Refactor organisation styles and upgrade to govuk-frontend v5.7.1

Open AshGDS opened this issue 4 months ago • 4 comments

What / Why

  • Removes generic .brand__color class, which was used to give organisations custom link colours from govuk-frontend. However we keep a namespaced .brand__color style for prime-ministers-office-10-downing-street, so that links will remain black on the no 10 page only.
  • Also removes the brand option from the share_links component, and replaces it with black_icons and black_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. Only collections used the brand variant of this component, so this shouldn't break any other pages. Using these new options in collections 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 passing brand: to the share links component when that is no longer a variant, and organisation components will have a brand__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 the brand options in collections 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 from department-for-science-innovation-and-technology to department-for-science-innovation-technology ( - the and was dropped.) Our whitehall 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 updated whitehall model to use the new class name, it will grab the styles directly from govuk-frontend allowing us to remove the class in our gem.

Testing

  • To test this, you'll need to run static with this gem. Then run collections with this branch: https://github.com/alphagov/collections/pull/3802 while pointing at your local static and this version of the gem.

Visual Changes

Before

image image

After

image image

AshGDS avatar Oct 21 '24 11:10 AshGDS