Skip to content

Commit

Permalink
Merge pull request #1507 from alphagov/v-5-1-govuk-frontend
Browse files Browse the repository at this point in the history
Upgrade to govuk frontend 5.1
  • Loading branch information
MuriloDalRi authored Jul 22, 2024
2 parents efc4c74 + cb80a9b commit ffa4156
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gem "plek"
gem "sentry-sidekiq"
gem "sprockets"
gem "sprockets-rails"
gem "uglifier"
gem "terser"

group :test, :development do
gem "better_errors"
Expand Down
88 changes: 70 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ GEM
sass-embedded (~> 1.63)
database_cleaner (2.0.2)
database_cleaner-active_record (>= 2, < 3)
database_cleaner-active_record (2.1.0)
database_cleaner-active_record (2.2.0)
activerecord (>= 5.a)
database_cleaner-core (~> 2.0.0)
database_cleaner-core (2.0.1)
Expand All @@ -154,7 +154,7 @@ GEM
faraday (~> 2.0)
friendly_id (5.5.1)
activerecord (>= 4.0.0)
gds-api-adapters (96.0.1)
gds-api-adapters (96.0.2)
addressable
link_header
null_logger
Expand All @@ -174,6 +174,21 @@ GEM
google-protobuf (4.27.2)
bigdecimal
rake (>= 13)
google-protobuf (4.27.2-aarch64-linux)
bigdecimal
rake (>= 13)
google-protobuf (4.27.2-arm64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.27.2-x86-linux)
bigdecimal
rake (>= 13)
google-protobuf (4.27.2-x86_64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.27.2-x86_64-linux)
bigdecimal
rake (>= 13)
googleapis-common-protos-types (1.15.0)
google-protobuf (>= 3.18, < 5.a)
govuk_app_config (9.13.1)
Expand All @@ -191,7 +206,7 @@ GEM
govuk_personalisation (0.16.0)
plek (>= 1.9.0)
rails (>= 6, < 8)
govuk_publishing_components (39.2.4)
govuk_publishing_components (40.0.0)
govuk_app_config
govuk_personalisation (>= 0.7.0)
kramdown
Expand All @@ -206,7 +221,7 @@ GEM
redis (< 5)
redis-namespace (~> 1.6)
sidekiq (~> 6.5, >= 6.5.12)
graphql (2.3.5)
graphql (2.3.9)
base64
graphql-client (0.23.0)
activesupport (>= 3.0)
Expand Down Expand Up @@ -247,9 +262,8 @@ GEM
method_source (1.1.0)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0604)
mime-types-data (3.2024.0702)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.24.1)
mocha (2.4.2)
ruby2_keywords (>= 0.0.5)
Expand All @@ -272,8 +286,17 @@ GEM
net-protocol
netrc (0.11.0)
nio4r (2.7.3)
nokogiri (1.16.6)
mini_portile2 (~> 2.8.2)
nokogiri (1.16.6-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.6-arm-linux)
racc (~> 1.4)
nokogiri (1.16.6-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.6-x86-linux)
racc (~> 1.4)
nokogiri (1.16.6-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.6-x86_64-linux)
racc (~> 1.4)
null_logger (0.0.1)
oauth2 (2.0.9)
Expand Down Expand Up @@ -499,7 +522,7 @@ GEM
opentelemetry-semantic_conventions (1.10.0)
opentelemetry-api (~> 1.0)
parallel (1.25.1)
parser (3.3.3.0)
parser (3.3.4.0)
ast (~> 2.4.1)
racc
plek (5.2.0)
Expand Down Expand Up @@ -581,7 +604,7 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.3.1)
rexml (3.3.2)
strscan
rouge (4.3.0)
rubocop (1.64.1)
Expand Down Expand Up @@ -617,9 +640,26 @@ GEM
rubocop (~> 1.61)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
sass-embedded (1.77.5)
google-protobuf (>= 3.25, < 5.0)
rake (>= 13)
sass-embedded (1.77.8-aarch64-linux-gnu)
google-protobuf (~> 4.26)
sass-embedded (1.77.8-aarch64-linux-musl)
google-protobuf (~> 4.26)
sass-embedded (1.77.8-arm-linux-gnueabihf)
google-protobuf (~> 4.26)
sass-embedded (1.77.8-arm-linux-musleabihf)
google-protobuf (~> 4.26)
sass-embedded (1.77.8-arm64-darwin)
google-protobuf (~> 4.26)
sass-embedded (1.77.8-x86-linux-gnu)
google-protobuf (~> 4.26)
sass-embedded (1.77.8-x86-linux-musl)
google-protobuf (~> 4.26)
sass-embedded (1.77.8-x86_64-darwin)
google-protobuf (~> 4.26)
sass-embedded (1.77.8-x86_64-linux-gnu)
google-protobuf (~> 4.26)
sass-embedded (1.77.8-x86_64-linux-musl)
google-protobuf (~> 4.26)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
Expand Down Expand Up @@ -656,13 +696,13 @@ GEM
statsd-ruby (1.5.0)
stringio (3.1.1)
strscan (3.1.0)
terser (1.2.3)
execjs (>= 0.3.0, < 3)
thor (1.3.1)
timecop (0.9.10)
timeout (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.5.0)
uri (0.13.0)
version_gem (1.1.4)
Expand All @@ -683,7 +723,19 @@ GEM
zeitwerk (2.6.16)

PLATFORMS
ruby
aarch64-linux
aarch64-linux-gnu
aarch64-linux-musl
arm-linux
arm-linux-gnueabihf
arm-linux-musleabihf
arm64-darwin
x86-linux
x86-linux-gnu
x86-linux-musl
x86_64-darwin
x86_64-linux-gnu
x86_64-linux-musl

DEPENDENCIES
active_model_serializers
Expand Down Expand Up @@ -722,9 +774,9 @@ DEPENDENCIES
simplecov
sprockets
sprockets-rails
terser
timecop
uglifier
webmock

BUNDLED WITH
2.5.5
2.5.6
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 admin.js
//= link es6-components.js
//= link_tree ../builds
11 changes: 11 additions & 0 deletions app/assets/javascripts/es6-components.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// 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/tabs
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<% content_for :head do %>
<%= csrf_meta_tag %>
<%= javascript_include_tag "admin" %>
<%= javascript_include_tag 'es6-components', type: "module" %>
<% end %>

<%= render "govuk_publishing_components/components/layout_for_admin", {
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# Compress CSS using a preprocessor.
# config.assets.css_compressor = :sass

config.assets.js_compressor = :uglifier
config.assets.js_compressor = :terser

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
Expand Down

0 comments on commit ffa4156

Please sign in to comment.