From d8ad187c265918a6aa85fd15d975f69ffa1fc4e8 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 16 Feb 2021 15:05:36 +0000 Subject: [PATCH 1/4] Update published date to use gem toggle script --- app/views/components/_published-dates.html.erb | 2 +- test/components/published_dates_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/components/_published-dates.html.erb b/app/views/components/_published-dates.html.erb index 7ae6a26b4..63257d8e7 100644 --- a/app/views/components/_published-dates.html.erb +++ b/app/views/components/_published-dates.html.erb @@ -7,7 +7,7 @@ history_class = "app-c-published-dates--history" if history.any? %> <% if published || last_updated %> -
id="history" data-module="toggle"<% end %> lang="en"> +
id="history" data-module="gem-toggle"<% end %> lang="en"> <% if published %> Published <%= published %> <% end %> diff --git a/test/components/published_dates_test.rb b/test/components/published_dates_test.rb index 4e8266d56..59426b2b7 100644 --- a/test/components/published_dates_test.rb +++ b/test/components/published_dates_test.rb @@ -82,7 +82,7 @@ def component_name last_updated: "15th July 2015", history: [display_time: "23 August 2013", note: "Updated with new data"], ) - assert_select ".app-c-published-dates--history[data-module=\"toggle\"]" + assert_select ".app-c-published-dates--history[data-module=\"gem-toggle\"]" assert_select ".app-c-published-dates--history a[href=\"#full-history\"][data-controls=\"full-history\"]" assert_select ".app-c-published-dates--history a[href=\"#full-history\"][data-expanded=\"false\"]" end From 2fee7dc7699064db469c82f9ac519c313d7dc29b Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 16 Feb 2021 15:08:05 +0000 Subject: [PATCH 2/4] Use gemTrackClick script --- app/presenters/content_item/brexit_notice.rb | 4 ++-- app/views/components/_important-metadata.html.erb | 2 +- app/views/components/_publisher-metadata.html.erb | 2 +- app/views/content_items/_document_collection_body.html.erb | 2 +- app/views/content_items/travel_advice.html.erb | 2 +- test/components/important_metadata_test.rb | 2 +- test/components/publisher_metadata_test.rb | 2 +- test/integration/document_collection_test.rb | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/presenters/content_item/brexit_notice.rb b/app/presenters/content_item/brexit_notice.rb index d68284d7d..7df23282d 100644 --- a/app/presenters/content_item/brexit_notice.rb +++ b/app/presenters/content_item/brexit_notice.rb @@ -36,7 +36,7 @@ def brexit_notice_link_intro def brexit_landing_page_cta data_attributes = { - "module": "track-click", + "module": "gem-track-click", "track-category": "no_deal_notice", "track-action": "/transition", "track-label": "Get your personalised list of actions", @@ -56,7 +56,7 @@ def brexit_links title: link["title"], href: link["href"], data_attributes: { - "module": "track-click", + "module": "gem-track-click", "track-category": "no_deal_notice", "track-action": link["href"], "track-label": link["title"], diff --git a/app/views/components/_important-metadata.html.erb b/app/views/components/_important-metadata.html.erb index 21cea1c57..ca50428ba 100644 --- a/app/views/components/_important-metadata.html.erb +++ b/app/views/components/_important-metadata.html.erb @@ -10,7 +10,7 @@ <% if title %> <% end %> -
+
<% items.each do |title, definition| %> diff --git a/app/views/components/_publisher-metadata.html.erb b/app/views/components/_publisher-metadata.html.erb index 4a19bf4d1..826d5b443 100644 --- a/app/views/components/_publisher-metadata.html.erb +++ b/app/views/components/_publisher-metadata.html.erb @@ -11,7 +11,7 @@ <%= render 'components/published-dates', published: published, last_updated: last_updated, link_to_history: link_to_history %> <% if other_has_values %> -
+
<%= render 'components/back-to-top', href: "#contents" %> -