diff --git a/app/helpers/schools/bookings_helper.rb b/app/helpers/schools/bookings_helper.rb index 3495d2d278..44af573cbb 100644 --- a/app/helpers/schools/bookings_helper.rb +++ b/app/helpers/schools/bookings_helper.rb @@ -14,14 +14,14 @@ def format_has_dbs_certificate(has_dbs_certificate) def attendance_status(booking) case booking.attended when true - tag.strong 'YES', class: 'govuk-tag' + tag.strong 'Yes', class: 'govuk-tag' when false - tag.strong 'NO', class: 'govuk-tag govuk-tag--grey' + tag.strong 'No', class: 'govuk-tag govuk-tag--grey' when nil if booking.cancelled? - tag.strong 'CANCELLED', class: 'govuk-tag govuk-tag--red' + tag.strong 'Cancelled', class: 'govuk-tag govuk-tag--red' else - tag.strong 'NOT SET', class: 'govuk-tag govuk-tag--default' + tag.strong 'Not set', class: 'govuk-tag govuk-tag--light-blue' end end end diff --git a/app/helpers/schools/placement_dates_helper.rb b/app/helpers/schools/placement_dates_helper.rb index 2a0c4a1169..e286bad0d6 100644 --- a/app/helpers/schools/placement_dates_helper.rb +++ b/app/helpers/schools/placement_dates_helper.rb @@ -3,11 +3,11 @@ def placement_date_status_tag(placement_date) availability_end_date_in_future = (placement_date.date - placement_date.end_availability_offset).future? if placement_date.available? - tag.strong "Open", class: "govuk-tag govuk-tag--available" + tag.strong "Open", class: "govuk-tag govuk-tag--green" elsif placement_date.active && availability_end_date_in_future tag.strong "Scheduled", class: "govuk-tag govuk-tag--grey" else - tag.strong "Closed", class: "govuk-tag govuk-tag--taken" + tag.strong "Closed", class: "govuk-tag govuk-tag--red" end end diff --git a/app/views/candidates/placement_requests/cancellations/_new_booking.html.erb b/app/views/candidates/placement_requests/cancellations/_new_booking.html.erb index 230bf26d66..f96f596ab5 100644 --- a/app/views/candidates/placement_requests/cancellations/_new_booking.html.erb +++ b/app/views/candidates/placement_requests/cancellations/_new_booking.html.erb @@ -15,7 +15,7 @@
! - Warning + Warning To change any school experience details you’ll need to contact the school. For example, to change the date of your booking. diff --git a/app/views/candidates/registrations/availability_preferences/_form.html.erb b/app/views/candidates/registrations/availability_preferences/_form.html.erb index e8c6c190ab..43bb791900 100644 --- a/app/views/candidates/registrations/availability_preferences/_form.html.erb +++ b/app/views/candidates/registrations/availability_preferences/_form.html.erb @@ -21,7 +21,7 @@
- Warning + Warning The school has provided the following details about when school experience is available:
diff --git a/app/views/candidates/schools/profile/_placement_dates.html.erb b/app/views/candidates/schools/profile/_placement_dates.html.erb index 5d6eaff183..0932483640 100644 --- a/app/views/candidates/schools/profile/_placement_dates.html.erb +++ b/app/views/candidates/schools/profile/_placement_dates.html.erb @@ -13,7 +13,7 @@
-
+
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 7250aea85d..18d5a7bf69 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -8,14 +8,14 @@ <%= csp_meta_tag %> <%= display_meta_tags %> <%= tag :meta, name: 'viewport', content: 'width=device-width, initial-scale=1' %> - <%= tag :meta, property: 'og:image', content: asset_pack_url('static/node_modules/govuk-frontend/govuk/assets/images/govuk-opengraph-image.png') %> + <%= tag :meta, property: 'og:image', content: asset_pack_url('static/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-opengraph-image.png') %> <%= tag :meta, name: 'theme-color', content: '#0b0c0c' %> - <%= favicon_link_tag asset_pack_path('static/node_modules/govuk-frontend/govuk/assets/images/favicon.ico') %> - <%= favicon_link_tag asset_pack_path('static/node_modules/govuk-frontend/govuk/assets/images/govuk-mask-icon.svg'), rel: 'mask-icon', type: 'image/svg', color: "#0b0c0c" %> - <%= favicon_link_tag asset_pack_path('static/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon.png'), rel: 'apple-touch-icon', type: 'image/png' %> - <%= favicon_link_tag asset_pack_path('static/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-152x152.png'), rel: 'apple-touch-icon', type: 'image/png', size: '152x152' %> - <%= favicon_link_tag asset_pack_path('static/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-167x167.png'), rel: 'apple-touch-icon', type: 'image/png', size: '167x167' %> - <%= favicon_link_tag asset_pack_path('static/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-180x180.png'), rel: 'apple-touch-icon', type: 'image/png', size: '180x180' %> + <%= favicon_link_tag asset_pack_path('static/node_modules/govuk-frontend/dist/govuk/assets/images/favicon.ico') %> + <%= favicon_link_tag asset_pack_path('static/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-mask.svg'), rel: 'mask-icon', type: 'image/svg', color: "#0b0c0c" %> + <%= favicon_link_tag asset_pack_path('static/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-180.png'), rel: 'govuk-icon-180', type: 'image/png', size: '180x180' %> + <%= favicon_link_tag asset_pack_path('static/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-192.png'), rel: 'govuk-icon-192', type: 'image/png', size: '192x192' %> + <%= favicon_link_tag asset_pack_path('static/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-512.png'), rel: 'govuk-icon-512', type: 'image/png', size: '512x512' %> + <%= favicon_link_tag asset_pack_path('static/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-opengraph-image.png'), rel: 'apple-touch-icon', type: 'image/png' %> <%= stylesheet_pack_tag 'application', media: 'all' %> <%= yield :head %> @@ -24,7 +24,7 @@ <%= render(partial: "gtm_fallback") if gtm_enabled? %> <%= javascript_tag nonce: true do -%> - document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled'); + document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : ''); <% end -%> <%= render partial: 'shared/application/cookie_banner' %> @@ -35,19 +35,23 @@
<%= link_to @site_header_text || 'Get school experience', site_header_path, - class: 'govuk-header__link govuk-header__link--service-name' %> + class: 'govuk-header__link govuk-header__service-name' %>
diff --git a/app/views/pages/dfe_signin_help.html.erb b/app/views/pages/dfe_signin_help.html.erb index 30b2b35f04..1ddd305c91 100644 --- a/app/views/pages/dfe_signin_help.html.erb +++ b/app/views/pages/dfe_signin_help.html.erb @@ -13,7 +13,7 @@
- Warning + Warning These are not the same as your old School Experience Portal (SEP) login details and do not include your URN. @@ -50,7 +50,7 @@
-
+

Your approver will normally be the head or deputy head.

If they're not or you're not sure, don't worry. We just need to get some of your details so we can find them. Email our School Experience Service team at <%= mail_to 'organise.school-experience@education.gov.uk' %>.

diff --git a/app/views/pages/help_and_support_access_needs.html.erb b/app/views/pages/help_and_support_access_needs.html.erb index 06d7e6a8a3..3d092f6257 100644 --- a/app/views/pages/help_and_support_access_needs.html.erb +++ b/app/views/pages/help_and_support_access_needs.html.erb @@ -20,7 +20,7 @@
-
+

Ask all candidates if they have disability or access needs and if they require @@ -46,7 +46,7 @@

-
+

Provide all candidates with an outline of their school experience day and @@ -73,7 +73,7 @@

-
+

Ask candidates where they want to sit. @@ -117,7 +117,7 @@

-
+

If candidates ask, print materials in larger fonts. diff --git a/app/views/schools/availability_preferences/edit.html.erb b/app/views/schools/availability_preferences/edit.html.erb index 901dcf6ef1..37753ac6f2 100644 --- a/app/views/schools/availability_preferences/edit.html.erb +++ b/app/views/schools/availability_preferences/edit.html.erb @@ -16,7 +16,7 @@

-
+
View an example of how specific dates are displayed @@ -42,7 +42,7 @@ year such as around exams, holidays and busy term times

-
+
View an example of how a description is displayed diff --git a/app/views/schools/change_schools/show.html.erb b/app/views/schools/change_schools/show.html.erb index f91a77e872..a967a6ba9e 100644 --- a/app/views/schools/change_schools/show.html.erb +++ b/app/views/schools/change_schools/show.html.erb @@ -51,7 +51,7 @@
- Warning + Warning Changing school is not enabled, use the 'change school' link on the dashboard
diff --git a/app/views/schools/csv_exports/show.html.erb b/app/views/schools/csv_exports/show.html.erb index cadc2f52fd..fd8120120f 100644 --- a/app/views/schools/csv_exports/show.html.erb +++ b/app/views/schools/csv_exports/show.html.erb @@ -12,7 +12,7 @@
- Warning + Warning Please note by using this feature you are exporting personally identifiable information. Please ensure the data is stored securely and diff --git a/app/views/schools/dashboards/_no_placement_dates_warning.html.erb b/app/views/schools/dashboards/_no_placement_dates_warning.html.erb index 0515827dec..6d1ff06edf 100644 --- a/app/views/schools/dashboards/_no_placement_dates_warning.html.erb +++ b/app/views/schools/dashboards/_no_placement_dates_warning.html.erb @@ -1,7 +1,7 @@
- Warning + Warning You haven't entered any dates, your school will not appear in candidate searches diff --git a/app/views/schools/on_boarding/previews/show.html.erb b/app/views/schools/on_boarding/previews/show.html.erb index 35212c6bda..8c0cb1ae0c 100644 --- a/app/views/schools/on_boarding/previews/show.html.erb +++ b/app/views/schools/on_boarding/previews/show.html.erb @@ -16,7 +16,7 @@
- Warning + Warning <%= @presenter.warning %>
diff --git a/app/views/schools/on_boarding/profiles/onboarding.html.erb b/app/views/schools/on_boarding/profiles/onboarding.html.erb index 0c26901f73..9f889a1cee 100644 --- a/app/views/schools/on_boarding/profiles/onboarding.html.erb +++ b/app/views/schools/on_boarding/profiles/onboarding.html.erb @@ -12,7 +12,7 @@
- Warning + Warning To set up your profile, select the checkbox at the bottom of the page and select 'Accept and set up profile'.
diff --git a/app/views/schools/placement_requests/acceptance/make_changes/new.html.erb b/app/views/schools/placement_requests/acceptance/make_changes/new.html.erb index a415b2bfaf..ec88df852c 100644 --- a/app/views/schools/placement_requests/acceptance/make_changes/new.html.erb +++ b/app/views/schools/placement_requests/acceptance/make_changes/new.html.erb @@ -21,7 +21,7 @@ - Warning + Warning The candidate requested <%= @placement_request.requested_subject.name %> diff --git a/app/views/schools/placement_requests/show.html.erb b/app/views/schools/placement_requests/show.html.erb index 3f49a24cad..d657a9e3bb 100644 --- a/app/views/schools/placement_requests/show.html.erb +++ b/app/views/schools/placement_requests/show.html.erb @@ -12,7 +12,7 @@
- Warning + Warning This candidate has already attended a school experience placement.
diff --git a/app/views/schools/withdrawn_requests/index.html.erb b/app/views/schools/withdrawn_requests/index.html.erb index ad411093e3..718f0d369e 100644 --- a/app/views/schools/withdrawn_requests/index.html.erb +++ b/app/views/schools/withdrawn_requests/index.html.erb @@ -11,7 +11,7 @@ <% if @requests.any? %> <%= pagination_bar @requests %> - +
@@ -44,7 +44,7 @@
<% unless withdrawn_request.candidate_cancellation.viewed? %> - UNVIEWED + Unviewed <% end %> diff --git a/app/views/shared/application/_phase_banner.html.erb b/app/views/shared/application/_phase_banner.html.erb index 011d1c0600..50332d15b6 100644 --- a/app/views/shared/application/_phase_banner.html.erb +++ b/app/views/shared/application/_phase_banner.html.erb @@ -1,7 +1,7 @@
This is a new service. <%= link_to 'Give feedback', feedback_path %> diff --git a/app/views/shared/candidates/_alert_notification.html.erb b/app/views/shared/candidates/_alert_notification.html.erb index 352dc368df..650077724c 100644 --- a/app/views/shared/candidates/_alert_notification.html.erb +++ b/app/views/shared/candidates/_alert_notification.html.erb @@ -1,7 +1,7 @@
- Warning + Warning

In light of measures in place due to the response to coronavirus (COVID-19) school experience may be affected. Some schools are offering online alternatives which can be found in the schools detail page.

diff --git a/app/webpacker/packs/application.js b/app/webpacker/packs/application.js index e9c2fb3997..620b5ed823 100644 --- a/app/webpacker/packs/application.js +++ b/app/webpacker/packs/application.js @@ -1,4 +1,4 @@ -require.context("govuk-frontend/govuk/assets"); +require.context("govuk-frontend/dist/govuk/assets"); require.context('../images', true); import "../stylesheets/application.scss"; diff --git a/app/webpacker/packs/gtm.js b/app/webpacker/packs/gtm.js index 20828a47d2..079d034bca 100644 --- a/app/webpacker/packs/gtm.js +++ b/app/webpacker/packs/gtm.js @@ -1,13 +1,13 @@ -import Gtm from '../gtm' +import Gtm from '../gtm'; -const gtmData = document.querySelector('[data-gtm-id]')?.dataset +const gtmData = document.querySelector('[data-gtm-id]')?.dataset; if (gtmData != null) { - const { gtmId, gtmNonce, gtmEnabled} = gtmData + const { gtmId, gtmNonce, gtmEnabled } = gtmData; if (gtmEnabled == 'true') { - const gtm = new Gtm(gtmId, gtmNonce) + const gtm = new Gtm(gtmId, gtmNonce); - gtm.init() + gtm.init(); } } diff --git a/app/webpacker/stylesheets/application.scss b/app/webpacker/stylesheets/application.scss index 6f9a435b7b..6d5388e585 100644 --- a/app/webpacker/stylesheets/application.scss +++ b/app/webpacker/stylesheets/application.scss @@ -8,6 +8,7 @@ $govuk-font-url-function: frontend-font-url; $govuk-image-url-function: frontend-image-url; +$govuk-new-typography-scale: false; $govuk-global-styles: true; $govuk-grid-widths: ( @@ -25,7 +26,7 @@ $govuk-grid-widths: ( full: 100% ); -@import "~govuk-frontend/govuk/all"; +@import "~govuk-frontend/dist/govuk/all"; @import "accessible-autocomplete" ; @import "global-styles" ; @import "contents-list" ; @@ -70,3 +71,6 @@ $govuk-grid-widths: ( .govuk-accordion__controls { margin-bottom: 1em; } +input[type="checkbox"] { + width: 15%; +} diff --git a/app/webpacker/stylesheets/global-styles.scss b/app/webpacker/stylesheets/global-styles.scss index 2741911219..8048088827 100644 --- a/app/webpacker/stylesheets/global-styles.scss +++ b/app/webpacker/stylesheets/global-styles.scss @@ -81,10 +81,6 @@ dl.govuk-summary-list { background-color: $govuk-button-secondary-colour; box-shadow: 0 $button-shadow-size 0 $govuk-button-secondary-shadow-colour; // s0 - @include govuk-if-ie8 { - border-bottom: $button-shadow-size solid $govuk-button-secondary-shadow-colour; - } - &:hover, &:focus { background-color: $govuk-button-secondary-hover-colour; diff --git a/config/shakapacker.yml b/config/shakapacker.yml index 4d253e7582..bee0c29e9a 100644 --- a/config/shakapacker.yml +++ b/config/shakapacker.yml @@ -10,7 +10,7 @@ default: &default # Additional paths webpack should look up modules # ['app/assets', 'engine/foo/app/assets'] - additional_paths: ['node_modules/govuk-frontend/govuk'] + additional_paths: ['node_modules/govuk-frontend/dist/govuk'] # Reload manifest.json on all requests so we reload latest compiled packs cache_manifest: false diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb index d16c06afcc..a2d2b43bdb 100644 --- a/features/step_definitions/common_steps.rb +++ b/features/step_definitions/common_steps.rb @@ -105,7 +105,7 @@ Then("the main site header should be {string}") do |title_text| expect(page).to have_css( - ".govuk-header .govuk-header__content .govuk-header__link--service-name", + ".govuk-header .govuk-header__content .govuk-header__service-name", text: title_text ) end diff --git a/package.json b/package.json index d7eb12fb52..3b8abedb5a 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,8 @@ "css-loader": "^6.8.1", "css-minimizer-webpack-plugin": "^5.0.1", "custom-event-polyfill": "^1.0.7", + "govuk-frontend": "5.2.0", "express": "4.19.2", - "govuk-frontend": "^4.0.1", "js-cookie": "^3.0.5", "json5": "2.2.3", "mini-css-extract-plugin": "^2.7.6", diff --git a/spec/helpers/schools/bookings_helper_spec.rb b/spec/helpers/schools/bookings_helper_spec.rb index 3ce576f700..b71640a732 100644 --- a/spec/helpers/schools/bookings_helper_spec.rb +++ b/spec/helpers/schools/bookings_helper_spec.rb @@ -9,7 +9,7 @@ it do is_expected.to \ - have_css('strong.govuk-tag', text: 'YES') + have_css('strong.govuk-tag', text: 'Yes') end end @@ -18,7 +18,7 @@ it do is_expected.to \ - have_css('strong.govuk-tag.govuk-tag--grey', text: 'NO') + have_css('strong.govuk-tag.govuk-tag--grey', text: 'No') end end @@ -27,7 +27,7 @@ it do is_expected.to \ - have_css('strong.govuk-tag.govuk-tag--red', text: 'CANCELLED') + have_css('strong.govuk-tag.govuk-tag--red', text: 'Cancelled') end end @@ -35,7 +35,7 @@ let(:booking) { create(:bookings_booking, :accepted) } it do is_expected.to \ - have_css('strong.govuk-tag.govuk-tag--default', text: 'NOT SET') + have_css('strong.govuk-tag.govuk-tag--light-blue', text: 'Not set') end end end diff --git a/spec/helpers/schools/placement_dates_helper_spec.rb b/spec/helpers/schools/placement_dates_helper_spec.rb index 54de18fab9..dfdfd6bc7f 100644 --- a/spec/helpers/schools/placement_dates_helper_spec.rb +++ b/spec/helpers/schools/placement_dates_helper_spec.rb @@ -7,7 +7,7 @@ context "when placement date is available (inside availability window)" do let(:placement_date) { create(:bookings_placement_date, :active) } - it { is_expected.to have_css "strong", text: "Open", class: "govuk-tag govuk-tag--available" } + it { is_expected.to have_css "strong", text: "Open", class: "govuk-tag govuk-tag--green" } end context "when placement date is active but not available" do @@ -19,13 +19,13 @@ context "when placement date is active and end of availability is not in the future" do let(:placement_date) { create(:bookings_placement_date, :active, date: Date.tomorrow, end_availability_offset: 1) } - it { is_expected.to have_css "strong", text: "Closed", class: "govuk-tag govuk-tag--taken" } + it { is_expected.to have_css "strong", text: "Closed", class: "govuk-tag govuk-tag--red" } end context "when placement date is inactive" do let(:placement_date) { create(:bookings_placement_date, :inactive) } - it { is_expected.to have_css "strong", text: "Closed", class: "govuk-tag govuk-tag--taken" } + it { is_expected.to have_css "strong", text: "Closed", class: "govuk-tag govuk-tag--red" } end end diff --git a/yarn.lock b/yarn.lock index ec5270ff42..7b8c0ad5e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3300,10 +3300,10 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -govuk-frontend@^4.0.1: - version "4.8.0" - resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-4.8.0.tgz#df4e56c762e93aae74fed214bb6be08e13783772" - integrity sha512-NOmPJxL8IYq1HSNHYKx9XY2LLTxuwb+IFASiGQO4sgJ8K7AG66SlSeqARrcetevV8zOf+i1z+MbJJ2O7//OxAw== +govuk-frontend@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-5.2.0.tgz#f8e0bf98b771b8ee1501fd45bbba24a091f3846d" + integrity sha512-beD3wztHpkKz6JUpPwnwop1ejb4rTFMPLCutKLCIDmUS4BPpW59ggVUfctsRqHd2Zjw9wxljdRdeIJ8AZFyyTw== graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.11"