From a846908d0cb471f284dbf9f3b186b898bb583e06 Mon Sep 17 00:00:00 2001 From: Andy Sellick Date: Mon, 30 Oct 2023 13:32:42 +0000 Subject: [PATCH] Remove metadata component style override - and replace with new option from the component - inverse option for metadata automatically had extra spacing around it, this was being removed by this style override - can be seen on pages such as https://www.gov.uk/guidance/the-highway-code --- app/assets/stylesheets/views/_manual.scss | 9 --------- app/presenters/content_item/manual.rb | 1 + test/presenters/content_item/manual_test.rb | 3 ++- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/views/_manual.scss b/app/assets/stylesheets/views/_manual.scss index a19c6c05b..98d7cb91d 100644 --- a/app/assets/stylesheets/views/_manual.scss +++ b/app/assets/stylesheets/views/_manual.scss @@ -42,15 +42,6 @@ &.hmrc { background: govuk-organisation-colour("hm-revenue-customs"); } - - .gem-c-metadata--inverse { - background: none; - padding: 0; - - .gem-c-metadata__list { - margin: 0; - } - } } .section-list { diff --git a/app/presenters/content_item/manual.rb b/app/presenters/content_item/manual.rb index b2a92cf89..26e515376 100644 --- a/app/presenters/content_item/manual.rb +++ b/app/presenters/content_item/manual.rb @@ -33,6 +33,7 @@ def manual_metadata first_published: published, other: other_metadata, inverse: true, + inverse_compress: true, } end diff --git a/test/presenters/content_item/manual_test.rb b/test/presenters/content_item/manual_test.rb index 589a5794b..6cb60e321 100644 --- a/test/presenters/content_item/manual_test.rb +++ b/test/presenters/content_item/manual_test.rb @@ -66,10 +66,11 @@ def initialize(schema_name = "manual") expected_metadata = { from: ["blah"], first_published: "23 March 2022", - inverse: true, other: { I18n.t("manuals.updated") => "23 March 2022, #{I18n.t('manuals.see_all_updates')}", }, + inverse: true, + inverse_compress: true, } assert_equal expected_metadata, item.manual_metadata end