diff --git a/Dockerfile b/Dockerfile index 916c26e2..89699c7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,8 +57,7 @@ RUN bundle exec rake assets:precompile # Copy fonts and images (without digest) along with the digested ones, # as there are some hardcoded references in the `govuk-frontend` files # that will not be able to use the rails digest mechanism. -RUN cp node_modules/govuk-frontend/govuk/assets/fonts/* public/assets/govuk-frontend/govuk/assets/fonts -RUN cp node_modules/govuk-frontend/govuk/assets/images/* public/assets/govuk-frontend/govuk/assets/images +RUN cp -r node_modules/govuk-frontend/dist/govuk/assets/. public/assets/ # tidy up installation RUN apk del build-deps && rm -rf /tmp/* diff --git a/Gemfile b/Gemfile index c65bba4f..eb768f6f 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,8 @@ ruby File.read(".ruby-version").strip # Reduces boot times through caching; required in config/boot.rb gem "bootsnap", ">= 1.1.0", require: false -gem "govuk_design_system_formbuilder", "~> 3.1.0" +gem "govuk-components", "~> 5.0" +gem "govuk_design_system_formbuilder" gem "jquery-rails" gem "mimemagic", "~> 0.3.7" gem "pg" diff --git a/Gemfile.lock b/Gemfile.lock index de10f9fc..1959b2b0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -95,7 +95,7 @@ GEM xpath (~> 3.2) coercible (1.0.0) descendants_tracker (~> 0.0.1) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) crass (1.0.6) cucumber (8.0.0) builder (~> 3.2, >= 3.2.4) @@ -152,13 +152,17 @@ GEM ffi (1.15.5) globalid (1.1.0) activesupport (>= 5.0) - govuk_design_system_formbuilder (3.1.0) + govuk-components (5.1.0) + html-attributes-utils (~> 1.0.0, >= 1.0.0) + pagy (~> 6.0) + view_component (>= 3.9, < 3.11) + govuk_design_system_formbuilder (5.1.0) actionview (>= 6.1) activemodel (>= 6.1) activesupport (>= 6.1) - html-attributes-utils (~> 0.9, >= 0.9.2) + html-attributes-utils (~> 1) highline (2.1.0) - html-attributes-utils (0.9.2) + html-attributes-utils (1.0.2) activesupport (>= 6.1.4.4) i18n (1.14.1) concurrent-ruby (~> 1.0) @@ -193,7 +197,7 @@ GEM railties (>= 4) request_store (~> 1.0) logstash-event (1.2.02) - loofah (2.21.3) + loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -211,8 +215,8 @@ GEM nokogiri (~> 1) rake mini_mime (1.1.2) - mini_portile2 (2.8.2) - minitest (5.18.1) + mini_portile2 (2.8.5) + minitest (5.22.2) msgpack (1.7.1) multi_test (1.1.0) net-imap (0.3.4) @@ -225,9 +229,10 @@ GEM net-smtp (0.3.3) net-protocol nio4r (2.5.8) - nokogiri (1.15.3) + nokogiri (1.16.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) + pagy (6.5.0) parallel (1.23.0) parser (3.2.2.3) ast (~> 2.4.1) @@ -236,7 +241,7 @@ GEM public_suffix (5.0.1) puma (5.6.4) nio4r (~> 2.0) - racc (1.7.1) + racc (1.7.3) rack (2.2.7) rack-test (2.1.0) rack (>= 1.3) @@ -259,7 +264,7 @@ GEM actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) activesupport (>= 5.0.1.rc1) - rails-dom-testing (2.1.1) + rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) @@ -387,6 +392,10 @@ GEM uglifier (4.2.0) execjs (>= 0.3.0, < 3) unicode-display_width (2.4.2) + view_component (3.10.0) + activesupport (>= 5.2.0, < 8.0) + concurrent-ruby (~> 1.0) + method_source (~> 1.0) virtus (2.0.0) axiom-types (~> 0.1) coercible (~> 1.0) @@ -398,7 +407,7 @@ GEM websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.8) + zeitwerk (2.6.13) PLATFORMS ruby @@ -414,7 +423,8 @@ DEPENDENCIES debug dotenv-rails factory_bot_rails - govuk_design_system_formbuilder (~> 3.1.0) + govuk-components (~> 5.0) + govuk_design_system_formbuilder i18n-debug i18n-tasks jquery-rails diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 1ead45d1..941d66ff 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -16,7 +16,6 @@ // GOV.UK Frontend // https://github.com/alphagov/govuk-frontend/blob/master/docs/installation/installing-with-npm.md // -//= require govuk-frontend/govuk/all //= require moj //= require_tree ./modules diff --git a/app/assets/stylesheets/local/govuk.scss b/app/assets/stylesheets/local/govuk.scss index a77de134..91ff8d8a 100644 --- a/app/assets/stylesheets/local/govuk.scss +++ b/app/assets/stylesheets/local/govuk.scss @@ -3,6 +3,6 @@ // $govuk-new-link-styles: true; $govuk-global-styles: true; -$govuk-assets-path: '/assets/govuk-frontend/govuk/assets/'; +$govuk-assets-path: '/assets/govuk-frontend/dist/govuk/assets/'; -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/dist/govuk/all'; diff --git a/app/views/layouts/_phase_banner.html.erb b/app/views/layouts/_phase_banner.html.erb index c449b942..a1a9be18 100644 --- a/app/views/layouts/_phase_banner.html.erb +++ b/app/views/layouts/_phase_banner.html.erb @@ -1,6 +1,6 @@