diff --git a/Gemfile b/Gemfile index e43b1d049..040d45e4b 100644 --- a/Gemfile +++ b/Gemfile @@ -13,14 +13,14 @@ gem "govspeak" gem "govuk_ab_testing" gem "govuk_app_config" gem "govuk_document_types" -gem "govuk_publishing_components" +gem "govuk_publishing_components", git: "https://github.com/alphagov/govuk_publishing_components.git", branch: "deploy-try-to-update-govukfrontend" gem "plek" gem "rails-i18n" gem "rails_translation_manager" gem "rinku", require: "rails_rinku" gem "slimmer" gem "sprockets-rails" -gem "uglifier" +gem "terser" group :test do gem "cucumber-rails", require: false diff --git a/Gemfile.lock b/Gemfile.lock index dab75e09b..d85463983 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,19 @@ +GIT + remote: https://github.com/alphagov/govuk_publishing_components.git + revision: 61640e75da1085b7847219517dc12e51bb65b7dd + branch: deploy-try-to-update-govukfrontend + specs: + govuk_publishing_components (37.8.1) + govuk_app_config + govuk_personalisation (>= 0.7.0) + kramdown + plek + rails (>= 6) + rouge + sprockets (>= 3) + sprockets-rails + terser + GEM remote: https://rubygems.org/ specs: @@ -165,7 +181,7 @@ GEM rubocop smart_properties erubi (1.12.0) - execjs (2.8.1) + execjs (2.9.1) expgen (0.1.1) parslet faraday (2.9.0) @@ -213,15 +229,6 @@ GEM govuk_personalisation (0.16.0) plek (>= 1.9.0) rails (>= 6, < 8) - govuk_publishing_components (37.10.0) - govuk_app_config - govuk_personalisation (>= 0.7.0) - kramdown - plek - rails (>= 6) - rouge - sprockets (>= 3) - sprockets-rails govuk_schemas (4.7.0) json-schema (>= 2.8, < 4.2) govuk_test (4.0.2) @@ -690,7 +697,6 @@ GEM nokogiri (>= 1.12.0) sass-embedded (1.69.7) google-protobuf (~> 3.25) - rake (>= 13.0.0) selenium-webdriver (4.16.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) @@ -734,6 +740,8 @@ GEM tins (~> 1.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) + terser (1.2.0) + execjs (>= 0.3.0, < 3) thor (1.3.1) timecop (0.9.8) timeout (0.4.1) @@ -741,8 +749,6 @@ GEM sync tzinfo (2.0.6) concurrent-ruby (~> 1.0) - uglifier (4.2.0) - execjs (>= 0.3.0, < 3) unicode-display_width (2.5.0) unparser (0.6.13) diff-lcs (~> 1.3) @@ -779,7 +785,7 @@ DEPENDENCIES govuk_ab_testing govuk_app_config govuk_document_types - govuk_publishing_components + govuk_publishing_components! govuk_schemas govuk_test i18n-coverage @@ -799,8 +805,8 @@ DEPENDENCIES simplecov-rcov slimmer sprockets-rails + terser timecop - uglifier unparser webmock diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index 9361adfbc..7da83fc50 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -1,5 +1,6 @@ //= link_tree ../images //= link application.js +//= link es6-components.js //= link test-dependencies.js //= link_tree ../builds diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 8586f6562..653de703e 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -1,7 +1,4 @@ -//= require govuk-frontend/govuk/vendor/polyfills/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 diff --git a/app/assets/javascripts/es6-components.js b/app/assets/javascripts/es6-components.js new file mode 100644 index 000000000..479c76318 --- /dev/null +++ b/app/assets/javascripts/es6-components.js @@ -0,0 +1 @@ +//= require govuk_publishing_components/components/accordion diff --git a/app/assets/javascripts/modules/coronavirus-landing-page.js b/app/assets/javascripts/modules/coronavirus-landing-page.js index dececac65..54f597be1 100644 --- a/app/assets/javascripts/modules/coronavirus-landing-page.js +++ b/app/assets/javascripts/modules/coronavirus-landing-page.js @@ -6,6 +6,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {}; (function (Modules) { function CoronavirusLandingPage ($module) { this.module = $module + this.init() } CoronavirusLandingPage.prototype.init = function () { diff --git a/app/assets/javascripts/modules/list-filter.js b/app/assets/javascripts/modules/list-filter.js index 9eebf6bf3..80e943f6f 100644 --- a/app/assets/javascripts/modules/list-filter.js +++ b/app/assets/javascripts/modules/list-filter.js @@ -10,6 +10,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {}; this.filterTimeout = null this.form = this.$module.querySelector('[data-filter="form"]') this.searchResults = this.$module.querySelector('#search_results') + this.init() } ListFilter.prototype.init = function () { diff --git a/app/assets/javascripts/modules/toggle-attribute.js b/app/assets/javascripts/modules/toggle-attribute.js index 36f432af4..995aab114 100644 --- a/app/assets/javascripts/modules/toggle-attribute.js +++ b/app/assets/javascripts/modules/toggle-attribute.js @@ -4,6 +4,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {}; (function (Modules) { function ToggleAttribute ($module) { this.$module = $module + this.init() } ToggleAttribute.prototype.init = function () { diff --git a/app/assets/stylesheets/views/_bunting.scss b/app/assets/stylesheets/views/_bunting.scss index dd03c1ab3..48124eb1a 100644 --- a/app/assets/stylesheets/views/_bunting.scss +++ b/app/assets/stylesheets/views/_bunting.scss @@ -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; } diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 6c45554b9..28adb0ac0 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -35,6 +35,7 @@