Skip to content

Commit

Permalink
Merge pull request #3206 from alphagov/upgrade-to-govuk-frontend-5.1
Browse files Browse the repository at this point in the history
Upgrade to govuk frontend 5.1
  • Loading branch information
hannako authored Jul 15, 2024
2 parents 116ee68 + a64367e commit cce3ffb
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ GEM
govuk_personalisation (0.16.0)
plek (>= 1.9.0)
rails (>= 6, < 8)
govuk_publishing_components (39.2.5)
govuk_publishing_components (40.0.0)
govuk_app_config
govuk_personalisation (>= 0.7.0)
kramdown
Expand Down
1 change: 1 addition & 0 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//= link_tree ../images
//= link application.js
//= link es6-components.js
//= link webchat.js
//= link_tree ../builds
3 changes: 0 additions & 3 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
//= require govuk_publishing_components/lib
//= require govuk_publishing_components/components/accordion
//= require govuk_publishing_components/components/details
//= require govuk_publishing_components/components/error-summary
//= require govuk_publishing_components/components/govspeak
//= require govuk_publishing_components/components/image-card
//= require govuk_publishing_components/components/intervention
//= require govuk_publishing_components/components/metadata
//= require govuk_publishing_components/components/print-link
//= require govuk_publishing_components/components/radio
//= require govuk_publishing_components/components/single-page-notification-button
//= require govuk_publishing_components/components/step-by-step-nav

Expand Down
12 changes: 12 additions & 0 deletions app/assets/javascripts/es6-components.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// These modules from govuk_publishing_components
// depend on govuk-frontend modules. govuk-frontend
// now targets browsers that support `type="module"`.
//
// To gracefully prevent execution of these scripts
// on browsers that don't support ES6, this script
// should be included in a `type="module"` script tag
// which will ensure they are never loaded.

//= require govuk_publishing_components/components/accordion
//= require govuk_publishing_components/components/error-summary
//= require govuk_publishing_components/components/radio
4 changes: 0 additions & 4 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
// The main application stylesheet
$govuk-compatibility-govuktemplate: false;
$govuk-typography-use-rem: false;
$govuk-use-legacy-palette: false;
$govuk-new-link-styles: true;

// This flag stops the font from being included in this application's
// stylesheet - the font is being served by Static across all of GOV.UK, so is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}

.app-c-contents-list-with-body__link-wrapper.sticky-element--stuck-to-window {
background-color: govuk-colour("light-grey", $legacy: "grey-3");
background-color: govuk-colour("light-grey");
bottom: -1px; // 'Fix' for anomalous 1px margin which sporadically appears below this element.
left: 0;
margin: 0;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/helpers/_parts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
margin-bottom: 0;
}

border-bottom: 1px solid govuk-colour("mid-grey", $legacy: "grey-2");
border-bottom: 1px solid govuk-colour("mid-grey");
}

.part-navigation {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/views/_manual.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
list-style: none;

&:hover {
background-color: govuk-colour("light-grey", $legacy: "grey-4");
background-color: govuk-colour("light-grey");
}

&:last-child {
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

<%= stylesheet_link_tag "application", :media => "all", integrity: false %>
<%= javascript_include_tag "application", integrity: false %>
<%= javascript_include_tag 'es6-components', type: "module" %>
<%= csrf_meta_tags %>
<%= render 'govuk_publishing_components/components/meta_tags', content_item: @content_item.content_item %>

Expand Down
2 changes: 1 addition & 1 deletion test/integration/service_manual_phase_label_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ServiceManualPhaseLabelTest < ActionDispatch::IntegrationTest
stub_content_store_has_item(guide["base_path"], guide)
visit guide["base_path"]

assert_text("ALPHA")
assert_text("Alpha")
end

test "No phase label is displayed for a guide without a phase field" do
Expand Down

0 comments on commit cce3ffb

Please sign in to comment.