Skip to content

Commit

Permalink
Merge pull request #9440 from alphagov/upgrade-to-govuk-frontend-v5
Browse files Browse the repository at this point in the history
Upgrading to GOV.UK Frontend v5
  • Loading branch information
GDSNewt authored Sep 18, 2024
2 parents e5c438b + 675ce13 commit 2314bb4
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ GEM
govuk_personalisation (0.16.0)
plek (>= 1.9.0)
rails (>= 6, < 8)
govuk_publishing_components (39.2.5)
govuk_publishing_components (43.1.1)
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
Expand Up @@ -2,4 +2,5 @@
//= link_tree ../builds
//= link application.js
//= link admin/domain-config.js
//= link es6-components.js
//= link components/visual-editor.js
7 changes: 6 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
//= require admin/stop-scripts-nomodule

//= require govuk_publishing_components/dependencies
//= require govuk_publishing_components/all_components
//= require govuk_publishing_components/analytics-ga4
//= require govuk_publishing_components/components/copy-to-clipboard
//= require govuk_publishing_components/components/govspeak
//= require govuk_publishing_components/components/reorderable-list
//= require govuk_publishing_components/components/table
//= require govuk_publishing_components/lib/trigger-event
//= require govuk_publishing_components/lib/cookie-functions

//= require components/autocomplete
//= require components/govspeak-editor
Expand Down
17 changes: 17 additions & 0 deletions app/assets/javascripts/es6-components.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 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/button
//= require govuk_publishing_components/components/checkboxes
//= require govuk_publishing_components/components/character-count
//= require govuk_publishing_components/components/error-summary
//= require govuk_publishing_components/components/layout-header
//= require govuk_publishing_components/components/radio
//= require govuk_publishing_components/components/skip-link
//= require govuk_publishing_components/components/tabs
1 change: 1 addition & 0 deletions app/views/layouts/design_system.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta name="govuk:components_gem_version" content="<%= GovukPublishingComponents::VERSION %>">
<%= javascript_include_tag "admin/domain-config" %>
<%= javascript_include_tag "govuk_publishing_components/load-analytics" %>
<%= javascript_include_tag "es6-components", type: "module" %>
<% end %>
<% end %>
Expand Down

0 comments on commit 2314bb4

Please sign in to comment.