Skip to content

Commit

Permalink
Merge pull request #1448 from alphagov/upgrade-to-publishing-componen…
Browse files Browse the repository at this point in the history
…ts-v18

Upgrade to publishing components v19
  • Loading branch information
maxgds authored Sep 5, 2019
2 parents 037c12b + a3091eb commit 843e07c
Show file tree
Hide file tree
Showing 14 changed files with 76 additions and 49 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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'
Expand Down
45 changes: 24 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -366,14 +368,15 @@ 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)
jasmine-rails
minitest-reporters
mocha
plek (~> 3.0)
pry
rack_strip_client_ip (~> 0.0.2)
rails (~> 5.2.3)
rails-controller-testing (~> 1.0)
Expand Down
13 changes: 8 additions & 5 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
6 changes: 5 additions & 1 deletion app/assets/stylesheets/components/_back-to-top.scss
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -12,3 +15,4 @@
width: .8em;
height: .968em;
}

12 changes: 0 additions & 12 deletions app/assets/stylesheets/components/_contents-list-with-body.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
}

.app-c-back-to-top {
color: $link-colour;
margin-bottom: 0;
padding: govuk-spacing(3);
width: percentage(2 / 3);
Expand All @@ -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;
}
}
5 changes: 5 additions & 0 deletions app/assets/stylesheets/components/_download-link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion app/assets/stylesheets/components/_important-metadata.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.app-c-important-metadata {
@include core-16;
@include white-links;
background: $govuk-blue;
color: $white;
Expand Down Expand Up @@ -30,4 +29,8 @@

.app-c-important-metadata__definition {
font-weight: bold;

a:focus {
@include govuk-focused-text;
}
}
9 changes: 7 additions & 2 deletions app/assets/stylesheets/components/_print-link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
12 changes: 11 additions & 1 deletion app/assets/stylesheets/components/_published-dates.scss
Original file line number Diff line number Diff line change
@@ -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;
}
Expand Down
5 changes: 4 additions & 1 deletion app/assets/stylesheets/components/_publisher-metadata.scss
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/components/helpers/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ $app-border-width-form-element: 2px;

// Focus
$app-focus-width: 3px;
$app-focus-colour: $focus-colour;

$app-error-colour: $red;
4 changes: 4 additions & 0 deletions app/assets/stylesheets/helpers/_parts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@

a {
display: block;

&:focus {
@include govuk-focused-text;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/views/components/_published-dates.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<% if last_updated %>
<% if published %><br /><% end %>Last updated <%= last_updated %>
<% if link_to_history && history.empty? %>
&mdash; <a href="#history"><%= t('components.published_dates.see_all_updates', locale: :en) %></a>
&mdash; <a href="#history" class="app-c-published-dates__history-link"><%= t('components.published_dates.see_all_updates', locale: :en) %></a>
<% elsif history.any? %>
<a href="#full-history"
class="app-c-published-dates__toggle"
Expand Down
2 changes: 1 addition & 1 deletion test/wraith/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ domains:
paths:
# Most visited Answers (19 April 2017)
answers_0: '/national-minimum-wage-rates'
answers_1: '/apply-uk-visa'
answers_1: '/apply-to-come-to-the-uk'
answers_2: '/when-is-your-next-tax-credits-payment'
answers_3: '/benefits-calculators'
answers_4: '/apply-apprenticeship'
Expand Down

0 comments on commit 843e07c

Please sign in to comment.