From f33c6955223db6b3497e8d89bfd5c970bf212f5d Mon Sep 17 00:00:00 2001 From: Jack Weeden Date: Tue, 24 Dec 2024 11:26:44 +0000 Subject: [PATCH] Remove GOV.UK Chat promo banner Removes the banner and all the supporting code / markup changes that were added to render it. --- app/assets/stylesheets/views/_browse.scss | 11 ------ app/helpers/govuk_chat_promo_helper.rb | 29 ---------------- app/views/browse/show.html.erb | 11 +++--- .../show_a_to_z.html.erb | 1 - .../show_curated.html.erb | 6 +--- app/views/shared/_browse_header.html.erb | 34 +++---------------- app/views/step_nav/show.html.erb | 18 +++------- spec/features/mainstream_browsing_spec.rb | 15 -------- spec/features/step_nav_page_spec.rb | 13 ------- spec/helpers/govuk_chat_promo_helper_spec.rb | 21 ------------ 10 files changed, 15 insertions(+), 144 deletions(-) delete mode 100644 app/helpers/govuk_chat_promo_helper.rb delete mode 100644 spec/helpers/govuk_chat_promo_helper_spec.rb diff --git a/app/assets/stylesheets/views/_browse.scss b/app/assets/stylesheets/views/_browse.scss index bdb39b022..128deada6 100644 --- a/app/assets/stylesheets/views/_browse.scss +++ b/app/assets/stylesheets/views/_browse.scss @@ -93,14 +93,3 @@ $browse-header-background-colour: #263135; margin-bottom: govuk-spacing(6); } } - -.browse__govuk-chat-promo { - background-color: govuk-tint(govuk-colour("blue"), 90%); - padding: govuk-spacing(4) 0; - - // we're using this component in an unconventional way so need to undo - // basic styling - .gem-c-chat-entry { - padding: 0; - } -} diff --git a/app/helpers/govuk_chat_promo_helper.rb b/app/helpers/govuk_chat_promo_helper.rb deleted file mode 100644 index ec9a82d35..000000000 --- a/app/helpers/govuk_chat_promo_helper.rb +++ /dev/null @@ -1,29 +0,0 @@ -module GovukChatPromoHelper - GOVUK_CHAT_PROMO_BASE_PATHS = %w[ - /browse/benefits/looking-for-work - /browse/business - /browse/business/business-tax - /browse/business/limited-company - /browse/business/setting-up - /browse/employing-people - /browse/employing-people/payroll - /browse/employing-people/recruiting-hiring - /browse/tax - /browse/tax/capital-gains - /browse/tax/dealing-with-hmrc - /browse/tax/self-assessment - /browse/tax/vat - /browse/working - /browse/working/finding-job - /browse/working/state-pension - /browse/working/time-off - /browse/working/workplace-personal-pensions - /import-goods-into-uk - /set-up-as-sole-trader - /set-up-limited-company - ].freeze - - def show_govuk_chat_promo?(base_path) - ENV["GOVUK_CHAT_PROMO_ENABLED"] == "true" && GOVUK_CHAT_PROMO_BASE_PATHS.include?(base_path) - end -end diff --git a/app/views/browse/show.html.erb b/app/views/browse/show.html.erb index d80bafd6a..7460b6d89 100644 --- a/app/views/browse/show.html.erb +++ b/app/views/browse/show.html.erb @@ -20,10 +20,7 @@ } %> <% end %> -<%= render "shared/browse_header", { - margin_bottom: page.slug == "benefits" ? 7 : 9, - govuk_chat_promo: show_govuk_chat_promo?(page.base_path), -} do %> +<%= render "shared/browse_header", { margin_bottom: page.slug == "benefits" ? 7 : 9 } do %> <%= render "govuk_publishing_components/components/heading", { text: page.title, inverse: true, @@ -40,9 +37,9 @@ <%= render "govuk_web_banners/recruitment_banner" %> <% if page.popular_list %>
-