diff --git a/Gemfile b/Gemfile index 783a6e035..2a439c4f4 100644 --- a/Gemfile +++ b/Gemfile @@ -12,12 +12,11 @@ gem 'rails-i18n', '>= 4.0.4' gem 'rails_translation_manager', '~> 0.1.0' gem 'sass-rails', '~> 5.0' gem 'uglifier', '>= 1.3.0' - gem 'gds-api-adapters', '~> 60.0' gem 'govuk_ab_testing', '~> 2.4' gem 'govuk_app_config', '~> 2.0' gem 'govuk_frontend_toolkit', '~> 8.2.0' -gem 'govuk_publishing_components', '~> 17.21.0' +gem 'govuk_publishing_components', '~> 19.0.0' gem 'plek', '~> 3.0' gem 'slimmer', '~> 13.1' @@ -28,6 +27,7 @@ group :development, :test do end group :development do + gem 'pry' gem 'better_errors' gem 'binding_of_caller' gem 'wraith', '~> 4.2' diff --git a/Gemfile.lock b/Gemfile.lock index 85d4032e8..938b0901b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -70,7 +70,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (~> 1.5) xpath (~> 3.2) - childprocess (1.0.1) + childprocess (2.0.0) rake (< 13.0) chromedriver-helper (1.2.0) archive-zip (~> 0.10) @@ -114,7 +114,7 @@ GEM govuk_frontend_toolkit (8.2.0) railties (>= 3.1.0) sass (>= 3.2.0) - govuk_publishing_components (17.21.0) + govuk_publishing_components (19.0.0) gds-api-adapters govuk_app_config govuk_frontend_toolkit @@ -138,7 +138,7 @@ GEM domain_name (~> 0.5) i18n (1.6.0) concurrent-ruby (~> 1.0) - image_size (2.0.1) + image_size (2.0.2) io-like (0.3.0) jaro_winkler (1.5.3) jasmine-core (3.4.0) @@ -147,7 +147,7 @@ GEM phantomjs (>= 1.9) railties (>= 3.2.0) sprockets-rails - json (2.1.0) + json (2.2.0) json-schema (2.8.1) addressable (>= 2.4) kgio (2.11.2) @@ -172,7 +172,7 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2019.0331) mimemagic (0.3.3) - mini_magick (4.9.4) + mini_magick (4.9.5) mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.11.3) @@ -185,17 +185,20 @@ GEM metaclass (~> 0.0.1) multipart-post (2.1.1) netrc (0.11.0) - nio4r (2.4.0) + nio4r (2.5.1) nokogiri (1.10.4) mini_portile2 (~> 2.4.0) null_logger (0.0.1) parallel (1.17.0) - parser (2.6.3.0) + parser (2.6.4.0) ast (~> 2.4.0) phantomjs (2.1.1.0) plek (3.0.0) + pry (0.12.2) + coderay (~> 1.1.0) + method_source (~> 0.9.0) public_suffix (4.0.1) - puma (4.0.0) + puma (4.1.0) nio4r (~> 2.0) rack (2.0.7) rack-cache (1.9.0) @@ -223,7 +226,7 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.1.0) + rails-html-sanitizer (1.2.0) loofah (~> 2.2, >= 2.2.2) rails-i18n (5.1.3) i18n (>= 0.7, < 2) @@ -252,18 +255,18 @@ GEM mime-types (>= 1.16, < 4.0) netrc (~> 0.8) robotex (1.0.0) - rouge (3.7.0) - rubocop (0.72.0) + rouge (3.10.0) + rubocop (0.74.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) parser (>= 2.6) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.7) - rubocop-rails (2.2.0) + rubocop-rails (2.3.2) rack (>= 1.1) rubocop (>= 0.72.0) - rubocop-rspec (1.33.0) + rubocop-rspec (1.35.0) rubocop (>= 0.60.0) ruby-progressbar (1.10.1) rubyzip (1.2.3) @@ -273,15 +276,14 @@ GEM sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - sass-rails (5.0.7) - railties (>= 4.0.0, < 6) + sass-rails (5.1.0) + railties (>= 5.2.0) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sassc (2.0.1) + sassc (2.2.0) ffi (~> 1.9) - rake sassc-rails (2.1.2) railties (>= 4.0.0) sassc (>= 2.0) @@ -291,8 +293,8 @@ GEM scss_lint (0.58.0) rake (>= 0.9, < 13) sass (~> 3.5, >= 3.5.5) - selenium-webdriver (3.142.3) - childprocess (>= 0.5, < 2.0) + selenium-webdriver (3.142.4) + childprocess (>= 0.5, < 3.0) rubyzip (~> 1.2, >= 1.2.2) sentry-raven (2.11.0) faraday (>= 0.7.6, < 1.0) @@ -326,7 +328,7 @@ GEM unicorn (5.5.1) kgio (~> 2.6) raindrops (~> 0.7) - webdrivers (4.0.1) + webdrivers (4.1.2) nokogiri (~> 1.6) rubyzip (~> 1.0) selenium-webdriver (>= 3.0, < 4.0) @@ -366,7 +368,7 @@ DEPENDENCIES govuk_ab_testing (~> 2.4) govuk_app_config (~> 2.0) govuk_frontend_toolkit (~> 8.2.0) - govuk_publishing_components (~> 17.21.0) + govuk_publishing_components (~> 19.0.0) govuk_schemas (~> 4.0) govuk_test htmlentities (~> 4.3) @@ -374,6 +376,7 @@ DEPENDENCIES minitest-reporters mocha plek (~> 3.0) + pry rack_strip_client_ip (~> 0.0.2) rails (~> 5.2.3) rails-controller-testing (~> 1.0) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index c276cdbac..c4675b49e 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,13 +1,16 @@ // The main application stylesheet +$govuk-use-legacy-palette: true; +$govuk-typography-use-rem: false; + +// govuk_frontend_toolkit dependencies +@import "typography"; +@import "colours"; +@import "grid_layout"; + // Components from govuk_publishing_components gem @import 'govuk_publishing_components/all_components'; -// govuk_frontend_toolkit imports -@import 'colours'; -@import 'shims'; -@import 'typography'; - // government-frontend mixins @import 'mixins/margins'; @import 'mixins/white-links'; diff --git a/app/assets/stylesheets/components/_back-to-top.scss b/app/assets/stylesheets/components/_back-to-top.scss index 8ef60a2ba..6d786c4f0 100644 --- a/app/assets/stylesheets/components/_back-to-top.scss +++ b/app/assets/stylesheets/components/_back-to-top.scss @@ -1,9 +1,12 @@ .app-c-back-to-top { - @include core-16; display: inline-block; margin-bottom: govuk-spacing(3); margin-left: govuk-spacing(3); margin-right: govuk-spacing(3); + + &:focus { + @include govuk-focused-text; + } } .app-c-back-to-top__icon { @@ -12,3 +15,4 @@ width: .8em; height: .968em; } + diff --git a/app/assets/stylesheets/components/_contents-list-with-body.scss b/app/assets/stylesheets/components/_contents-list-with-body.scss index ebb19b180..fbabb6598 100644 --- a/app/assets/stylesheets/components/_contents-list-with-body.scss +++ b/app/assets/stylesheets/components/_contents-list-with-body.scss @@ -36,7 +36,6 @@ } .app-c-back-to-top { - color: $link-colour; margin-bottom: 0; padding: govuk-spacing(3); width: percentage(2 / 3); @@ -46,15 +45,4 @@ } } - .app-c-back-to-top:focus { - outline: 0; - } - - .app-c-back-to-top:hover { - color: $link-hover-colour; - } - - .app-c-back-to-top:active { - color: $link-active-colour; - } } diff --git a/app/assets/stylesheets/components/_download-link.scss b/app/assets/stylesheets/components/_download-link.scss index 01245ba06..7ab54482c 100644 --- a/app/assets/stylesheets/components/_download-link.scss +++ b/app/assets/stylesheets/components/_download-link.scss @@ -4,9 +4,14 @@ margin-top: govuk-spacing(3); margin-bottom: govuk-spacing(3); + &:focus { + @include govuk-focused-text; + } + @include media(tablet) { margin-top: govuk-spacing(6); } + } .app-c-download-link__icon { diff --git a/app/assets/stylesheets/components/_important-metadata.scss b/app/assets/stylesheets/components/_important-metadata.scss index 01af03fd0..4175d88c6 100644 --- a/app/assets/stylesheets/components/_important-metadata.scss +++ b/app/assets/stylesheets/components/_important-metadata.scss @@ -1,5 +1,4 @@ .app-c-important-metadata { - @include core-16; @include white-links; background: $govuk-blue; color: $white; @@ -30,4 +29,8 @@ .app-c-important-metadata__definition { font-weight: bold; + + a:focus { + @include govuk-focused-text; + } } diff --git a/app/assets/stylesheets/components/_print-link.scss b/app/assets/stylesheets/components/_print-link.scss index 67de70549..89f1eabc4 100644 --- a/app/assets/stylesheets/components/_print-link.scss +++ b/app/assets/stylesheets/components/_print-link.scss @@ -3,12 +3,17 @@ margin-bottom: 2em; .app-c-print-link__link { - background: image-url("icon-print.png") no-repeat 0 50%; - padding: 0.5em 0 0.5em 28px; + background: image-url("icon-print.png") no-repeat 10px 50%; + padding: 0.5em 0.5em 0.5em 38px; + margin-left: -10px; @include device-pixel-ratio() { background-image: image-url("icon-print-2x.png"); background-size: 16px 18px; } + + &:focus { + @include govuk-focused-text; + } } } diff --git a/app/assets/stylesheets/components/_published-dates.scss b/app/assets/stylesheets/components/_published-dates.scss index a07ea7658..922b6cebe 100644 --- a/app/assets/stylesheets/components/_published-dates.scss +++ b/app/assets/stylesheets/components/_published-dates.scss @@ -1,16 +1,26 @@ .app-c-published-dates { - @include core-16; direction: ltr; + line-height: 1.45em; } .app-c-published-dates__toggle { display: none; + &:focus { + @include govuk-focused-text; + } + .js-enabled & { display: inline-block; } } +.app-c-published-dates__history-link { + &:focus { + @include govuk-focused-text; + } +} + .app-c-published-dates__change-history { margin: 20px 0; } diff --git a/app/assets/stylesheets/components/_publisher-metadata.scss b/app/assets/stylesheets/components/_publisher-metadata.scss index 168167b9e..2ff229647 100644 --- a/app/assets/stylesheets/components/_publisher-metadata.scss +++ b/app/assets/stylesheets/components/_publisher-metadata.scss @@ -1,12 +1,15 @@ .app-c-publisher-metadata { @include responsive-bottom-margin; - @include core-16; direction: ltr; padding-top: govuk-spacing(3); } .app-c-publisher-metadata__other a { font-weight: bold; + + &:focus { + @include govuk-focused-text; + } } .app-c-publisher-metadata__term { diff --git a/app/assets/stylesheets/components/helpers/_variables.scss b/app/assets/stylesheets/components/helpers/_variables.scss index 188f04c1e..e2fe0d9c1 100644 --- a/app/assets/stylesheets/components/helpers/_variables.scss +++ b/app/assets/stylesheets/components/helpers/_variables.scss @@ -20,6 +20,5 @@ $app-border-width-form-element: 2px; // Focus $app-focus-width: 3px; -$app-focus-colour: $focus-colour; $app-error-colour: $red; diff --git a/app/assets/stylesheets/helpers/_parts.scss b/app/assets/stylesheets/helpers/_parts.scss index 7c2a03c6c..56a2eec8c 100644 --- a/app/assets/stylesheets/helpers/_parts.scss +++ b/app/assets/stylesheets/helpers/_parts.scss @@ -27,6 +27,10 @@ a { display: block; + + &:focus { + @include govuk-focused-text; + } } } } diff --git a/app/views/components/_published-dates.html.erb b/app/views/components/_published-dates.html.erb index 5c3328508..ab7f85fcf 100644 --- a/app/views/components/_published-dates.html.erb +++ b/app/views/components/_published-dates.html.erb @@ -14,7 +14,7 @@ <% if last_updated %> <% if published %>
<% end %>Last updated <%= last_updated %> <% if link_to_history && history.empty? %> - — <%= t('components.published_dates.see_all_updates', locale: :en) %> + — <%= t('components.published_dates.see_all_updates', locale: :en) %> <% elsif history.any? %>