Skip to content

Commit

Permalink
Merge pull request #3648 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
hannalaakso authored Jul 15, 2024
2 parents 0cca0ab + f431968 commit 2d8d855
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,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,5 +1,6 @@
//= link_tree ../images
//= link application.js
//= link es6-components.js
//= link test-dependencies.js

//= link_tree ../builds
3 changes: 1 addition & 2 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//= require govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind
//= require govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Function/prototype/bind

//= require govuk_publishing_components/lib
//= require govuk_publishing_components/components/accordion
//= require govuk_publishing_components/components/details
//= require govuk_publishing_components/components/govspeak
//= require govuk_publishing_components/components/image-card
Expand Down
10 changes: 10 additions & 0 deletions app/assets/javascripts/es6-components.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// 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
2 changes: 1 addition & 1 deletion app/assets/stylesheets/views/_bunting.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
left: 0;
width: 100%;
overflow: visible;
border-top: 1px solid govuk-colour("mid-grey", $legacy: "grey-2");
border-top: 1px solid govuk-colour("mid-grey");
@extend %responsive-bunting-height;
}

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 @@ -37,6 +37,7 @@
<title><%= yield :title %> - <%= t('application.title.suffix')%></title>
<%= javascript_include_tag "test-dependencies" if Rails.env.test? %>
<%= javascript_include_tag "application" %>
<%= javascript_include_tag 'es6-components', type: "module" %>
<%= csrf_meta_tags %>
<%= yield :meta_tags %>
<%= render 'govuk_publishing_components/components/meta_tags', content_item: content_item_h %>
Expand Down

0 comments on commit 2d8d855

Please sign in to comment.