diff --git a/Gemfile b/Gemfile index 314849ff2..4a650a02d 100644 --- a/Gemfile +++ b/Gemfile @@ -18,9 +18,9 @@ gem "jsbundling-rails" # Reduces boot times through caching; required in config/boot.rb gem "bootsnap", ">= 1.4.4", require: false # GOV UK frontend components -gem "govuk-components" +gem "govuk-components", "~> 5.0" # GOV UK component form builder DSL -gem "govuk_design_system_formbuilder", "3.1.2" +gem "govuk_design_system_formbuilder", "~> 5.0" # Convert Markdown into GOV.UK frontend-styled HTML gem "govuk_markdown" # GOV UK Notify @@ -40,7 +40,7 @@ gem "uk_postcode" # Get rich data from postcode lookups. Wraps postcodes.io gem "postcodes_io" # Use Ruby objects to build reusable markup. A React inspired evolution of the presenter pattern -gem "view_component" +gem "view_component", "~> 3.9" # Use the AWS S3 SDK as storage mechanism gem "aws-sdk-s3" # Track changes to models for auditing or versioning. diff --git a/Gemfile.lock b/Gemfile.lock index b4e3d0587..b04fdd8ad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -171,23 +171,20 @@ GEM raabro (~> 1.4) globalid (1.1.0) activesupport (>= 5.0) - govuk-components (3.2.1) - actionpack (>= 6.1) - activemodel (>= 6.1) - html-attributes-utils (~> 0.9, >= 0.9.2) - pagy (~> 5.10.1) - railties (>= 6.1) - view_component (~> 2.69.0) - govuk_design_system_formbuilder (3.1.2) + govuk-components (5.0.2) + html-attributes-utils (~> 1.0.0, >= 1.0.0) + pagy (~> 6.0) + view_component (>= 3.9, < 3.10) + govuk_design_system_formbuilder (5.0.0) actionview (>= 6.1) activemodel (>= 6.1) activesupport (>= 6.1) - html-attributes-utils (~> 0.9, >= 0.9.2) + html-attributes-utils (~> 1) govuk_markdown (2.0.0) activesupport redcarpet hashdiff (1.0.1) - 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) @@ -203,7 +200,7 @@ GEM listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.21.3) + loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -215,7 +212,7 @@ GEM matrix (0.4.2) method_source (1.0.0) mini_mime (1.1.5) - minitest (5.19.0) + minitest (5.20.0) msgpack (1.6.0) net-imap (0.3.7) date @@ -227,11 +224,11 @@ GEM net-smtp (0.3.3) net-protocol nio4r (2.5.9) - nokogiri (1.15.4-arm64-darwin) + nokogiri (1.16.0-arm64-darwin) racc (~> 1.4) - nokogiri (1.15.4-x86_64-darwin) + nokogiri (1.16.0-x86_64-darwin) racc (~> 1.4) - nokogiri (1.15.4-x86_64-linux) + nokogiri (1.16.0-x86_64-linux) racc (~> 1.4) notifications-ruby-client (5.4.0) jwt (>= 1.5, < 3) @@ -240,8 +237,7 @@ GEM childprocess (>= 0.6.3, < 5) iniparse (~> 1.4) rexml (~> 3.2) - pagy (5.10.1) - activesupport + pagy (6.2.0) paper_trail (14.0.0) activerecord (>= 6.0) request_store (~> 1.4) @@ -274,7 +270,7 @@ GEM pundit (2.3.0) activesupport (>= 3.0.0) raabro (1.4.0) - racc (1.7.1) + racc (1.7.3) rack (2.2.8) rack-attack (6.6.1) rack (>= 1.0, < 3) @@ -412,8 +408,8 @@ GEM concurrent-ruby (~> 1.0) uk_postcode (2.1.8) unicode-display_width (2.4.2) - view_component (2.69.0) - activesupport (>= 5.0.0, < 8.0) + view_component (3.9.0) + activesupport (>= 5.2.0, < 8.0) concurrent-ruby (~> 1.0) method_source (~> 1.0) warden (1.2.9) @@ -459,8 +455,8 @@ DEPENDENCIES erb_lint factory_bot_rails faker - govuk-components - govuk_design_system_formbuilder (= 3.1.2) + govuk-components (~> 5.0) + govuk_design_system_formbuilder (~> 5.0) govuk_markdown jsbundling-rails json-schema @@ -497,7 +493,7 @@ DEPENDENCIES timecop (~> 0.9.4) tzinfo-data uk_postcode - view_component + view_component (~> 3.9) web-console (>= 4.1.0) webmock diff --git a/app/components/bulk_upload_error_row_component.html.erb b/app/components/bulk_upload_error_row_component.html.erb index edf480a1a..907c73298 100644 --- a/app/components/bulk_upload_error_row_component.html.erb +++ b/app/components/bulk_upload_error_row_component.html.erb @@ -9,21 +9,21 @@
<%= govuk_table do |table| %> - <% table.head do |head| %> - <% head.row do |row| %> - <% row.cell(header: true, text: "Cell") %> - <% row.cell(header: true, text: "Question") %> - <% row.cell(header: true, text: "Error") %> - <% row.cell(header: true, text: "Specification") %> + <%= table.with_head do |head| %> + <% head.with_row do |row| %> + <% row.with_cell(header: true, text: "Cell") %> + <% row.with_cell(header: true, text: "Question") %> + <% row.with_cell(header: true, text: "Error") %> + <% row.with_cell(header: true, text: "Specification") %> <% end %> - <% table.body do |body| %> + <%= table.with_body do |body| %> <% bulk_upload_errors.each do |error| %> - <% body.row do |row| %> - <% row.cell(header: true, text: error.cell) %> - <% row.cell(text: question_for_field(error.field)) %> - <% row.cell(text: error.error) %> - <% row.cell(text: error.field.humanize) %> + <% body.with_row do |row| %> + <% row.with_cell(header: true, text: error.cell) %> + <% row.with_cell(text: question_for_field(error.field)) %> + <% row.with_cell(text: error.error) %> + <% row.with_cell(text: error.field.humanize) %> <% end %> <% end %> <% end %> diff --git a/app/components/bulk_upload_error_summary_table_component.html.erb b/app/components/bulk_upload_error_summary_table_component.html.erb index ab5254c0f..c0e10cffa 100644 --- a/app/components/bulk_upload_error_summary_table_component.html.erb +++ b/app/components/bulk_upload_error_summary_table_component.html.erb @@ -4,16 +4,16 @@ <% sorted_errors.each do |error| %> <%= govuk_table do |table| %> - <% table.head do |head| %> - <% head.row do |row| %> - <% row.cell(text: question_for_field(error[0][1].to_sym), header: true) %> - <% row.cell(text: "Column #{error[0][0]}", header: true, numeric: true) %> + <%= table.with_head do |head| %> + <% head.with_row do |row| %> + <% row.with_cell(text: question_for_field(error[0][1].to_sym), header: true) %> + <% row.with_cell(text: "Column #{error[0][0]}", header: true, numeric: true) %> <% end %> - <% table.body do |body| %> - <% body.row do |row| %> - <% row.cell(text: error[0][2]) %> - <% row.cell(text: pluralize(error[1], "error"), numeric: true) %> + <%= table.with_body do |body| %> + <% body.with_row do |row| %> + <% row.with_cell(text: error[0][2]) %> + <% row.with_cell(text: pluralize(error[1], "error"), numeric: true) %> <% end %> <% end %> <% end %> diff --git a/app/components/check_answers_summary_list_card_component.html.erb b/app/components/check_answers_summary_list_card_component.html.erb index a2fad6445..946092a46 100644 --- a/app/components/check_answers_summary_list_card_component.html.erb +++ b/app/components/check_answers_summary_list_card_component.html.erb @@ -9,9 +9,9 @@
<%= govuk_summary_list do |summary_list| %> <% applicable_questions.each do |question| %> - <% summary_list.row do |row| %> - <% row.key { get_question_label(question) } %> - <% row.value do %> + <% summary_list.with_row do |row| %> + <% row.with_key { get_question_label(question) } %> + <% row.with_value do %> <%= simple_format( get_answer_label(question), wrapper_tag: "span", @@ -34,7 +34,7 @@ <% end %> <% if @log.collection_period_open_for_editing? %> - <% row.action( + <% row.with_action( text: question.action_text(log), href: action_href(log, question.page.id), visually_hidden_text: question.check_answer_label.to_s.downcase, diff --git a/app/components/search_component.html.erb b/app/components/search_component.html.erb index 9c989f0f0..5e3eb4ae3 100644 --- a/app/components/search_component.html.erb +++ b/app/components/search_component.html.erb @@ -10,7 +10,7 @@ autocomplete: "off", class: "app-search__input" %> - <%= f.govuk_submit "Search", classes: "app-search__button" %> + <%= f.govuk_submit "Search", class: "app-search__button" %> <%= govuk_button_link_to "Clear search", path(current_user), secondary: true, class: "app-search__button" %>
<% end %> diff --git a/app/frontend/application.js b/app/frontend/application.js index fcaff2e92..45b6fd106 100644 --- a/app/frontend/application.js +++ b/app/frontend/application.js @@ -18,7 +18,7 @@ import './controllers' import './cookie-banner' import './styles/application.scss' -require.context('govuk-frontend/govuk/assets') +require.context('govuk-frontend/dist/govuk/assets') GOVUKFrontend() GOVUKPrototypeComponents() diff --git a/app/frontend/styles/_filter.scss b/app/frontend/styles/_filter.scss index 43b9d8862..640ba8e29 100644 --- a/app/frontend/styles/_filter.scss +++ b/app/frontend/styles/_filter.scss @@ -3,6 +3,13 @@ margin-bottom: govuk-spacing(2); } +.govuk-checkboxes__label, +.govuk-radios__label { + &:before { + background-color: govuk-colour("white"); + } +} + .app-filter__header { background-color: govuk-colour("light-grey"); display: flex; @@ -90,15 +97,6 @@ } } - .govuk-checkboxes__label, - .govuk-radios__label { - @include govuk-font(16); - - &:before { - background-color: govuk-colour("white"); - } - } - .autocomplete__input { @include govuk-font(16); background-color: govuk-colour("white"); diff --git a/app/helpers/check_answers_helper.rb b/app/helpers/check_answers_helper.rb index 0209d8e14..d69414670 100644 --- a/app/helpers/check_answers_helper.rb +++ b/app/helpers/check_answers_helper.rb @@ -1,5 +1,6 @@ module CheckAnswersHelper include GovukLinkHelper + include GovukVisuallyHiddenHelper def display_answered_questions_summary(subsection, lettings_log, current_user) total = total_count(subsection, lettings_log, current_user) diff --git a/app/helpers/data_sharing_agreement_helper.rb b/app/helpers/data_sharing_agreement_helper.rb index d2e2e074d..79296e6dc 100644 --- a/app/helpers/data_sharing_agreement_helper.rb +++ b/app/helpers/data_sharing_agreement_helper.rb @@ -1,13 +1,13 @@ module DataSharingAgreementHelper def data_sharing_agreement_row(user:, organisation:, summary_list:) - summary_list.row do |row| - row.key { "Data Sharing Agreement" } - row.action( + summary_list.with_row do |row| + row.with_key { "Data Sharing Agreement" } + row.with_action( href: data_sharing_agreement_organisation_path(organisation), text: "View agreement", ) - row.value do + row.with_value do simple_format( data_sharing_agreement_first_line(organisation:, user:), wrapper_tag: "span", diff --git a/app/helpers/duplicate_logs_helper.rb b/app/helpers/duplicate_logs_helper.rb index 8df911103..9eb1b6289 100644 --- a/app/helpers/duplicate_logs_helper.rb +++ b/app/helpers/duplicate_logs_helper.rb @@ -1,5 +1,6 @@ module DuplicateLogsHelper include GovukLinkHelper + include GovukVisuallyHiddenHelper def duplicate_logs_continue_button(all_duplicates, duplicate_log, original_log) if all_duplicates.count > 1 diff --git a/app/helpers/log_actions_helper.rb b/app/helpers/log_actions_helper.rb index b0f950a5e..8a018445e 100644 --- a/app/helpers/log_actions_helper.rb +++ b/app/helpers/log_actions_helper.rb @@ -1,5 +1,6 @@ module LogActionsHelper include GovukLinkHelper + include GovukVisuallyHiddenHelper def edit_actions_for_log(log) back = back_button_for(log) diff --git a/app/helpers/organisations_helper.rb b/app/helpers/organisations_helper.rb index 850742afc..cf53bd244 100644 --- a/app/helpers/organisations_helper.rb +++ b/app/helpers/organisations_helper.rb @@ -23,17 +23,17 @@ module OrganisationsHelper end def organisation_name_row(user:, organisation:, summary_list:) - summary_list.row do |row| - row.key { "Name" } - row.value { organisation.name } + summary_list.with_row do |row| + row.with_key { "Name" } + row.with_value { organisation.name } if user.support? - row.action( + row.with_action( visually_hidden_text: organisation.name.humanize.downcase, href: edit_organisation_path(organisation), html_attributes: { "data-qa": "change-#{organisation.name.downcase}" }, ) else - row.action + row.with_action end end end diff --git a/app/helpers/tab_nav_helper.rb b/app/helpers/tab_nav_helper.rb index c29ae5d86..24408be28 100644 --- a/app/helpers/tab_nav_helper.rb +++ b/app/helpers/tab_nav_helper.rb @@ -1,5 +1,6 @@ module TabNavHelper include GovukLinkHelper + include GovukVisuallyHiddenHelper def user_cell(user) link_text = user.name.presence || user.email diff --git a/app/helpers/tasklist_helper.rb b/app/helpers/tasklist_helper.rb index 1d7e4d7ef..bdc71b4ab 100644 --- a/app/helpers/tasklist_helper.rb +++ b/app/helpers/tasklist_helper.rb @@ -1,5 +1,6 @@ module TasklistHelper include GovukLinkHelper + include GovukVisuallyHiddenHelper include CollectionTimeHelper def breadcrumb_logs_title(log, current_user) diff --git a/app/views/duplicate_logs/_duplicate_log_check_answers.erb b/app/views/duplicate_logs/_duplicate_log_check_answers.erb index 44b788959..91deb10c8 100644 --- a/app/views/duplicate_logs/_duplicate_log_check_answers.erb +++ b/app/views/duplicate_logs/_duplicate_log_check_answers.erb @@ -2,10 +2,10 @@
<%= govuk_summary_list do |summary_list| %> <% log.duplicate_check_questions(current_user).each do |question| %> - <% summary_list.row do |row| %> - <% row.key { duplicate_log_question_label(question) } %> + <% summary_list.with_row do |row| %> + <% row.with_key { duplicate_log_question_label(question) } %> - <% row.value do %> + <% row.with_value do %> <%= simple_format( duplicate_log_answer_label(question, log), wrapper_tag: "span", @@ -25,13 +25,13 @@ <% end %> <% end %> <% if @all_duplicates.many? %> - <% row.action( + <% row.with_action( text: question.action_text(log), href: change_duplicate_logs_action_href(log, question.page.id, @all_duplicates, @original_log.id), visually_hidden_text: question.check_answer_label.to_s.downcase, ) %> <% else %> - <% row.action( + <% row.with_action( text: question.action_text(log), href: duplicate_logs_action_href(log, question.page.id, @original_log.id), visually_hidden_text: question.check_answer_label.to_s.downcase, diff --git a/app/views/duplicate_logs/index.html.erb b/app/views/duplicate_logs/index.html.erb index d38e433e8..53f06e25f 100644 --- a/app/views/duplicate_logs/index.html.erb +++ b/app/views/duplicate_logs/index.html.erb @@ -11,28 +11,28 @@
<%= govuk_table do |table| %> - <%= table.head do |head| %> - <%= head.row do |row| %> - <% row.cell header: true, text: "Type of logs" %> - <% row.cell header: true, text: "Log IDs" %> - <% row.cell header: true %> + <%= table.with_head do |head| %> + <%= head.with_row do |row| %> + <% row.with_cell header: true, text: "Type of logs" %> + <% row.with_cell header: true, text: "Log IDs" %> + <% row.with_cell header: true %> <% end %> <% end %> - <%= table.body do |body| %> + <%= table.with_body do |body| %> <% @duplicates[:lettings].each do |duplicate_set| %> - <% body.row do |row| %> - <% row.cell text: "Lettings" %> - <% row.cell text: duplicate_set.map { |id| "Log #{id}" }.join(", ") %> - <% row.cell do %> + <% body.with_row do |row| %> + <% row.with_cell text: "Lettings" %> + <% row.with_cell text: duplicate_set.map { |id| "Log #{id}" }.join(", ") %> + <% row.with_cell do %> <%= govuk_link_to "Review logs", lettings_log_duplicate_logs_path(duplicate_set.first, original_log_id: duplicate_set.first, referrer: params[:referrer], organisation_id: params[:organisation_id]) %> <% end %> <% end %> <% end %> <% @duplicates[:sales].each do |duplicate_set| %> - <% body.row do |row| %> - <% row.cell text: "Sales" %> - <% row.cell text: duplicate_set.map { |id| "Log #{id}" }.join(", ") %> - <% row.cell do %> + <% body.with_row do |row| %> + <% row.with_cell text: "Sales" %> + <% row.with_cell text: duplicate_set.map { |id| "Log #{id}" }.join(", ") %> + <% row.with_cell do %> <%= govuk_link_to "Review logs", sales_log_duplicate_logs_path(duplicate_set.first, original_log_id: duplicate_set.first, referrer: params[:referrer], organisation_id: params[:organisation_id]) %> <% end %> <% end %> diff --git a/app/views/form/_check_answers_summary_list.html.erb b/app/views/form/_check_answers_summary_list.html.erb index 4d1bbd8a4..59d6c9bd1 100644 --- a/app/views/form/_check_answers_summary_list.html.erb +++ b/app/views/form/_check_answers_summary_list.html.erb @@ -1,9 +1,9 @@ <%= govuk_summary_list do |summary_list| %> <% questions.each do |question| %> - <% summary_list.row do |row| %> - <% row.key { get_question_label(question) } %> + <% summary_list.with_row do |row| %> + <% row.with_key { get_question_label(question) } %> - <% row.value do %> + <% row.with_value do %> <%= simple_format( get_answer_label(question, @log), wrapper_tag: "span", @@ -26,7 +26,7 @@ <% end %> <% if @log.collection_period_open_for_editing? %> - <% row.action( + <% row.with_action( text: question.action_text(@log), href: action_href(@log, question.page.id, referrer), visually_hidden_text: question.check_answer_label.to_s.downcase, diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 30ec7d098..35d3c23a8 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -7,12 +7,10 @@ <%= tag.meta name: "viewport", content: "width=device-width, initial-scale=1" %> <%= tag.meta property: "og:image", content: asset_path("images/govuk-opengraph-image.png") %> <%= tag.meta name: "theme-color", content: "#0b0c0c" %> - <%= favicon_link_tag asset_path("images/favicon.ico") %> - <%= favicon_link_tag asset_path("images/govuk-mask-icon.svg"), rel: "mask-icon", type: "image/svg", color: "#0b0c0c" %> - <%= favicon_link_tag asset_path("images/govuk-apple-touch-icon.png"), rel: "apple-touch-icon", type: "image/png" %> - <%= favicon_link_tag asset_path("images/govuk-apple-touch-icon-152x152.png"), rel: "apple-touch-icon", type: "image/png", size: "152x152" %> - <%= favicon_link_tag asset_path("images/govuk-apple-touch-icon-167x167.png"), rel: "apple-touch-icon", type: "image/png", size: "167x167" %> - <%= favicon_link_tag asset_path("images/govuk-apple-touch-icon-180x180.png"), rel: "apple-touch-icon", type: "image/png", size: "180x180" %> + <%= favicon_link_tag asset_path("images/favicon.ico"), type: nil, sizes: "48x48" %> + <%= favicon_link_tag asset_path("images/favicon.svg"), type: "image/svg+xml", sizes: "any" %> + <%= favicon_link_tag asset_path("images/govuk-icon-mask.svg"), rel: "mask-icon", color: "#0b0c0c", type: nil %> + <%= favicon_link_tag asset_path("images/govuk-icon-180.png"), rel: "apple-touch-icon", type: nil %> <%= stylesheet_link_tag "application" %> <%= javascript_include_tag "vendor/html5shiv.min.js" %> <% if cookies[:accept_analytics_cookies] == "on" %> @@ -87,16 +85,16 @@ <%= govuk_header( classes: govuk_header_classes(current_user), - service_url: current_user.nil? ? root_path : logs_path, + homepage_url: root_path, navigation_classes: "govuk-header__navigation--end", ) do |component| - component.product_name(name: t("service_name")) + component.with_product_name(name: t("service_name")) unless FeatureToggle.service_moved? || FeatureToggle.service_unavailable? if current_user.nil? - component.navigation_item(text: "Sign in", href: user_session_path) + component.with_navigation_item(text: "Sign in", href: user_session_path) else - component.navigation_item(text: "Your account", href: account_path) - component.navigation_item(text: "Sign out", href: destroy_user_session_path) + component.with_navigation_item(text: "Your account", href: account_path) + component.with_navigation_item(text: "Sign out", href: destroy_user_session_path) end end end %> @@ -126,7 +124,7 @@ success: true, title_heading_level: 3, title_id: "swanky-notifications" ) do |notification_banner| - notification_banner.heading(text: flash.notice.html_safe) + notification_banner.with_heading(text: flash.notice.html_safe) if flash[:notification_banner_body] tag.p flash[:notification_banner_body]&.html_safe end diff --git a/app/views/locations/check_answers.html.erb b/app/views/locations/check_answers.html.erb index 7d45eb158..63a48d4d5 100644 --- a/app/views/locations/check_answers.html.erb +++ b/app/views/locations/check_answers.html.erb @@ -19,18 +19,18 @@ <%= govuk_summary_list do |summary_list| %> <% display_location_attributes_for_check_answers(@location).each do |attr| %> <% unless attr[:attribute].eql?("local_authority") && @location.is_la_inferred %> - <%= summary_list.row do |row| %> - <% row.key { attr[:name] } %> + <%= summary_list.with_row do |row| %> + <% row.with_key { attr[:name] } %> <% if attr[:attribute].eql?("postcode") && @location.is_la_inferred %> - <% row.value do %> + <% row.with_value do %> <%= details_html(attr) %> <%= formatted_local_authority_timeline(@location) %> <% end %> <% else %> - <% row.value { details_html(attr) } %> + <% row.with_value { details_html(attr) } %> <% end %> <% if LocationPolicy.new(current_user, @location).update? %> - <% row.action(text: action_text_helper(attr, @location), href: location_edit_path(@location, attr[:attribute])) %> + <% row.with_action(text: action_text_helper(attr, @location), href: location_edit_path(@location, attr[:attribute])) %> <% end %> <% end %> <% end %> diff --git a/app/views/locations/index.html.erb b/app/views/locations/index.html.erb index 5f07a9a62..1705724bb 100644 --- a/app/views/locations/index.html.erb +++ b/app/views/locations/index.html.erb @@ -29,36 +29,36 @@ <%= govuk_section_break(visible: true, size: "m") %> <%= govuk_table do |table| %> - <%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> + <%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> <%= render(SearchResultCaptionComponent.new(searched: @searched, count: @pagy.count, item_label:, total_count: @total_count, item: "locations", filters_count: applied_filters_count(@filter_type))) %> <% end %> - <%= table.head do |head| %> - <%= head.row do |row| %> - <% row.cell(header: true, text: "Postcode", html_attributes: { + <%= table.with_head do |head| %> + <%= head.with_row do |row| %> + <% row.with_cell(header: true, text: "Postcode", html_attributes: { scope: "col", }) %> - <% row.cell(header: true, text: "Name", html_attributes: { + <% row.with_cell(header: true, text: "Name", html_attributes: { scope: "col", }) %> - <% row.cell(header: true, text: "Location code", html_attributes: { + <% row.with_cell(header: true, text: "Location code", html_attributes: { scope: "col", }) %> - <% row.cell(header: true, text: "Status", html_attributes: { + <% row.with_cell(header: true, text: "Status", html_attributes: { scope: "col", }) %> <% end %> <% end %> <% @locations.each do |location| %> - <%= table.body do |body| %> - <%= body.row do |row| %> - <% row.cell(text: simple_format(location_cell_postcode(location, if location.confirmed - scheme_location_path(@scheme, location) - else - location.postcode.present? ? scheme_location_check_answers_path(@scheme, location, route: "locations") : scheme_location_postcode_path(@scheme, location) - end), { class: "govuk-!-font-weight-bold" }, wrapper_tag: "div")) %> - <% row.cell(text: location.name) %> - <% row.cell(text: location.id) %> - <% row.cell(text: status_tag_from_resource(location)) %> + <%= table.with_body do |body| %> + <%= body.with_row do |row| %> + <% row.with_cell(text: simple_format(location_cell_postcode(location, if location.confirmed + scheme_location_path(@scheme, location) + else + location.postcode.present? ? scheme_location_check_answers_path(@scheme, location, route: "locations") : scheme_location_postcode_path(@scheme, location) + end), { class: "govuk-!-font-weight-bold" }, wrapper_tag: "div")) %> + <% row.with_cell(text: location.name) %> + <% row.with_cell(text: location.id) %> + <% row.with_cell(text: status_tag_from_resource(location)) %> <% end %> <% end %> <% end %> diff --git a/app/views/locations/show.html.erb b/app/views/locations/show.html.erb index 54758b00f..9b11e4052 100644 --- a/app/views/locations/show.html.erb +++ b/app/views/locations/show.html.erb @@ -16,24 +16,24 @@ <%= govuk_summary_list do |summary_list| %> <% display_location_attributes(@location).each do |attr| %> <% unless attr[:attribute].eql?("local_authority") && @location.is_la_inferred %> - <%= summary_list.row do |row| %> - <% row.key { attr[:name] } %> + <%= summary_list.with_row do |row| %> + <% row.with_key { attr[:name] } %> <% if attr[:attribute].eql?("status") %> - <%= row.value { status_tag_from_resource(@location) } %> + <%= row.with_value { status_tag_from_resource(@location) } %> <% elsif attr[:attribute].eql?("postcode") && @location.is_la_inferred %> - <% row.value do %> + <% row.with_value do %> <%= details_html(attr) %> <%= formatted_local_authority_timeline(@location) %> <% end %> <% else %> - <%= row.value { details_html(attr) } %> + <%= row.with_value { details_html(attr) } %> <% end %> <% if LocationPolicy.new(current_user, @location).update? %> - <% row.action(text: "Change", href: scheme_location_postcode_path(@scheme, @location, referrer: "details")) if attr[:attribute] == "postcode" && current_user.support? %> - <% row.action(text: "Change", href: scheme_location_name_path(@scheme, @location, referrer: "details")) if attr[:attribute] == "name" %> - <% row.action(text: "Change", href: scheme_location_units_path(@scheme, @location, referrer: "details")) if attr[:attribute] == "units" && current_user.support? %> - <% row.action(text: "Change", href: scheme_location_type_of_unit_path(@scheme, @location, referrer: "details")) if attr[:attribute] == "type_of_unit" && current_user.support? %> - <% row.action(text: "Change", href: scheme_location_mobility_standards_path(@scheme, @location, referrer: "details")) if attr[:attribute] == "mobility_standards" && current_user.support? %> + <% row.with_action(text: "Change", href: scheme_location_postcode_path(@scheme, @location, referrer: "details")) if attr[:attribute] == "postcode" && current_user.support? %> + <% row.with_action(text: "Change", href: scheme_location_name_path(@scheme, @location, referrer: "details")) if attr[:attribute] == "name" %> + <% row.with_action(text: "Change", href: scheme_location_units_path(@scheme, @location, referrer: "details")) if attr[:attribute] == "units" && current_user.support? %> + <% row.with_action(text: "Change", href: scheme_location_type_of_unit_path(@scheme, @location, referrer: "details")) if attr[:attribute] == "type_of_unit" && current_user.support? %> + <% row.with_action(text: "Change", href: scheme_location_mobility_standards_path(@scheme, @location, referrer: "details")) if attr[:attribute] == "mobility_standards" && current_user.support? %> <% end %> <% end %> <% end %> diff --git a/app/views/logs/_delete_logs_table_lettings.html.erb b/app/views/logs/_delete_logs_table_lettings.html.erb index bd5952170..a56de235a 100644 --- a/app/views/logs/_delete_logs_table_lettings.html.erb +++ b/app/views/logs/_delete_logs_table_lettings.html.erb @@ -1,24 +1,24 @@ <%= govuk_table do |table| %> - <% table.head do |head| %> - <% head.row do |row| %> - <% row.cell header: true, text: "Log ID" %> - <% row.cell header: true, text: "Tenancy code" %> - <% row.cell header: true, text: "Property reference" %> - <% row.cell header: true, text: "Status" %> - <% row.cell header: true, text: "Delete?" %> + <%= table.with_head do |head| %> + <% head.with_row do |row| %> + <% row.with_cell header: true, text: "Log ID" %> + <% row.with_cell header: true, text: "Tenancy code" %> + <% row.with_cell header: true, text: "Property reference" %> + <% row.with_cell header: true, text: "Status" %> + <% row.with_cell header: true, text: "Delete?" %> <% end %> <% end %> - <% table.body do |body| %> + <%= table.with_body do |body| %> <% f.govuk_check_boxes_fieldset :selected_ids, small: true do %> <% delete_logs_form.logs.each do |log| %> - <% body.row do |row| %> - <% row.cell do %> + <% body.with_row do |row| %> + <% row.with_cell do %> <%= govuk_link_to log.id, url_for(log) %> <% end %> - <% row.cell text: log.tenancycode %> - <% row.cell text: log.propcode %> - <% row.cell text: status_tag(log.status) %> - <% row.cell html_attributes: { class: "checkbox-cell" } do %> + <% row.with_cell text: log.tenancycode %> + <% row.with_cell text: log.propcode %> + <% row.with_cell text: status_tag(log.status) %> + <% row.with_cell html_attributes: { class: "checkbox-cell" } do %> <% f.govuk_check_box :selected_ids, log.id, label: { text: log.id, hidden: true }, checked: delete_logs_form.selected_ids.include?(log.id) %> diff --git a/app/views/logs/_delete_logs_table_sales.html.erb b/app/views/logs/_delete_logs_table_sales.html.erb index 8659f12bb..612de52de 100644 --- a/app/views/logs/_delete_logs_table_sales.html.erb +++ b/app/views/logs/_delete_logs_table_sales.html.erb @@ -1,24 +1,24 @@ <%= govuk_table do |table| %> - <% table.head do |head| %> - <% head.row do |row| %> - <% row.cell header: true, text: "Log ID" %> - <% row.cell header: true, text: "Purchaser code" %> - <% row.cell header: true, text: "Sale completion date" %> - <% row.cell header: true, text: "Status" %> - <% row.cell header: true, text: "Delete?" %> + <%= table.with_head do |head| %> + <% head.with_row do |row| %> + <% row.with_cell header: true, text: "Log ID" %> + <% row.with_cell header: true, text: "Purchaser code" %> + <% row.with_cell header: true, text: "Sale completion date" %> + <% row.with_cell header: true, text: "Status" %> + <% row.with_cell header: true, text: "Delete?" %> <% end %> <% end %> - <% table.body do |body| %> + <%= table.with_body do |body| %> <% f.govuk_check_boxes_fieldset :selected_ids, small: true do %> <% delete_logs_form.logs.each do |log| %> - <% body.row do |row| %> - <% row.cell do %> + <% body.with_row do |row| %> + <% row.with_cell do %> <%= govuk_link_to log.id, url_for(log) %> <% end %> - <% row.cell text: log.purchid %> - <% row.cell text: log.saledate&.to_formatted_s(:govuk_date) %> - <% row.cell text: status_tag(log.status) %> - <% row.cell html_attributes: { class: "checkbox-cell" } do %> + <% row.with_cell text: log.purchid %> + <% row.with_cell text: log.saledate&.to_formatted_s(:govuk_date) %> + <% row.with_cell text: status_tag(log.status) %> + <% row.with_cell html_attributes: { class: "checkbox-cell" } do %> <% f.govuk_check_box :selected_ids, log.id, label: { text: log.id, hidden: true }, checked: delete_logs_form.selected_ids.include?(log.id) %> diff --git a/app/views/logs/index.html.erb b/app/views/logs/index.html.erb index 66f50c3d7..f142a2580 100644 --- a/app/views/logs/index.html.erb +++ b/app/views/logs/index.html.erb @@ -27,7 +27,7 @@ title_heading_level: 3, title_id: "impacted-logs-banner", ) do |notification_banner| %> - <% notification_banner.heading(text: "A scheme has changed and it has affected #{@unresolved_count} #{'log'.pluralize(@unresolved_count)}") %> + <% notification_banner.with_heading(text: "A scheme has changed and it has affected #{@unresolved_count} #{'log'.pluralize(@unresolved_count)}") %>
<%= govuk_link_to "Update logs", update_logs_lettings_logs_path, class: "govuk-notification-banner__link" %>
diff --git a/app/views/logs/update_logs.html.erb b/app/views/logs/update_logs.html.erb index d89ecdc4b..1ab1fa31c 100644 --- a/app/views/logs/update_logs.html.erb +++ b/app/views/logs/update_logs.html.erb @@ -14,23 +14,23 @@ <% else %> <%= render partial: "organisations/headings", locals: { main: "You need to update #{@total_count} logs", sub: "" } %> <%= govuk_table do |table| %> - <% table.head do |head| %> - <% head.row do |row| %> - <% row.cell(header: true, text: "Log ID") %> - <% row.cell(header: true, text: "Tenancy code") %> - <% row.cell(header: true, text: "Property reference") %> - <% row.cell(header: true, text: "Status") %> - <% row.cell(header: true, text: "") %> + <%= table.with_head do |head| %> + <% head.with_row do |row| %> + <% row.with_cell(header: true, text: "Log ID") %> + <% row.with_cell(header: true, text: "Tenancy code") %> + <% row.with_cell(header: true, text: "Property reference") %> + <% row.with_cell(header: true, text: "Status") %> + <% row.with_cell(header: true, text: "") %> <% end %> <% end %> <% @logs.each do |log| %> - <% table.body do |body| %> - <% body.row do |row| %> - <% row.cell(text: log.id) %> - <% row.cell(text: log.tenancycode) %> - <% row.cell(text: log.propcode) %> - <% row.cell(text: status_tag(log.status)) %> - <% row.cell(html_attributes: { + <%= table.with_body do |body| %> + <% body.with_row do |row| %> + <% row.with_cell(text: log.id) %> + <% row.with_cell(text: log.tenancycode) %> + <% row.with_cell(text: log.propcode) %> + <% row.with_cell(text: status_tag(log.status)) %> + <% row.with_cell(html_attributes: { scope: "row", class: "govuk-!-text-align-right", }) do %> diff --git a/app/views/merge_requests/organisations.html.erb b/app/views/merge_requests/organisations.html.erb index 2a3c7a444..8a47a8641 100644 --- a/app/views/merge_requests/organisations.html.erb +++ b/app/views/merge_requests/organisations.html.erb @@ -23,10 +23,10 @@ <%= f.govuk_submit "Add organisation", classes: "govuk-button--secondary" %> <%= govuk_table do |table| %> <% @merge_request.merging_organisations.order(:name).each do |merging_organisation| %> - <%= table.body do |body| %> - <%= body.row do |row| %> - <% row.cell(text: merging_organisation.name) %> - <% row.cell(html_attributes: { + <%= table.with_body do |body| %> + <%= body.with_row do |row| %> + <% row.with_cell(text: merging_organisation.name) %> + <% row.with_cell(html_attributes: { scope: "row", class: "govuk-!-text-align-right", }) do %> diff --git a/app/views/organisation_relationships/_managing_agent_list.erb b/app/views/organisation_relationships/_managing_agent_list.erb index fd5862b8c..81a1f6070 100644 --- a/app/views/organisation_relationships/_managing_agent_list.erb +++ b/app/views/organisation_relationships/_managing_agent_list.erb @@ -1,14 +1,14 @@
<%= govuk_table do |table| %> - <%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> + <%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "agents", filters_count: 0)) %> <% end %> <% @managing_agents.each do |managing_agent| %> - <%= table.body do |body| %> - <%= body.row do |row| %> - <% row.cell(text: managing_agent.name) %> + <%= table.with_body do |body| %> + <%= body.with_row do |row| %> + <% row.with_cell(text: managing_agent.name) %> <% if current_user.data_coordinator? || current_user.support? %> - <% row.cell(html_attributes: { + <% row.with_cell(html_attributes: { scope: "row", class: "govuk-!-text-align-right", }) do %> diff --git a/app/views/organisation_relationships/_stock_owner_list.erb b/app/views/organisation_relationships/_stock_owner_list.erb index 63725c2e2..2fb0de80b 100644 --- a/app/views/organisation_relationships/_stock_owner_list.erb +++ b/app/views/organisation_relationships/_stock_owner_list.erb @@ -1,14 +1,14 @@
<%= govuk_table do |table| %> - <%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> + <%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "stock owners", filters_count: 0)) %> <% end %> <% @stock_owners.each do |stock_owner| %> - <%= table.body do |body| %> - <%= body.row do |row| %> - <% row.cell(text: stock_owner.name) %> + <%= table.with_body do |body| %> + <%= body.with_row do |row| %> + <% row.with_cell(text: stock_owner.name) %> <% if current_user.data_coordinator? || current_user.support? %> - <% row.cell(html_attributes: { + <% row.with_cell(html_attributes: { scope: "row", class: "govuk-!-text-align-right", }) do %> diff --git a/app/views/organisations/_merged_organisation_details.html.erb b/app/views/organisations/_merged_organisation_details.html.erb index 0f35b5f4a..e54735225 100644 --- a/app/views/organisations/_merged_organisation_details.html.erb +++ b/app/views/organisations/_merged_organisation_details.html.erb @@ -3,21 +3,21 @@ <% @organisation.recently_absorbed_organisations_grouped_by_merge_date.each do |merge_date, organisations| %>

Merge date: <%= merge_date&.to_formatted_s(:govuk_date) %>

<%= govuk_table do |table| %> - <%= table.head do |head| %> - <%= head.row do |row| %> - <% row.cell(header: true, text: "Organisation name", html_attributes: { scope: "col", class: "govuk-!-width-one-half" }) %> - <% row.cell(header: true, text: "Organisation ID", html_attributes: { scope: "col", class: "govuk-!-width-one-half" }) %> + <%= table.with_head do |head| %> + <%= head.with_row do |row| %> + <% row.with_cell(header: true, text: "Organisation name", html_attributes: { scope: "col", class: "govuk-!-width-one-half" }) %> + <% row.with_cell(header: true, text: "Organisation ID", html_attributes: { scope: "col", class: "govuk-!-width-one-half" }) %> <% end %> <% end %> <% organisations.each do |absorbed_org| %> - <%= table.body do |body| %> - <%= body.row do |row| %> + <%= table.with_body do |body| %> + <%= body.with_row do |row| %> <% if current_user.support? %> - <% row.cell(text: simple_format(govuk_link_to(absorbed_org.name, organisation_path(absorbed_org)), { class: "govuk-!-font-weight-bold scheme-name-cell" }, wrapper_tag: "div")) %> + <% row.with_cell(text: simple_format(govuk_link_to(absorbed_org.name, organisation_path(absorbed_org)), { class: "govuk-!-font-weight-bold scheme-name-cell" }, wrapper_tag: "div")) %> <% else %> - <% row.cell(text: absorbed_org.name) %> + <% row.with_cell(text: absorbed_org.name) %> <% end %> - <% row.cell(text: "ORG#{absorbed_org.id}") %> + <% row.with_cell(text: "ORG#{absorbed_org.id}") %> <% end %> <% end %> <% end %> diff --git a/app/views/organisations/_organisation_list.html.erb b/app/views/organisations/_organisation_list.html.erb index 7c871a125..67cc9c7a3 100644 --- a/app/views/organisations/_organisation_list.html.erb +++ b/app/views/organisations/_organisation_list.html.erb @@ -1,35 +1,35 @@
<%= govuk_table do |table| %> - <%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> + <%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "organisations", filters_count: applied_filters_count(@filter_type))) %> <% end %> - <%= table.head do |head| %> - <%= head.row do |row| %> - <% row.cell(header: true, text: "Name", html_attributes: { + <%= table.with_head do |head| %> + <%= head.with_row do |row| %> + <% row.with_cell(header: true, text: "Name", html_attributes: { scope: "col", }) %> - <% row.cell(header: true, text: "Registration number", html_attributes: { + <% row.with_cell(header: true, text: "Registration number", html_attributes: { scope: "col", }) %> - <% row.cell(header: true, text: "Type", html_attributes: { + <% row.with_cell(header: true, text: "Type", html_attributes: { scope: "col", }) %> - <% row.cell(header: true, text: "Status", html_attributes: { + <% row.with_cell(header: true, text: "Status", html_attributes: { scope: "col", }) %> <% end %> <% end %> <% @organisations.each do |organisation| %> - <%= table.body do |body| %> - <%= body.row do |row| %> - <% row.cell(header: true, html_attributes: { + <%= table.with_body do |body| %> + <%= body.with_row do |row| %> + <% row.with_cell(header: true, html_attributes: { scope: "row", }) do %> <%= govuk_link_to(organisation.name, "organisations/#{organisation.id}/lettings-logs") %> <% end %> - <% row.cell(text: organisation.housing_registration_no) %> - <% row.cell(text: organisation.display_provider_type) %> - <% row.cell(text: status_tag(organisation.status)) %> + <% row.with_cell(text: organisation.housing_registration_no) %> + <% row.with_cell(text: organisation.display_provider_type) %> + <% row.with_cell(text: status_tag(organisation.status)) %> <% end %> <% end %> <% end %> diff --git a/app/views/organisations/show.html.erb b/app/views/organisations/show.html.erb index 9cfecda26..48084dbf8 100644 --- a/app/views/organisations/show.html.erb +++ b/app/views/organisations/show.html.erb @@ -17,20 +17,20 @@ <%= organisation_name_row(user: current_user, organisation: @organisation, summary_list:) %> <% display_organisation_attributes(@organisation).each do |attr| %> <% if can_edit_org?(current_user) && attr[:editable] %> - <%= summary_list.row do |row| %> - <% row.key { attr[:name] } %> - <% row.value { details_html(attr) } %> - <% row.action( + <%= summary_list.with_row do |row| %> + <% row.with_key { attr[:name] } %> + <% row.with_value { details_html(attr) } %> + <% row.with_action( visually_hidden_text: attr[:name].to_s.humanize.downcase, href: edit_organisation_path(@organisation), html_attributes: { "data-qa": "change-#{attr[:name].downcase}" }, ) %> <% end %> <% else %> - <%= summary_list.row do |row| %> - <% row.key { attr[:name] } %> - <% row.value { details_html(attr) } %> - <% row.action %> + <%= summary_list.with_row do |row| %> + <% row.with_key { attr[:name] } %> + <% row.with_value { details_html(attr) } %> + <% row.with_action %> <% end %> <% end %> <% end %> diff --git a/app/views/schemes/_scheme_list.html.erb b/app/views/schemes/_scheme_list.html.erb index 8686f3f12..e6d25f79b 100644 --- a/app/views/schemes/_scheme_list.html.erb +++ b/app/views/schemes/_scheme_list.html.erb @@ -1,6 +1,6 @@
<%= govuk_table do |table| %> - <%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> + <%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "schemes", filters_count: applied_filters_count(@filter_type))) %> <% if @schemes&.any? %> @@ -10,23 +10,23 @@ <% end %> <% end %> - <%= table.head do |head| %> - <%= head.row do |row| %> - <% row.cell(header: true, text: "Scheme", html_attributes: { scope: "col", class: "govuk-!-width-one-quarter" }) %> - <% row.cell(header: true, text: "Stock owner", html_attributes: { scope: "col" }) %> - <% row.cell(header: true, text: "Scheme code", html_attributes: { scope: "col" }) %> - <% row.cell(header: true, text: "Locations", html_attributes: { scope: "col" }) %> - <% row.cell(header: true, text: "Status", html_attributes: { scope: "col" }) %> + <%= table.with_head do |head| %> + <%= head.with_row do |row| %> + <% row.with_cell(header: true, text: "Scheme", html_attributes: { scope: "col", class: "govuk-!-width-one-quarter" }) %> + <% row.with_cell(header: true, text: "Stock owner", html_attributes: { scope: "col" }) %> + <% row.with_cell(header: true, text: "Scheme code", html_attributes: { scope: "col" }) %> + <% row.with_cell(header: true, text: "Locations", html_attributes: { scope: "col" }) %> + <% row.with_cell(header: true, text: "Status", html_attributes: { scope: "col" }) %> <% end %> <% end %> <% @schemes.each do |scheme| %> - <%= table.body do |body| %> - <%= body.row do |row| %> - <% row.cell(text: simple_format(scheme_cell(scheme), { class: "govuk-!-font-weight-bold scheme-name-cell" }, wrapper_tag: "div")) %> - <% row.cell(text: scheme.owning_organisation&.name) %> - <% row.cell(text: scheme.id_to_display) %> - <% row.cell(text: scheme.locations&.count) %> - <% row.cell(text: status_tag_from_resource(scheme)) %> + <%= table.with_body do |body| %> + <%= body.with_row do |row| %> + <% row.with_cell(text: simple_format(scheme_cell(scheme), { class: "govuk-!-font-weight-bold scheme-name-cell" }, wrapper_tag: "div")) %> + <% row.with_cell(text: scheme.owning_organisation&.name) %> + <% row.with_cell(text: scheme.id_to_display) %> + <% row.with_cell(text: scheme.locations&.count) %> + <% row.with_cell(text: status_tag_from_resource(scheme)) %> <% end %> <% end %> <% end %> diff --git a/app/views/schemes/check_answers.html.erb b/app/views/schemes/check_answers.html.erb index 36c459ada..71e23b25c 100644 --- a/app/views/schemes/check_answers.html.erb +++ b/app/views/schemes/check_answers.html.erb @@ -5,7 +5,7 @@ <%= render partial: "organisations/headings", locals: { main: "Check your changes before creating this scheme", sub: @scheme.service_name } %> <%= govuk_tabs(title: "Check your answers before creating this scheme") do |component| %> - <% component.tab(label: "Scheme") do %> + <% component.with_tab(label: "Scheme") do %>

Scheme

<% @scheme.check_details_attributes.each do |attr| %> diff --git a/app/views/users/_user_list.html.erb b/app/views/users/_user_list.html.erb index 9ff4ebc4b..fd854b53b 100644 --- a/app/views/users/_user_list.html.erb +++ b/app/views/users/_user_list.html.erb @@ -1,29 +1,29 @@
<%= govuk_table do |table| %> - <%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> + <%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "users", filters_count: applied_filters_count(@filter_type))) %> <% if current_user.support? %> <% query = searched.present? ? "?search=#{searched}" : nil %> <%= govuk_link_to "Download (CSV)", "#{request.path}.csv#{query}", type: "text/csv", style: "white-space: nowrap" %> <% end %> <% end %> - <%= table.head do |head| %> - <%= head.row do |row| %> - <% row.cell(header: true, text: "Name and email address", html_attributes: { + <%= table.with_head do |head| %> + <%= head.with_row do |row| %> + <% row.with_cell(header: true, text: "Name and email address", html_attributes: { scope: "col", }) %> - <% row.cell(header: true, text: "Organisation and role", html_attributes: { + <% row.with_cell(header: true, text: "Organisation and role", html_attributes: { scope: "col", }) %> - <% row.cell(header: true, text: "Last logged in", html_attributes: { + <% row.with_cell(header: true, text: "Last logged in", html_attributes: { scope: "col", }) %> <% end %> <% end %> <% users.each do |user| %> - <%= table.body do |body| %> - <%= body.row do |row| %> - <% row.cell(header: true, html_attributes: { + <%= table.with_body do |body| %> + <%= body.with_row do |row| %> + <% row.with_cell(header: true, html_attributes: { scope: "row", }) do %> <%= simple_format(user_cell(user), {}, wrapper_tag: "span") %> @@ -49,8 +49,8 @@ <%= "" %> <% end %> <% end %> - <% row.cell(text: simple_format(org_cell(user), {}, wrapper_tag: "div")) %> - <% row.cell(text: user.active? ? user.last_sign_in_at&.to_formatted_s(:govuk_date) : "Deactivated") %> + <% row.with_cell(text: simple_format(org_cell(user), {}, wrapper_tag: "div")) %> + <% row.with_cell(text: user.active? ? user.last_sign_in_at&.to_formatted_s(:govuk_date) : "Deactivated") %> <%= govuk_link_to users_path(user) do %> User <%= user.id %> <% end %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 3414cdd35..895a2fe79 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -21,95 +21,95 @@ Personal details <%= govuk_summary_list do |summary_list| %> - <%= summary_list.row do |row| - row.key { "Name" } - row.value { @user.name } + <%= summary_list.with_row do |row| + row.with_key { "Name" } + row.with_value { @user.name } if UserPolicy.new(current_user, @user).edit_names? - row.action(visually_hidden_text: "name", href: aliased_user_edit(@user, current_user), html_attributes: { "data-qa": "change-name" }) + row.with_action(visually_hidden_text: "name", href: aliased_user_edit(@user, current_user), html_attributes: { "data-qa": "change-name" }) else - row.action + row.with_action end end %> - <%= summary_list.row do |row| - row.key { "Email address" } - row.value { @user.email } + <%= summary_list.with_row do |row| + row.with_key { "Email address" } + row.with_value { @user.email } if UserPolicy.new(current_user, @user).edit_emails? - row.action(visually_hidden_text: "email address", href: aliased_user_edit(@user, current_user), html_attributes: { "data-qa": "change-email-address" }) + row.with_action(visually_hidden_text: "email address", href: aliased_user_edit(@user, current_user), html_attributes: { "data-qa": "change-email-address" }) else - row.action + row.with_action end end %> - <%= summary_list.row do |row| - row.key { "Telephone number" } - row.value { @user.phone } + <%= summary_list.with_row do |row| + row.with_key { "Telephone number" } + row.with_value { @user.phone } if UserPolicy.new(current_user, @user).edit_telephone_numbers? - row.action(visually_hidden_text: "telephone number", href: aliased_user_edit(@user, current_user), html_attributes: { "data-qa": "change-telephone-number" }) + row.with_action(visually_hidden_text: "telephone number", href: aliased_user_edit(@user, current_user), html_attributes: { "data-qa": "change-telephone-number" }) else - row.action + row.with_action end end %> - <%= summary_list.row do |row| - row.key { "Password" } - row.value { "••••••••" } + <%= summary_list.with_row do |row| + row.with_key { "Password" } + row.with_value { "••••••••" } if UserPolicy.new(current_user, @user).edit_password? - row.action( + row.with_action( visually_hidden_text: "password", href: edit_password_account_path, html_attributes: { "data-qa": "change-password" }, ) else - row.action + row.with_action end end %> - <%= summary_list.row do |row| - row.key { "Organisation" } - row.value { @user.organisation.name } - row.action + <%= summary_list.with_row do |row| + row.with_key { "Organisation" } + row.with_value { @user.organisation.name } + row.with_action end %> - <%= summary_list.row do |row| - row.key { "Role" } - row.value { @user.role&.humanize } + <%= summary_list.with_row do |row| + row.with_key { "Role" } + row.with_value { @user.role&.humanize } if UserPolicy.new(current_user, @user).edit_roles? - row.action( + row.with_action( visually_hidden_text: "role", href: aliased_user_edit(@user, current_user), html_attributes: { "data-qa": "change-role" }, ) else - row.action + row.with_action end end %> - <%= summary_list.row do |row| - row.key { "Data protection officer" } - row.value { @user.is_data_protection_officer? ? "Yes" : "No" } + <%= summary_list.with_row do |row| + row.with_key { "Data protection officer" } + row.with_value { @user.is_data_protection_officer? ? "Yes" : "No" } if UserPolicy.new(current_user, @user).edit_dpo? - row.action( + row.with_action( visually_hidden_text: "if data protection officer", href: user_edit_dpo_path(@user), html_attributes: { "data-qa": "change-data-protection-officer" }, ) else - row.action + row.with_action end end %> - <%= summary_list.row do |row| - row.key { "Key contact" } - row.value { @user.is_key_contact? ? "Yes" : "No" } + <%= summary_list.with_row do |row| + row.with_key { "Key contact" } + row.with_value { @user.is_key_contact? ? "Yes" : "No" } if UserPolicy.new(current_user, @user).edit_key_contact? - row.action( + row.with_action( visually_hidden_text: "if a key contact", href: user_edit_key_contact_path(@user), html_attributes: { "data-qa": "change-key-contact" }, ) else - row.action + row.with_action end end %> <% end %> diff --git a/package.json b/package.json index bfc106d9a..5b34103fe 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "@hotwired/stimulus": "^3.0.0", "@stimulus/polyfills": "^2.0.0", "@webcomponents/webcomponentsjs": "^2.6.0", - "@x-govuk/govuk-prototype-components": "^2.0.1", + "@x-govuk/govuk-prototype-components": "^3.0.1", "accessible-autocomplete": "^2.0.3", "babel-loader": "^8.2.3", "babel-plugin-macros": "^3.1.0", @@ -20,7 +20,7 @@ "css-loader": "^6.7.1", "custom-event-polyfill": "^1.0.7", "file-loader": "^6.2.0", - "govuk-frontend": "4.7.0", + "govuk-frontend": "5.0.0", "html5shiv": "^3.7.3", "intersection-observer": "^0.12.0", "mini-css-extract-plugin": "^2.6.0", diff --git a/spec/components/create_log_actions_component_spec.rb b/spec/components/create_log_actions_component_spec.rb index a52f851f0..6572c93f9 100644 --- a/spec/components/create_log_actions_component_spec.rb +++ b/spec/components/create_log_actions_component_spec.rb @@ -3,6 +3,7 @@ require "rails_helper" RSpec.describe CreateLogActionsComponent, type: :component do include GovukComponentsHelper include GovukLinkHelper + include GovukVisuallyHiddenHelper let(:component) { described_class.new(user:, log_type:, bulk_upload:) } let(:render) { render_inline(component) } diff --git a/spec/components/search_component_spec.rb b/spec/components/search_component_spec.rb index 9e571b0de..a1b6d725d 100644 --- a/spec/components/search_component_spec.rb +++ b/spec/components/search_component_spec.rb @@ -6,7 +6,9 @@ RSpec.describe SearchComponent, type: :component do let(:value) { nil } before do - allow(request).to receive(:path).and_return("/users") + # rubocop:disable RSpec/AnyInstance + allow_any_instance_of(ActionDispatch::TestRequest).to receive(:path).and_return("/users") + # rubocop:enable RSpec/AnyInstance render_inline(described_class.new(current_user:, search_label:, value:)) end diff --git a/spec/config/routes_spec.rb b/spec/config/routes_spec.rb index e5f0505f4..51b508ec7 100644 --- a/spec/config/routes_spec.rb +++ b/spec/config/routes_spec.rb @@ -7,10 +7,11 @@ RSpec.describe "routes.rb" do let(:active_admin_routes_prefix) { "/admin" } let(:rails_routes_prefix) { "/rails" } let(:turbo_routes_pattern) { "_historical_location" } + let(:view_component_pattern) { "_system_test_entrypoint" } let(:project_routes) do all_routes.reject do |r| r.starts_with?(active_admin_routes_prefix) || r.starts_with?(rails_routes_prefix) || - r.include?(turbo_routes_pattern) + r.include?(turbo_routes_pattern) || r.include?(view_component_pattern) end end diff --git a/spec/features/form/form_navigation_spec.rb b/spec/features/form/form_navigation_spec.rb index a5784d1ec..d248fbfcc 100644 --- a/spec/features/form/form_navigation_spec.rb +++ b/spec/features/form/form_navigation_spec.rb @@ -137,7 +137,7 @@ RSpec.describe "Form Navigation" do it "shows a validation error on radio questions" do visit("/lettings-logs/#{id}/renewal") click_button("Save and continue") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_selector("#lettings-log-renewal-error") expect(page).to have_title("Error") end @@ -145,7 +145,7 @@ RSpec.describe "Form Navigation" do it "shows a validation error on date questions" do visit("/lettings-logs/#{id}/tenancy-start-date") click_button("Save and continue") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_selector("#lettings-log-startdate-error") expect(page).to have_title("Error") end @@ -156,7 +156,7 @@ RSpec.describe "Form Navigation" do visit("/lettings-logs/#{id}/armed-forces") choose("lettings-log-armedforces-1-field", allow_label_click: true) click_button("Save and continue") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_selector("#lettings-log-leftreg-error") expect(page).to have_title("Error") end @@ -170,7 +170,7 @@ RSpec.describe "Form Navigation" do it "does not show a validation error" do visit("/lettings-logs/#{id}/tenant-code") click_button("Save and continue") - expect(page).not_to have_selector("#error-summary-title") + expect(page).not_to have_selector(".govuk-error-summary__title") expect(page).not_to have_title("Error") expect(page).to have_current_path("/lettings-logs/#{id}/property-reference") end diff --git a/spec/features/form/validations_spec.rb b/spec/features/form/validations_spec.rb index 48bafbf9a..a3a5b9bc2 100644 --- a/spec/features/form/validations_spec.rb +++ b/spec/features/form/validations_spec.rb @@ -55,7 +55,7 @@ RSpec.describe "validations" do it "shows validation for under 0" do visit("/lettings-logs/#{id}/person-1-age") fill_in_number_question(empty_lettings_log.id, "age1", -5, "person-1-age") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_selector("#lettings-log-age1-error") expect(page).to have_selector("#lettings-log-age1-field-error") expect(page).to have_title("Error") @@ -64,7 +64,7 @@ RSpec.describe "validations" do it "shows validation for over 120" do visit("/lettings-logs/#{id}/person-1-age") fill_in_number_question(empty_lettings_log.id, "age1", 121, "person-1-age") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_selector("#lettings-log-age1-error") expect(page).to have_selector("#lettings-log-age1-field-error") expect(page).to have_title("Error") diff --git a/spec/features/user_spec.rb b/spec/features/user_spec.rb index 2da53970b..01a32de5c 100644 --- a/spec/features/user_spec.rb +++ b/spec/features/user_spec.rb @@ -65,7 +65,7 @@ RSpec.describe "User Features" do it "is shown an error message if they submit without entering an email address" do visit("/account/password/new") click_button("Send email") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_selector("#user-email-field-error") expect(page).to have_title("Error") end @@ -74,7 +74,7 @@ RSpec.describe "User Features" do visit("/account/password/new") fill_in("user[email]", with: "thisisn'tanemail") click_button("Send email") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_selector("#user-email-field-error") expect(page).to have_title("Error") end @@ -166,7 +166,7 @@ RSpec.describe "User Features" do fill_in("user[email]", with: user.email) fill_in("user[password]", with: "nonsense") click_button("Sign in") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_no_css(".govuk-notification-banner.govuk-notification-banner--success") expect(page).to have_title("Error") end @@ -174,7 +174,7 @@ RSpec.describe "User Features" do it "show specific field error messages if a field was omitted" do visit("/lettings-logs") click_button("Sign in") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_selector("#user-email-field-error") expect(page).to have_selector("#user-password-field-error") expect(page).to have_title("Error") @@ -184,7 +184,7 @@ RSpec.describe "User Features" do visit("/lettings-logs") fill_in("user[email]", with: "thisisn'tanemail") click_button("Sign in") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_selector("#user-email-field-error") expect(page).to have_content(/Enter an email address in the correct format, like name@example.com/) expect(page).to have_title("Error") @@ -201,7 +201,7 @@ RSpec.describe "User Features" do fill_in("user[email]", with: user.email) fill_in("user[password]", with: "pAssword1") click_button("Sign in") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_no_css(".govuk-notification-banner.govuk-notification-banner--success") expect(page).to have_title("Error") end @@ -379,7 +379,7 @@ RSpec.describe "User Features" do visit("users/new") fill_in("user[name]", with: "New User") click_button("Continue") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_selector("#user-email-field-error") expect(page).to have_content(/Enter an email address/) expect(page).to have_title("Error") @@ -390,7 +390,7 @@ RSpec.describe "User Features" do fill_in("user[name]", with: "New User") fill_in("user[email]", with: "thisis'tanemail") click_button("Continue") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_selector("#user-email-field-error") expect(page).to have_content(/Enter an email address in the correct format, like name@example.com/) expect(page).to have_title("Error") @@ -676,7 +676,7 @@ RSpec.describe "User Features" do expect(page).to have_content("Check your email") expect(page).to have_http_status(:unprocessable_entity) expect(page).to have_title("Error") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") end end end @@ -689,7 +689,7 @@ RSpec.describe "User Features" do expect(page).to have_content("Check your email") expect(page).to have_http_status(:unprocessable_entity) expect(page).to have_title("Error") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") end end @@ -747,7 +747,7 @@ RSpec.describe "User Features" do it "is shown an error message if they submit without entering an email address" do visit("/account/password/new") click_button("Send email") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_selector("#user-email-field-error") expect(page).to have_title("Error") end diff --git a/spec/requests/auth/confirmations_controller_spec.rb b/spec/requests/auth/confirmations_controller_spec.rb index d734fed8c..7d0bc1b41 100644 --- a/spec/requests/auth/confirmations_controller_spec.rb +++ b/spec/requests/auth/confirmations_controller_spec.rb @@ -81,7 +81,7 @@ RSpec.describe Auth::ConfirmationsController, type: :request do it "does not show an error message" do follow_redirect! - expect(page).not_to have_selector("#error-summary-title") + expect(page).not_to have_selector(".govuk-error-summary__title") end end end diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rb index 7f1b3ffef..90b49c2be 100644 --- a/spec/requests/users_controller_spec.rb +++ b/spec/requests/users_controller_spec.rb @@ -66,7 +66,7 @@ RSpec.describe UsersController, type: :request do it "shows an error on the same page if passwords don't match" do expect(response).to have_http_status(:unprocessable_entity) expect(page).to have_css("h1", class: "govuk-heading-l", text: "Change your password") - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_content("passwords you entered do not match") end end @@ -351,7 +351,7 @@ RSpec.describe UsersController, type: :request do it "shows an error if passwords don't match" do expect(response).to have_http_status(:unprocessable_entity) - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") end end end @@ -776,7 +776,7 @@ RSpec.describe UsersController, type: :request do it "shows an error if passwords don't match" do expect(response).to have_http_status(:unprocessable_entity) - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") end end end @@ -1732,7 +1732,7 @@ RSpec.describe UsersController, type: :request do it "shows an error if passwords don't match" do expect(response).to have_http_status(:unprocessable_entity) - expect(page).to have_selector("#error-summary-title") + expect(page).to have_selector(".govuk-error-summary__title") end end end diff --git a/webpack.config.js b/webpack.config.js index 597886870..8a4f8600b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -39,10 +39,10 @@ module.exports = { }, resolve: { alias: { - 'govuk-frontend-styles': path.resolve(__dirname, 'node_modules/govuk-frontend/govuk/all.scss'), + 'govuk-frontend-styles': path.resolve(__dirname, 'node_modules/govuk-frontend/dist/govuk/all.scss'), 'govuk-prototype-styles': path.resolve(__dirname, 'node_modules/@x-govuk/govuk-prototype-components/x-govuk/all.scss') }, - modules: ['node_modules', 'node_modules/govuk-frontend/govuk'] + modules: ['node_modules', 'node_modules/govuk-frontend/dist/govuk'] }, output: { filename: '[name].js', @@ -57,8 +57,8 @@ module.exports = { new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }), new CopyPlugin({ patterns: [ - { from: 'node_modules/govuk-frontend/govuk/assets/images', to: 'images' }, - { from: 'node_modules/govuk-frontend/govuk/assets/fonts', to: 'fonts' }, + { from: 'node_modules/govuk-frontend/dist/govuk/assets/images', to: 'images' }, + { from: 'node_modules/govuk-frontend/dist/govuk/assets/fonts', to: 'fonts' }, { from: 'node_modules/html5shiv/dist/html5shiv.min.js', to: 'vendor' }, { from: 'app/frontend/vendor/outerHTML.js', to: 'vendor' }, { from: 'app/frontend/vendor/polyfill-output-value.js', to: 'vendor' } diff --git a/yarn.lock b/yarn.lock index 678a5b8c3..c25e5b2fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1411,15 +1411,15 @@ resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.7.0.tgz#e1993689ac42d2b16e9194376cfb6753f6254db1" integrity sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q== -"@x-govuk/govuk-prototype-components@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@x-govuk/govuk-prototype-components/-/govuk-prototype-components-2.0.1.tgz#5b18efd3d2d5904a56604ad545961d588bedfaff" - integrity sha512-10Jf0hOYV8BJJePID04PtYVPJWzuaWWslhTZXtLIRMpxDStDgZlfekGqMiQwyz3MFcLhdch+0hSIRcw9YrAbHg== +"@x-govuk/govuk-prototype-components@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@x-govuk/govuk-prototype-components/-/govuk-prototype-components-3.0.1.tgz#6f858c014da67c4811919cd6e1e5f7dd65188d26" + integrity sha512-sbMG3RJi5r1eRPK5cOerXjhz1dq5kwH771JoGziIcFZwpVtPIYDAHrCCoH62AVCZAhzuWF2eSRrEo9zghX3sJw== dependencies: accessible-autocomplete "^2.0.4" eventslibjs "^1.2.0" optionalDependencies: - govuk-prototype-kit "^13.0.1" + govuk-prototype-kit "^13.14.1" "@xtuc/ieee754@^1.2.0": version "1.2.0" @@ -1789,7 +1789,7 @@ body-parser@1.20.1: type-is "~1.6.18" unpipe "1.0.0" -body-parser@^1.20.1: +body-parser@^1.20.2: version "1.20.2" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== @@ -1844,7 +1844,7 @@ browser-sync-ui@^2.29.3: socket.io-client "^4.4.1" stream-throttle "^0.1.3" -browser-sync@^2.27.11: +browser-sync@^2.29.3: version "2.29.3" resolved "https://registry.yarnpkg.com/browser-sync/-/browser-sync-2.29.3.tgz#c2a3ff00c659eb87a13cae9d7a427e1b4b580ee1" integrity sha512-NiM38O6XU84+MN+gzspVmXV2fTOoe+jBqIBx3IBdhZrdeURr6ZgznJr/p+hQ+KzkKEiGH/GcC4SQFSL0jV49bg== @@ -2249,10 +2249,10 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -csrf-csrf@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/csrf-csrf/-/csrf-csrf-2.2.4.tgz#449251207815ef711484c88c18463bad1879daa5" - integrity sha512-LuhBmy5RfRmEfeqeYqgaAuS1eDpVtKZB/Eiec9xiKQLBynJxrGVRdM2yRT/YMl1Njo/yKh2L9AYsIwSlTPnx2A== +csrf-csrf@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/csrf-csrf/-/csrf-csrf-2.3.0.tgz#dfcd4e4f1c9efd9896b9ed5fe6074f3474b8ee5d" + integrity sha512-bUVpFobukoKdE2h0VNTgRmPelVnsGcnVavUOCYLFBnl6ss98bW7hPFWsQyuHMVdYK2NGRlQvthUEb4iX5nUb1w== dependencies: http-errors "^2.0.0" @@ -2314,7 +2314,7 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: +debug@^4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -2424,7 +2424,7 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dotenv@^16.0.3: +dotenv@^16.3.1: version "16.3.1" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== @@ -3076,10 +3076,10 @@ fs-extra@3.0.1: jsonfile "^3.0.0" universalify "^0.1.0" -fs-extra@^11.1.0: - version "11.1.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" - integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== +fs-extra@^11.1.1: + version "11.2.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" + integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== dependencies: graceful-fs "^4.2.0" jsonfile "^6.0.1" @@ -3240,41 +3240,46 @@ globjoin@^0.1.4: resolved "https://registry.yarnpkg.com/globjoin/-/globjoin-0.1.4.tgz#2f4494ac8919e3767c5cbb691e9f463324285d43" integrity sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg== -govuk-frontend@4.7.0, govuk-frontend@^4.5.0: +govuk-frontend@4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-4.7.0.tgz#69950b6c2e69f435ffe9aa60d8dee232dac977de" integrity sha512-0OsdCusF5qvLWwKziU8zqxiC0nq6WP0ZQuw51ymZ/1V0tO71oIKMlSLN2S9bm8RcEGSoidPt2A34gKxePrLjvg== -govuk-prototype-kit@^13.0.1: - version "13.11.0" - resolved "https://registry.yarnpkg.com/govuk-prototype-kit/-/govuk-prototype-kit-13.11.0.tgz#52e3b5497a78aea89aeb60012d1058dbd79e6061" - integrity sha512-P28YQttSGgDfemhlVsOCnAWtqCyt0eX24ACxLWmx0r2zD1rVeTv4EdmrzfrZBiEMfx2JTa1PQRZYMVmh/BZB+Q== +govuk-frontend@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-5.0.0.tgz#c08a4d1115fb31eb39b6d19979c627f816185dd7" + integrity sha512-3WSfvQ+3kw/q/m8jrq/t8XnMUA8D2r0uhGyZaDbIh1gWTJBQzJBHbHiKYI9nc9ixIXdCFsc9RozkgEm57a795g== + +govuk-prototype-kit@^13.14.1: + version "13.16.0" + resolved "https://registry.yarnpkg.com/govuk-prototype-kit/-/govuk-prototype-kit-13.16.0.tgz#e4202f652f7800c2d178d26e0000ce8a1ad991e9" + integrity sha512-S9oKOkHDJS3P987JnjFuKlEOzLPl0EuAFh2AoqoX/qsKxiJExzRRmQ/5xzzd16j8YRrSwem+mqSCvczhTYk3Jg== dependencies: ansi-colors "^4.1.3" - body-parser "^1.20.1" - browser-sync "^2.27.11" + body-parser "^1.20.2" + browser-sync "^2.29.3" chokidar "^3.5.3" cookie-parser "^1.4.6" cross-spawn "^7.0.3" - csrf-csrf "^2.2.4" + csrf-csrf "^2.3.0" del "^6.1.1" - dotenv "^16.0.3" + dotenv "^16.3.1" express "^4.18.2" express-session "^1.17.3" - fs-extra "^11.1.0" - govuk-frontend "^4.5.0" - inquirer "^8.2.0" + fs-extra "^11.1.1" + govuk-frontend "4.7.0" + inquirer "^8.2.6" lodash "^4.17.21" - marked "^4.2.5" - nodemon "^2.0.20" - nunjucks "^3.2.3" + marked "^4.3.0" + nodemon "^3.0.1" + nunjucks "^3.2.4" portscanner "^2.2.0" require-dir "^1.2.0" - sass "^1.57.1" + sass "^1.69.5" sync-request "^6.1.0" - tar-stream "^3.1.2" + tar-stream "^3.1.6" universal-analytics "^0.5.3" - uuid "^9.0.0" + uuid "^9.0.1" zlib "^1.0.5" graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.4, graceful-fs@^4.2.9: @@ -3498,10 +3503,10 @@ ini@^1.3.5: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -inquirer@^8.2.0: - version "8.2.5" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.5.tgz#d8654a7542c35a9b9e069d27e2df4858784d54f8" - integrity sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ== +inquirer@^8.2.6: + version "8.2.6" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.6.tgz#733b74888195d8d400a67ac332011b5fae5ea562" + integrity sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg== dependencies: ansi-escapes "^4.2.1" chalk "^4.1.1" @@ -3517,7 +3522,7 @@ inquirer@^8.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" through "^2.3.6" - wrap-ansi "^7.0.0" + wrap-ansi "^6.0.1" internal-slot@^1.0.3: version "1.0.3" @@ -3974,7 +3979,7 @@ map-obj@^4.1.0: resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== -marked@^4.2.5: +marked@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== @@ -4155,18 +4160,18 @@ node-releases@^2.0.6: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== -nodemon@^2.0.20: - version "2.0.22" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.22.tgz#182c45c3a78da486f673d6c1702e00728daf5258" - integrity sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ== +nodemon@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.0.2.tgz#222dd0de79fc7b7b3eedba422d2b9e5fc678621e" + integrity sha512-9qIN2LNTrEzpOPBaWHTm4Asy1LxXLSickZStAQ4IZe7zsoIpD/A7LWxhZV3t4Zu352uBcqVnRsDXSMR2Sc3lTA== dependencies: chokidar "^3.5.2" - debug "^3.2.7" + debug "^4" ignore-by-default "^1.0.1" minimatch "^3.1.2" pstree.remy "^1.1.8" - semver "^5.7.1" - simple-update-notifier "^1.0.7" + semver "^7.5.3" + simple-update-notifier "^2.0.0" supports-color "^5.5.0" touch "^3.1.0" undefsafe "^2.0.5" @@ -4193,7 +4198,7 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -nunjucks@^3.2.3: +nunjucks@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/nunjucks/-/nunjucks-3.2.4.tgz#f0878eef528ce7b0aa35d67cc6898635fd74649e" integrity sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ== @@ -4957,10 +4962,10 @@ sass@^1.49.9: immutable "^4.0.0" source-map-js ">=0.6.2 <2.0.0" -sass@^1.57.1: - version "1.64.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.64.0.tgz#9ca8d0acb1a704b86b7f1197dc310f568fb34638" - integrity sha512-m7YtAGmQta9uANIUJwXesAJMSncqH+3INc8kdVXs6eV6GUC8Qu2IYKQSN8PRLgiQfpca697G94klm2leYMxSHw== +sass@^1.69.5: + version "1.69.7" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.69.7.tgz#6e7e1c8f51e8162faec3e9619babc7da780af3b7" + integrity sha512-rzj2soDeZ8wtE2egyLXgOOHQvaC2iosZrkF6v3EUG+tBwEvhqUCzm0VP3k9gHF9LXbSrRhT5SksoI56Iw8NPnQ== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" @@ -4994,28 +4999,18 @@ schema-utils@^4.0.0: ajv-formats "^2.1.1" ajv-keywords "^5.0.0" -semver@^5.7.1: - version "5.7.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== - semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.0.0, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7: +semver@^7.0.0, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" -semver@~7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" - integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== - send@0.16.2: version "0.16.2" resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" @@ -5147,12 +5142,12 @@ signal-exit@^4.0.1: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.0.2.tgz#ff55bb1d9ff2114c13b400688fa544ac63c36967" integrity sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q== -simple-update-notifier@^1.0.7: - version "1.1.0" - resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz#67694c121de354af592b347cdba798463ed49c82" - integrity sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg== +simple-update-notifier@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz#d70b92bdab7d6d90dfd73931195a30b6e3d7cebb" + integrity sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w== dependencies: - semver "~7.0.0" + semver "^7.5.3" slash@^3.0.0: version "3.0.0" @@ -5573,7 +5568,7 @@ tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== -tar-stream@^3.1.2: +tar-stream@^3.1.6: version "3.1.6" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.6.tgz#6520607b55a06f4a2e2e04db360ba7d338cc5bab" integrity sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg== @@ -5829,10 +5824,10 @@ uuid@^8.0.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -uuid@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" - integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== +uuid@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== validate-npm-package-license@^3.0.1: version "3.0.4" @@ -5965,6 +5960,15 @@ word-wrap@^1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== +wrap-ansi@^6.0.1: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"