From 3aa311d3a23d08d054899e33fc33e5c59b313cc9 Mon Sep 17 00:00:00 2001 From: Chris Yoong Date: Fri, 14 May 2021 17:55:19 +0100 Subject: [PATCH 1/9] Swapping to use gem_layout Updating frontend to use the gem_layout --- app/assets/stylesheets/application.scss | 3 +-- app/assets/stylesheets/print.scss | 2 +- app/controllers/application_controller.rb | 2 +- app/controllers/calendar_controller.rb | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 606d0d8445..612a9ceee8 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,11 +1,10 @@ -$govuk-compatibility-govuktemplate: true; +$govuk-compatibility-govuktemplate: false; $govuk-use-legacy-palette: false; // BASE Stylesheet // Components from govuk_publishing_components gem @import 'govuk_publishing_components/govuk_frontend_support'; -@import 'govuk_publishing_components/component_support'; @import 'govuk_publishing_components/components/back-link'; @import 'govuk_publishing_components/components/breadcrumbs'; @import 'govuk_publishing_components/components/button'; diff --git a/app/assets/stylesheets/print.scss b/app/assets/stylesheets/print.scss index b168843f45..0a0cbe6a87 100644 --- a/app/assets/stylesheets/print.scss +++ b/app/assets/stylesheets/print.scss @@ -1,4 +1,4 @@ -$govuk-compatibility-govuktemplate: true; +$govuk-compatibility-govuktemplate: false; $govuk-use-legacy-palette: false; @import 'govuk_publishing_components/govuk_frontend_support'; diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 4c2ef0b957..9cd30e1a3d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -11,7 +11,7 @@ class ApplicationController < ActionController::Base rescue_from GdsApi::HTTPForbidden, with: :error_403 rescue_from RecordNotFound, with: :cacheable_404 - slimmer_template "core_layout" + slimmer_template "gem_layout" if ENV["BASIC_AUTH_USERNAME"] http_basic_authenticate_with( diff --git a/app/controllers/calendar_controller.rb b/app/controllers/calendar_controller.rb index 4dc496709d..65fedfe804 100644 --- a/app/controllers/calendar_controller.rb +++ b/app/controllers/calendar_controller.rb @@ -6,7 +6,7 @@ class CalendarController < ApplicationController rescue_from Calendar::CalendarNotFound, with: :simple_404 - slimmer_template "core_layout" + slimmer_template "gem_layout" def calendar set_expiry 1.hour From fbe790404901d60be5c3284444fe9366d7b337de Mon Sep 17 00:00:00 2001 From: Chris Yoong Date: Mon, 31 May 2021 12:29:42 +0100 Subject: [PATCH 2/9] Update to layouts Changing some templates to use the full-width layout. Change layout & dependancies - Remove redundant feedback element (appeared twice on page) - Example Page: /find-local-council Update to resolve visual differences for frontend swap, changes resolve a border that is around the lookup element Remove borders / padding from swap on: "/foreign-travel-advice" to maintain existing visuals. --- app/assets/stylesheets/application.scss | 5 ++- app/assets/stylesheets/views/_homepage.scss | 31 ++----------------- .../stylesheets/views/_travel-advice.scss | 4 ++- app/controllers/help_controller.rb | 4 +-- app/controllers/homepage_controller.rb | 4 +-- app/controllers/roadmap_controller.rb | 2 +- app/controllers/travel_advice_controller.rb | 4 ++- app/views/application/_location_form.html.erb | 26 +++++++++------- app/views/find_local_council/index.html.erb | 10 +++--- app/views/layouts/application.html.erb | 12 ++----- app/views/place/_option.html.erb | 6 ++-- .../place/_option_report_child_abuse.html.erb | 2 +- .../unit/foreign-travel-advice.spec.js | 12 +++---- 13 files changed, 46 insertions(+), 76 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 612a9ceee8..32f11a0aab 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,8 +1,6 @@ $govuk-compatibility-govuktemplate: false; $govuk-use-legacy-palette: false; -// BASE Stylesheet - // Components from govuk_publishing_components gem @import 'govuk_publishing_components/govuk_frontend_support'; @import 'govuk_publishing_components/components/back-link'; @@ -14,6 +12,7 @@ $govuk-use-legacy-palette: false; @import 'govuk_publishing_components/components/error-alert'; @import 'govuk_publishing_components/components/error-message'; @import 'govuk_publishing_components/components/feedback'; +@import 'govuk_publishing_components/components/fieldset'; @import 'govuk_publishing_components/components/govspeak'; @import 'govuk_publishing_components/components/heading'; @import 'govuk_publishing_components/components/hint'; @@ -40,7 +39,7 @@ $govuk-use-legacy-palette: false; @import 'govuk_publishing_components/components/title'; @import 'govuk_publishing_components/components/warning-text'; -// components +// local app components @import "components/calendar"; @import "components/metadata"; @import "components/subscribe"; diff --git a/app/assets/stylesheets/views/_homepage.scss b/app/assets/stylesheets/views/_homepage.scss index a405fe01cc..da7b91a206 100644 --- a/app/assets/stylesheets/views/_homepage.scss +++ b/app/assets/stylesheets/views/_homepage.scss @@ -1,30 +1,3 @@ -// Remove search from the top bar as we have one in the content. - -// stylelint-disable selector-no-qualifying-type, selector-max-id -body.homepage { - #global-header-bar { - display: none; - } - - #wrapper, - #content { - margin: 0; - width: auto; // needed for IE overides - max-width: 100%; - } - - .feedback-wrapper { - max-width: 960px; - margin: 0 auto; - padding: 0 govuk-spacing(3); - - @include govuk-media-query($from: tablet) { - padding: 0 govuk-spacing(6); - } - } -} -// stylelint-enable selector-no-qualifying-type, selector-max-id - .home-top { overflow: hidden; background: $govuk-brand-colour; @@ -42,7 +15,7 @@ body.homepage { .home-top__intro--simpler { font-weight: bold; - margin-bottom: 20px; + margin-bottom: govuk-spacing(4); } .home-top__links { @@ -180,7 +153,7 @@ body.homepage { .home-numbers__large { // Manually setting font-size rather than using the mixins size - // because the layout doesnt really work otherwise + // because the layout doesn't really work otherwise font-size: 53px; line-height: (55 / 53); font-weight: bold; diff --git a/app/assets/stylesheets/views/_travel-advice.scss b/app/assets/stylesheets/views/_travel-advice.scss index 855a8ddf29..6dce7662e0 100644 --- a/app/assets/stylesheets/views/_travel-advice.scss +++ b/app/assets/stylesheets/views/_travel-advice.scss @@ -8,7 +8,9 @@ } .country-filter-form__form-group { - margin: 0; // Because fieldset has 2px margins by default. + border: 0; + margin: 0; + padding: 0; } .subscriptions-wrapper { diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb index 991b423d74..59607b51ef 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -3,12 +3,12 @@ class HelpController < ApplicationController def index fetch_and_setup_content_item("/help") - render locals: { full_width: true } + slimmer_template "gem_layout" end def tour fetch_and_setup_content_item("/tour") - render locals: { full_width: true } + slimmer_template "gem_layout" end def cookie_settings diff --git a/app/controllers/homepage_controller.rb b/app/controllers/homepage_controller.rb index 390e5588fd..fdd4ca10b6 100644 --- a/app/controllers/homepage_controller.rb +++ b/app/controllers/homepage_controller.rb @@ -3,12 +3,10 @@ class HomepageController < ApplicationController def index set_slimmer_headers( - template: "core_layout", + template: "gem_layout_full_width", remove_search: true, ) fetch_and_setup_content_item("/") - - render locals: { full_width: true } end end diff --git a/app/controllers/roadmap_controller.rb b/app/controllers/roadmap_controller.rb index 1bd87b0b86..a924d1ab67 100644 --- a/app/controllers/roadmap_controller.rb +++ b/app/controllers/roadmap_controller.rb @@ -2,6 +2,6 @@ class RoadmapController < ApplicationController include Cacheable def index - render locals: { full_width: true } + slimmer_template "gem_layout" end end diff --git a/app/controllers/travel_advice_controller.rb b/app/controllers/travel_advice_controller.rb index ede7e29c65..64dbb618cf 100644 --- a/app/controllers/travel_advice_controller.rb +++ b/app/controllers/travel_advice_controller.rb @@ -7,7 +7,9 @@ def index @presenter = TravelAdviceIndexPresenter.new(@content_item) respond_to do |format| - format.html { render locals: { full_width: true } } + format.html do + slimmer_template "gem_layout" + end format.atom do set_expiry(5.minutes) headers["Access-Control-Allow-Origin"] = "*" diff --git a/app/views/application/_location_form.html.erb b/app/views/application/_location_form.html.erb index 53bf44e3f7..892628c9d0 100644 --- a/app/views/application/_location_form.html.erb +++ b/app/views/application/_location_form.html.erb @@ -1,7 +1,7 @@
+ data-module="track-submit" + data-track-category="postcodeSearch:<%= publication_format %>" + data-track-action="postcodeSearchStarted"> <% if @location_error %> <% @@ -23,8 +23,8 @@ <% end %>
-
- <%= t('formats.local_transaction.postcode_lookup') %> +
+ Postcode lookup <%= render partial: 'draft_fields' %> @@ -40,14 +40,18 @@ autocomplete: "postal-code", } %> - <%= render "govuk_publishing_components/components/button", text: "Find", margin_bottom: true %> + <%= render "govuk_publishing_components/components/button", + text: "Find", + margin_bottom: true + %> <%= tag.p link_to(t('formats.local_transaction.find_postcode_royal_mail'), - "https://www.royalmail.com/find-a-postcode", - id: 'postcode-finder-link', - class: "govuk-link", - rel: "external"), - class: "govuk-body" %> + "https://www.royalmail.com/find-a-postcode", + id: 'postcode-finder-link', + class: "govuk-link", + rel: "external"), + class: "govuk-body" + %>
diff --git a/app/views/find_local_council/index.html.erb b/app/views/find_local_council/index.html.erb index 06fcc02a67..1766544751 100644 --- a/app/views/find_local_council/index.html.erb +++ b/app/views/find_local_council/index.html.erb @@ -1,9 +1,9 @@ <%= render layout: 'base_page' do %>

<%= t('formats.local_transaction.find_council_website') %>

<%= render partial: 'location_form', - locals: { - format: 'service', - publication_format: 'find_local_council', - postcode: @postcode, - } %> + locals: { + format: 'service', + publication_format: 'find_local_council', + postcode: @postcode, + } %> <% end %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 589dbf83c2..577fc2a448 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -41,20 +41,12 @@ <% end %> <% if local_assigns.exclude?(:full_width) %> -
- <%= yield %> -
-
- <%= yield :after_content %> -
+ <%= yield %> + <%= yield :after_content %> <% else %> <%= yield %> <%= yield :after_content %> <% end %> - - diff --git a/app/views/place/_option.html.erb b/app/views/place/_option.html.erb index 041b9d9f89..b0e5dbbfa5 100644 --- a/app/views/place/_option.html.erb +++ b/app/views/place/_option.html.erb @@ -7,15 +7,15 @@

<% if place["name"].present? %> - <%= place["name"] %>, + <%= place["name"] %>, <% end %> <% if place["address"].present? %> -
<%= place["address"] %>, +
<%= place["address"] %>, <% end %> <% if place["town"].present? %> -
<%= place["town"] %>, +
<%= place["town"] %>, <% end %> <% if place["postcode"].present? %> diff --git a/app/views/place/_option_report_child_abuse.html.erb b/app/views/place/_option_report_child_abuse.html.erb index aceac6bdf2..81f4ed763b 100644 --- a/app/views/place/_option_report_child_abuse.html.erb +++ b/app/views/place/_option_report_child_abuse.html.erb @@ -32,7 +32,7 @@ <% if place["url"].present? %>

- "><%= t('place.go_to_website') %> + " class="govuk-link">Go to their website

<% end %> diff --git a/spec/javascripts/unit/foreign-travel-advice.spec.js b/spec/javascripts/unit/foreign-travel-advice.spec.js index f60dcf95a8..e48ab93dd6 100644 --- a/spec/javascripts/unit/foreign-travel-advice.spec.js +++ b/spec/javascripts/unit/foreign-travel-advice.spec.js @@ -3,7 +3,7 @@ var GOVUKTest = { countryFilter: { threeCategories: '
' + '

' + - 'Countries starting with W

' + + 'Countries starting with W' + '
' + '
' + '

' + - 'Countries starting with Y

' + + 'Countries starting with Y' + '' + '
' + '
' + '

' + - 'Countries starting with Z

' + + 'Countries starting with Z' + '
    ' + '
  • Zambia
  • ' + '
  • Zimbabwe
  • ' + @@ -31,7 +31,7 @@ GOVUKTest.countryFilter.categories = { allWithCountries: '
    ' + GOVUKTest.countryFilter.threeCategories + '
    ', twoWithoutCountries: '
    ' + '

    ' + - 'Countries starting with W

    ' + + 'Countries starting with W' + '
    ' + '
    ' + '

    ' + - 'Countries starting with Y

    ' + + 'Countries starting with Y' + '' + '
    ' + '
    ' + '

    ' + - 'Countries starting with Z

    ' + + 'Countries starting with Z' + '
      ' + '
    • Zambia
    • ' + '
    • Zimbabwe
    • ' + From f42857afbabc764b4adf26cc63311b0e5d19599f Mon Sep 17 00:00:00 2001 From: Chris Yoong Date: Mon, 31 May 2021 16:33:48 +0100 Subject: [PATCH 3/9] Update links to include Design System class --- app/views/place/_option_report_child_abuse.html.erb | 4 ++-- app/views/travel_advice/index.html.erb | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/place/_option_report_child_abuse.html.erb b/app/views/place/_option_report_child_abuse.html.erb index 81f4ed763b..cfaacd4f45 100644 --- a/app/views/place/_option_report_child_abuse.html.erb +++ b/app/views/place/_option_report_child_abuse.html.erb @@ -16,7 +16,7 @@ <% if place["phone"].present? %>

      <% phone_digits = phone_digits(place["phone"]) %> - <%= phone_digits %> + <%= phone_digits %> <%= phone_text(place["phone"]) %>

      <% end %> @@ -24,7 +24,7 @@ <% if place["general_notes"].present? %>

      <% out_of_hours_digits = phone_digits(place["general_notes"]) %> - <%= out_of_hours_digits %> + <%= out_of_hours_digits %> <%= phone_text(place["general_notes"]) %>

      <% end %> diff --git a/app/views/travel_advice/index.html.erb b/app/views/travel_advice/index.html.erb index 2379f302be..31580c321d 100644 --- a/app/views/travel_advice/index.html.erb +++ b/app/views/travel_advice/index.html.erb @@ -27,16 +27,16 @@

    - Follow current COVID-19 rules where you live: England, Scotland, Wales and Northern Ireland. + Follow current COVID-19 rules where you live: England, Scotland, Wales and Northern Ireland.

    - To prevent new COVID variants from entering the UK, you should not travel to amber or red list countries. + To prevent new COVID variants from entering the UK, you should not travel to amber or red list countries.

    - To understand the risks in a country follow FCDO Travel Advice. + To understand the risks in a country follow FCDO Travel Advice.

    - When you return, follow the rules to enter the UK from abroad (except from Ireland). + When you return, follow the rules to enter the UK from abroad (except from Ireland).

From 83da3c6672756f8488c80a094f846464eaaaa62e Mon Sep 17 00:00:00 2001 From: Chris Yoong Date: Mon, 31 May 2021 17:07:52 +0100 Subject: [PATCH 4/9] Remove border from locator form + add margin to replace spacing between lookup and feedback. eg: /find-local-council --- app/views/application/_location_form.html.erb | 4 ++-- app/views/electoral/_form.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/application/_location_form.html.erb b/app/views/application/_location_form.html.erb index 892628c9d0..b15f7c9df6 100644 --- a/app/views/application/_location_form.html.erb +++ b/app/views/application/_location_form.html.erb @@ -22,9 +22,9 @@ } %> <% end %> -
+
- Postcode lookup + <%= t('formats.local_transaction.postcode_lookup') %> <%= render partial: 'draft_fields' %> diff --git a/app/views/electoral/_form.html.erb b/app/views/electoral/_form.html.erb index cb4d3ec602..02c9e58f22 100644 --- a/app/views/electoral/_form.html.erb +++ b/app/views/electoral/_form.html.erb @@ -26,8 +26,8 @@ method: :get, id: "local-locator-form", class: "location-form" do |form| %> - <%= tag.fieldset do %> - <%= tag.legend t('formats.local_transaction.postcode_lookup'), class: "govuk-visually-hidden" %> + <%= tag.fieldset class: "govuk-fieldset" do %> + <%= tag.legend t('formats.local_transaction.postcode_lookup'), class: "govuk-fieldset__legend govuk-visually-hidden" %> <%= render partial: 'draft_fields' %> <%= render "govuk_publishing_components/components/input", { From 1a6da4d9d1b90b09034816e15b221103ebfee8a8 Mon Sep 17 00:00:00 2001 From: Chris Yoong Date: Mon, 31 May 2021 17:11:59 +0100 Subject: [PATCH 5/9] Update base and cookie to DS Adjust grid to match Design System + slight margin adjustments to mimic current design --- app/views/help/cookie_settings.html.erb | 242 ++++++++++++------------ app/views/shared/_base_page.html.erb | 45 +++-- 2 files changed, 150 insertions(+), 137 deletions(-) diff --git a/app/views/help/cookie_settings.html.erb b/app/views/help/cookie_settings.html.erb index 7ba040a985..d7f78867f1 100644 --- a/app/views/help/cookie_settings.html.erb +++ b/app/views/help/cookie_settings.html.erb @@ -1,136 +1,140 @@ <% content_for :title, "Cookies on GOV.UK" %> -
- - - <%= render "govuk_publishing_components/components/title", { - title: t('cookies.cookies_on_govuk') - } %> - <%= render "govuk_publishing_components/components/govspeak", { - } do %> -

<%= t('cookies.explanation') %>

-

<%= t('cookies.how_we_use') %>

- <% end %> +
+
+
+ - <%= render "govuk_publishing_components/components/heading", { - text: t('cookies.cookie_settings'), - padding: true, - heading_level: 2, - margin_bottom: 3 - } %> + <%= render "govuk_publishing_components/components/title", { + title: t('cookies.cookies_on_govuk'), + margin_top: 0, + } %> - +

<%= t('cookies.explanation') %>

+

<%= t('cookies.how_we_use') %>

+ <% end %> -
diff --git a/app/views/shared/_base_page.html.erb b/app/views/shared/_base_page.html.erb index 6acaf584f1..39cc1697c7 100644 --- a/app/views/shared/_base_page.html.erb +++ b/app/views/shared/_base_page.html.erb @@ -1,24 +1,33 @@ -
> - - -
-
-
- <%= yield %> +
> +
+ +
+
+
+ <%= yield %> +
+ <%= render 'shared/publication_metadata', :publication => publication %>
- <%= render 'shared/publication_metadata', :publication => publication %> -
-
-
- <%= render 'govuk_publishing_components/components/contextual_sidebar', content_item: @content_item %> -
+
+ <%= render 'govuk_publishing_components/components/contextual_sidebar', + content_item: @content_item + %> +
-<% content_for :after_content do %> -
- <%= render 'govuk_publishing_components/components/contextual_footer', content_item: @content_item %> + <% content_for :after_content do %> +
+ <%= render 'govuk_publishing_components/components/contextual_footer', + content_item: @content_item + %> +
+
+ <% end %> From 4678a818319a2573b007c937e8fce0a007a08ef1 Mon Sep 17 00:00:00 2001 From: Chris Yoong Date: Mon, 31 May 2021 16:33:40 +0100 Subject: [PATCH 6/9] Update with Design System Grid - Update "/settle-in-the-uk" flow to use Design System grid, - Remove redundant CSS - Adjust Design to maintain or align. --- app/assets/stylesheets/application.scss | 2 - .../stylesheets/helpers/_overwrites.scss | 16 ---- .../views/_simple-smart-answer.scss | 4 - .../simple_smart_answers/_outcome.html.erb | 1 + app/views/simple_smart_answers/flow.html.erb | 79 ++++++++++--------- 5 files changed, 42 insertions(+), 60 deletions(-) delete mode 100644 app/assets/stylesheets/helpers/_overwrites.scss delete mode 100644 app/assets/stylesheets/views/_simple-smart-answer.scss diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 32f11a0aab..4e8c1dcef2 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -48,7 +48,6 @@ $govuk-use-legacy-palette: false; @import "styleguide/conditionals"; // Helper stylesheets (things on more than one page layout) -@import "helpers/overwrites"; @import "helpers/truncated-url"; @import "helpers/title-context-reset"; @@ -60,7 +59,6 @@ $govuk-use-legacy-palette: false; @import "views/travel-advice"; @import "views/report-child-abuse"; @import "views/local-authority"; -@import "views/simple-smart-answer"; // exceptional format overrides @import "views/location_form"; diff --git a/app/assets/stylesheets/helpers/_overwrites.scss b/app/assets/stylesheets/helpers/_overwrites.scss deleted file mode 100644 index cdd08a97d1..0000000000 --- a/app/assets/stylesheets/helpers/_overwrites.scss +++ /dev/null @@ -1,16 +0,0 @@ -.gem-c-fieldset { - .govuk-fieldset__legend { - font-weight: bold; - } -} - -.govuk-fieldset__legend { - .gem-c-title__text { - margin-top: govuk-spacing(8); - margin-bottom: govuk-spacing(8); - } -} - -.gem-c-summary-list { - border: 0; -} diff --git a/app/assets/stylesheets/views/_simple-smart-answer.scss b/app/assets/stylesheets/views/_simple-smart-answer.scss deleted file mode 100644 index e5bd5d2108..0000000000 --- a/app/assets/stylesheets/views/_simple-smart-answer.scss +++ /dev/null @@ -1,4 +0,0 @@ -.simple-smart-answer__question-and-outcome { - padding-top: govuk-spacing(8); - padding-bottom: govuk-spacing(6); -} diff --git a/app/views/simple_smart_answers/_outcome.html.erb b/app/views/simple_smart_answers/_outcome.html.erb index b3b3534da2..ce21e65a56 100644 --- a/app/views/simple_smart_answers/_outcome.html.erb +++ b/app/views/simple_smart_answers/_outcome.html.erb @@ -8,6 +8,7 @@ context: @publication.title, font_size: "l", margin_bottom: 4, + margin_top: 0, average_title_length: "long", title: outcome.title, } %> diff --git a/app/views/simple_smart_answers/flow.html.erb b/app/views/simple_smart_answers/flow.html.erb index 8d0117d761..34265fa626 100644 --- a/app/views/simple_smart_answers/flow.html.erb +++ b/app/views/simple_smart_answers/flow.html.erb @@ -2,44 +2,47 @@ <% end %> -
-
- <% if @flow_state.current_node.outcome? %> - <%= render partial: "outcome", object: @flow_state.current_node %> - <% else %> - <%= render partial: "current_question", locals: { - question: @flow_state.current_node, - } %> - <% end %> -
- <% if @flow_state.completed_questions.any? %> -
- <%= render "govuk_publishing_components/components/heading", { - font_size: "m", - heading_level: 2, - margin_bottom: 4, - text: t("formats.simple_smart_answer.your_answers"), - } %> +
+
+
+
+ <% if @flow_state.current_node.outcome? %> + <%= render partial: "outcome", object: @flow_state.current_node %> + <% else %> + <%= render partial: "current_question", locals: { + question: @flow_state.current_node, + } %> + <% end %> +
+ <% if @flow_state.completed_questions.any? %> +
+ <%= render "govuk_publishing_components/components/heading", { + font_size: "m", + heading_level: 2, + margin_bottom: 4, + text: t("formats.simple_smart_answer.your_answers"), + } %> -

- <%= link_to( - t("formats.simple_smart_answer.start_again"), - simple_smart_answer_path(@publication.slug, :edition => @edition), - class: "govuk-link" - ) %> -

+

+ <%= link_to( + t("formats.simple_smart_answer.start_again"), + simple_smart_answer_path(@publication.slug, :edition => @edition), + class: "govuk-link" + ) %> +

- <%= render "govuk_publishing_components/components/summary_list", { - items: answer_summary_data, - } %> -
- <% end %> -
- -<% if @flow_state.current_node.outcome? %> -
- <%= render "govuk_publishing_components/components/contextual_sidebar", { - content_item: @content_item - } %> + <%= render "govuk_publishing_components/components/summary_list", { + items: answer_summary_data, + } %> +
+ <% end %> + + <% if @flow_state.current_node.outcome? %> +
+ <%= render "govuk_publishing_components/components/contextual_sidebar", { + content_item: @content_item + } %> +
+ <% end %> -<% end %> +
From 525c1bb56af8eb25d8f37626b10f51525dc986cc Mon Sep 17 00:00:00 2001 From: Chris Yoong Date: Mon, 31 May 2021 17:08:42 +0100 Subject: [PATCH 7/9] Remove conditional full-width Redundant as gem_layout_full_width replaces this. --- app/views/layouts/application.html.erb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 577fc2a448..457d468ed2 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -40,10 +40,7 @@ <%= render 'govuk_publishing_components/components/contextual_breadcrumbs', content_item: @content_item %> <% end %> - <% if local_assigns.exclude?(:full_width) %> - <%= yield %> - <%= yield :after_content %> - <% else %> + <% if local_assigns %> <%= yield %> <%= yield :after_content %> <% end %> From c0046ef0d9c04d02c35f5fcb236b8166f9d97b0d Mon Sep 17 00:00:00 2001 From: Chris Yoong Date: Mon, 31 May 2021 14:53:38 +0100 Subject: [PATCH 8/9] Update testing --- test/integration/transaction_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/transaction_test.rb b/test/integration/transaction_test.rb index 1daa20beac..8cdc772afd 100644 --- a/test/integration/transaction_test.rb +++ b/test/integration/transaction_test.rb @@ -227,7 +227,7 @@ class TransactionTest < ActionDispatch::IntegrationTest href: "http://cti-staging.voa.gov.uk/cti/inits.asp", ) - within "#content/header" do + within ".gem-c-title" do assert_has_component_title "Check your Council Tax band (staging)" end From 21360518e234d4a2f35b9976ace1dd497c1cfcab Mon Sep 17 00:00:00 2001 From: Chris Yoong Date: Tue, 1 Jun 2021 17:22:49 +0100 Subject: [PATCH 9/9] Remove legacy classes Update to remove redundant classes and tags --- app/views/find_local_council/_base_page.html.erb | 4 +--- app/views/help/cookie_settings.html.erb | 2 +- app/views/place/_option_report_child_abuse.html.erb | 2 +- app/views/shared/_base_page.html.erb | 4 ++-- app/views/travel_advice/index.html.erb | 4 ++-- test/integration/licence_test.rb | 2 +- test/integration/place_test.rb | 2 +- test/integration/transaction_test.rb | 2 +- test/integration/travel_advice_test.rb | 2 +- 9 files changed, 11 insertions(+), 13 deletions(-) diff --git a/app/views/find_local_council/_base_page.html.erb b/app/views/find_local_council/_base_page.html.erb index e5d8ca0f08..0c2a37c67b 100644 --- a/app/views/find_local_council/_base_page.html.erb +++ b/app/views/find_local_council/_base_page.html.erb @@ -5,9 +5,7 @@ <% end %>
- + <%= render "govuk_publishing_components/components/title", title: t('formats.local_transaction.find_council') %> <%= yield %>
diff --git a/app/views/help/cookie_settings.html.erb b/app/views/help/cookie_settings.html.erb index d7f78867f1..737014a504 100644 --- a/app/views/help/cookie_settings.html.erb +++ b/app/views/help/cookie_settings.html.erb @@ -1,6 +1,6 @@ <% content_for :title, "Cookies on GOV.UK" %> -
+
diff --git a/app/views/shared/_base_page.html.erb b/app/views/shared/_base_page.html.erb index 39cc1697c7..5edaade561 100644 --- a/app/views/shared/_base_page.html.erb +++ b/app/views/shared/_base_page.html.erb @@ -1,11 +1,11 @@
>
- +
diff --git a/app/views/travel_advice/index.html.erb b/app/views/travel_advice/index.html.erb index 31580c321d..6bde745f05 100644 --- a/app/views/travel_advice/index.html.erb +++ b/app/views/travel_advice/index.html.erb @@ -4,7 +4,7 @@ <% end %>
-
+
<%= render "govuk_publishing_components/components/title", { title: @presenter.title, @@ -43,7 +43,7 @@
- +
diff --git a/test/integration/licence_test.rb b/test/integration/licence_test.rb index 7a1cc752c1..9d864abd63 100644 --- a/test/integration/licence_test.rb +++ b/test/integration/licence_test.rb @@ -69,7 +69,7 @@ class LicenceTest < ActionDispatch::IntegrationTest end within "#content" do - within ".page-header" do + within ".gem-c-title" do assert_has_component_title "Licence to kill" end diff --git a/test/integration/place_test.rb b/test/integration/place_test.rb index a049742216..1d1aba8833 100644 --- a/test/integration/place_test.rb +++ b/test/integration/place_test.rb @@ -80,7 +80,7 @@ class PlacesTest < ActionDispatch::IntegrationTest end within "#content" do - within ".page-header" do + within ".gem-c-title" do assert_has_component_title "Find a passport interview office" end diff --git a/test/integration/transaction_test.rb b/test/integration/transaction_test.rb index 8cdc772afd..d6ef788d58 100644 --- a/test/integration/transaction_test.rb +++ b/test/integration/transaction_test.rb @@ -49,7 +49,7 @@ class TransactionTest < ActionDispatch::IntegrationTest end within "#content" do - within "header" do + within ".gem-c-title" do assert_has_component_title "Carrots" end diff --git a/test/integration/travel_advice_test.rb b/test/integration/travel_advice_test.rb index bb4623eeb6..e886f62e2f 100644 --- a/test/integration/travel_advice_test.rb +++ b/test/integration/travel_advice_test.rb @@ -30,7 +30,7 @@ def de_dup_spaces(string) assert page.has_selector?("#wrapper.travel-advice") within "#content" do - within "header" do + within ".gem-c-title" do assert page.has_content?("Foreign travel advice") end