From d74d7f5e1a8ba200cdb00b2671060edfa15e31e6 Mon Sep 17 00:00:00 2001 From: AshGDS <8880610+AshGDS@users.noreply.github.com> Date: Thu, 19 Sep 2024 10:28:34 +0100 Subject: [PATCH] Remove left search variant of layout header As it is no longer in use. --- CHANGELOG.md | 4 ++ .../components/_layout_header.html.erb | 56 ++++++------------- .../components/docs/layout_header.yml | 41 -------------- spec/components/layout_header_spec.rb | 6 -- 4 files changed, 20 insertions(+), 87 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 078bfcd8c2..e6e29393cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ useful summary for people upgrading their application, not a replication of the commit log. +## Unreleased + +* Remove left search variant of layout header ([PR #4239](https://github.com/alphagov/govuk_publishing_components/pull/4239)) + ## 43.3.0 * Remove unused cookies from cookie category ([PR #4234](https://github.com/alphagov/govuk_publishing_components/pull/4234)) diff --git a/app/views/govuk_publishing_components/components/_layout_header.html.erb b/app/views/govuk_publishing_components/components/_layout_header.html.erb index 51480cff9a..ea875901f5 100644 --- a/app/views/govuk_publishing_components/components/_layout_header.html.erb +++ b/app/views/govuk_publishing_components/components/_layout_header.html.erb @@ -8,58 +8,34 @@ product_name ||= nil remove_bottom_border ||= false search ||= false - search_left ||= false width_class = full_width ? "govuk-header__container--full-width" : "govuk-width-container" logo_link ||= "/" header_classes = %w[gem-c-layout-header govuk-header] header_classes << "gem-c-layout-header--#{environment}" if environment header_classes << "gem-c-layout-header--no-bottom-border" if remove_bottom_border - header_classes << "gem-c-layout-header--search-left" if search_left %> diff --git a/app/views/govuk_publishing_components/components/docs/layout_header.yml b/app/views/govuk_publishing_components/components/docs/layout_header.yml index ff66fd52b2..1719c2c20e 100644 --- a/app/views/govuk_publishing_components/components/docs/layout_header.yml +++ b/app/views/govuk_publishing_components/components/docs/layout_header.yml @@ -41,47 +41,6 @@ examples: - text: Hidden on desktop href: "item-3" show_only_in_collapsed_menu: true - with_left_search_and_navigation: - description: This supports pages where the search appears on the left with multiple navigation links on the right, such as the [How government works](https://www.gov.uk/government/how-government-works) page - data: - search_left: true - navigation_items: - - text: Departments - href: "item-1" - - text: Worldwide - href: "item-2" - - text: How government works - href: "item-3" - - text: Get involved - href: "item-4" - - text: Consultations - href: "item-4" - - text: Statistics - href: "item-5" - - text: News and communications - href: "item-6" - active: true - with_custom_navigation_aria_label: - description: The navigation has `aria-label="Top level"` by default. This option is here for when the `aria-label` needs to be more descriptive than that. - data: - search_left: true - navigation_aria_label: "Departments and policy" - navigation_items: - - text: Departments - href: "item-1" - - text: Worldwide - href: "item-2" - - text: How government works - href: "item-3" - - text: Get involved - href: "item-4" - - text: Consultations - href: "item-4" - - text: Statistics - href: "item-5" - - text: News and communications - href: "item-6" - active: true with_navigation_link_data_attributes: description: Supports adding data attributes i.e for tracking data: diff --git a/spec/components/layout_header_spec.rb b/spec/components/layout_header_spec.rb index f5f2d64fd9..0a054a18d1 100644 --- a/spec/components/layout_header_spec.rb +++ b/spec/components/layout_header_spec.rb @@ -120,12 +120,6 @@ def component_name assert_select ".gem-c-layout-header .gem-c-search" end - it "renders the search bar on the left when requested" do - render_component(environment: "public", search: true, search_left: true) - - assert_select ".gem-c-layout-header--search-left" - end - it "has the default logo link when no logo_link is specified" do render_component({})