Browse Source

CLDC-3789 Update frontend components (#2854)

* Update govuk-components

* Use govuk_list for lists

* Update govuk-frontend and primary navigation

* Update govuk_design_system_formbuilder

* lint

* Remove primary navigation import

* Update tests

* Remove border on phase banner

* lint
pull/2769/head^2
kosiakkatrina 2 weeks ago committed by GitHub
parent
commit
151a443cf6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      Gemfile
  2. 14
      Gemfile.lock
  3. 22
      app/components/primary_navigation_component.html.erb
  4. 69
      app/frontend/styles/_primary-navigation.scss
  5. 42
      app/frontend/styles/application.scss
  6. 19
      app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb
  7. 12
      app/views/bulk_upload_lettings_resume/fix_choice.html.erb
  8. 19
      app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb
  9. 14
      app/views/bulk_upload_sales_resume/fix_choice.html.erb
  10. 7
      app/views/bulk_upload_shared/guidance.html.erb
  11. 6
      app/views/cookies/show.html.erb
  12. 2
      app/views/layouts/application.html.erb
  13. 10
      app/views/logs/delete_duplicates.html.erb
  14. 30
      app/views/merge_requests/merge_request.html.erb
  15. 12
      app/views/organisation_relationships/add_managing_agent.html.erb
  16. 12
      app/views/organisation_relationships/add_stock_owner.html.erb
  17. 65
      app/views/organisations/data_sharing_agreement.html.erb
  18. 53
      app/views/organisations/duplicate_schemes.html.erb
  19. 10
      app/views/schemes/changes.html.erb
  20. 68
      app/views/start/guidance.html.erb
  21. 2
      package.json
  22. 2
      spec/components/primary_navigation_component_spec.rb
  23. 2
      spec/requests/auth/passwords_controller_spec.rb
  24. 8
      spec/requests/organisation_relationships_controller_spec.rb
  25. 6
      spec/requests/organisations_controller_spec.rb
  26. 10
      yarn.lock

4
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", "~> 5.1"
gem "govuk-components", "~> 5.7"
# GOV UK component form builder DSL
gem "govuk_design_system_formbuilder", "~> 5.0"
gem "govuk_design_system_formbuilder", "~> 5.7"
# Convert Markdown into GOV.UK frontend-styled HTML
gem "govuk_markdown"
gem "redcarpet", "~> 3.6"

14
Gemfile.lock

@ -203,11 +203,11 @@ GEM
raabro (~> 1.4)
globalid (1.2.1)
activesupport (>= 6.1)
govuk-components (5.2.1)
govuk-components (5.7.0)
html-attributes-utils (~> 1.0.0, >= 1.0.0)
pagy (~> 6.0)
view_component (>= 3.9, < 3.11)
govuk_design_system_formbuilder (5.2.0)
pagy (>= 6, < 10)
view_component (>= 3.9, < 3.17)
govuk_design_system_formbuilder (5.7.1)
actionview (>= 6.1)
activemodel (>= 6.1)
activesupport (>= 6.1)
@ -287,7 +287,7 @@ GEM
childprocess (>= 0.6.3, < 6)
iniparse (~> 1.4)
rexml (~> 3.2)
pagy (6.5.0)
pagy (9.3.2)
paper_trail (15.1.0)
activerecord (>= 6.1)
request_store (~> 1.4)
@ -532,8 +532,8 @@ DEPENDENCIES
excon (~> 0.111.0)
factory_bot_rails
faker
govuk-components (~> 5.1)
govuk_design_system_formbuilder (~> 5.0)
govuk-components (~> 5.7)
govuk_design_system_formbuilder (~> 5.7)
govuk_markdown
jsbundling-rails
json-schema

22
app/components/primary_navigation_component.html.erb

@ -1,17 +1,5 @@
<nav class="app-primary-navigation" aria-label="primary">
<div class="govuk-width-container">
<ul class="app-primary-navigation__list">
<% items.each do |item| %>
<% if item.current %>
<li class="app-primary-navigation__item app-primary-navigation__item--current">
<%= govuk_link_to item[:text], item[:href], class: "app-primary-navigation__link", aria: { current: "page" } %>
</li>
<% else %>
<li class="app-primary-navigation__item">
<%= govuk_link_to item[:text], item[:href], class: "app-primary-navigation__link" %>
</li>
<% end %>
<% end %>
</ul>
</div>
</nav>
<%= govuk_service_navigation(navigation_id: "primary-navigation", classes: "app-service-navigation") do |sn|
items.each do |item|
sn.with_navigation_item(text: item[:text], href: item[:href], classes: "", current: item[:current])
end
end %>

69
app/frontend/styles/_primary-navigation.scss

@ -1,69 +0,0 @@
.app-primary-navigation {
@include govuk-font(19, $weight: bold);
background-color: govuk-colour("light-grey");
border-bottom: 1px solid $govuk-border-colour;
}
.govuk-phase-banner + .app-primary-navigation {
margin-top: -1px;
}
.app-primary-navigation__list {
@include govuk-clearfix;
left: govuk-spacing(-3);
list-style: none;
margin: 0;
padding: 0;
position: relative;
right: govuk-spacing(-3);
width: calc(100% + #{govuk-spacing(6)});
}
.app-primary-navigation__item {
box-sizing: border-box;
display: block;
float: left;
line-height: 50px;
height: 50px;
padding: 0 govuk-spacing(3);
position: relative;
}
.app-primary-navigation__item--current {
border-bottom: $govuk-border-width-narrow solid $govuk-link-colour;
&:hover {
border-bottom-color: $govuk-link-hover-colour;
}
&:active {
border-bottom-color: $govuk-link-active-colour;
}
}
.app-primary-navigation__item--align-right {
@include govuk-media-query($from: tablet) {
float: right;
}
}
.app-primary-navigation__link {
@include govuk-link-common;
@include govuk-link-style-no-visited-state;
@include govuk-link-style-no-underline;
@include govuk-typography-weight-bold;
// Extend the touch area of the link to the list
&::after {
bottom: 0;
content: "";
left: 0;
position: absolute;
right: 0;
top: 0;
}
}
.app-primary-navigation__item--current .app-primary-navigation__link:hover {
text-decoration: none;
}

42
app/frontend/styles/application.scss

@ -45,7 +45,6 @@ $govuk-breakpoints: (
@import "task-list";
@import "template";
@import "panel";
@import "primary-navigation";
@import "search";
@import "sub-navigation";
@import "unread-notification";
@ -86,3 +85,44 @@ $govuk-breakpoints: (
.govuk-notification-banner__content > * {
max-width: fit-content;
}
.govuk-service-navigation__active-fallback,
.govuk-service-navigation__list {
font-weight: bold;
}
.govuk-service-navigation__link {
@include govuk-link-common;
@include govuk-link-style-no-visited-state;
@include govuk-link-style-no-underline;
@include govuk-typography-weight-bold;
// Extend the touch area of the link to the list
&::after {
bottom: 0;
content: "";
left: 0;
position: absolute;
right: 0;
top: 0;
}
}
.govuk-service-navigation__item--active {
border-bottom-width: 4px;
}
.govuk-service-navigation__item {
padding-right: 15px;
padding-left: 15px;
margin: 0;
}
.govuk-service-navigation__item:not(:last-child) {
margin-right: 0;
}
.govuk-service-navigation__container {
left: -15px;
position: relative;
}

19
app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb

@ -19,22 +19,19 @@
<h2 class="govuk-heading-s">Create your file</h2>
<ul class="govuk-list govuk-list--bullet">
<li>Fill in the template with data from your housing management system. Your data should go below the headers, with one row per log. Leave column A blank - the bulk upload fields start in column B.</li>
<li>Make sure each column of your data aligns with the matching headers above. You may need to reorder your data.</li>
<li>Use the <%= govuk_link_to "Lettings bulk upload Specification (2024 to 2025)", @form.specification_path %> to check your data is in the correct format.</li>
<li><strong>Username field:</strong> To assign a log to someone else, enter the email address they use to log into CORE.</li>
<li>If you have reordered the headers, keep the headers in the file.</li>
</ul>
<%= govuk_list [
"Fill in the template with data from your housing management system. Your data should go below the headers, with one row per log. Leave column A blank - the bulk upload fields start in column B.",
"Make sure each column of your data aligns with the matching headers above. You may need to reorder your data.",
"Use the #{govuk_link_to 'Lettings bulk upload Specification (2024 to 2025)', @form.specification_path} to check your data is in the correct format.".html_safe,
"<strong>Username field:</strong> To assign a log to someone else, enter the email address they use to log into CORE.".html_safe,
"If you have reordered the headers, keep the headers in the file.",
], type: :bullet %>
<%= govuk_inset_text(text: "You can upload both general needs and supported housing logs in the same file for 2024 to 2025 data.") %>
<h2 class="govuk-heading-s">Save your file</h2>
<ul class="govuk-list govuk-list--bullet">
<li>Save your file as a CSV.</li>
<li>Your file should now be ready to upload.</li>
</ul>
<%= govuk_list ["Save your file as a CSV.", "Your file should now be ready to upload."], type: :bullet %>
<%= f.govuk_submit class: "govuk-!-margin-top-7" %>
<% end %>

12
app/views/bulk_upload_lettings_resume/fix_choice.html.erb

@ -24,17 +24,9 @@
<%= govuk_details(summary_text: "How to choose between fixing errors on the CORE site or in the CSV") do %>
<p class="govuk-body govuk-!-margin-bottom-2">You may find it easier to fix the errors in the CSV file if:</p>
<ul class="govuk-list govuk-list--bullet">
<li>you have a lot of errors</li>
<li>the CSV file is formatted incorrectly and you can see where the errors are</li>
<li>you need to fix multiple errors at once</li>
</ul>
<%= govuk_list ["you have a lot of errors", "the CSV file is formatted incorrectly and you can see where the errors are", "you need to fix multiple errors at once"], type: :bullet %>
<p class="govuk-body govuk-!-margin-bottom-2">You may find it easier to fix the errors on the CORE site if:</p>
<ul class="govuk-list govuk-list--bullet">
<li>you need to see the data in context</li>
<li>you have a smaller file, with a few errors</li>
<li>you are not sure where the errors are</li>
</ul>
<%= govuk_list ["you need to see the data in context", "you have a smaller file, with a few errors", "you are not sure where the errors are"], type: :bullet %>
<% end %>
<%= f.govuk_collection_radio_buttons :choice,

19
app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb

@ -19,19 +19,16 @@
<p class="govuk-body govuk-!-margin-bottom-2">There are 8 rows of content in the templates. These rows are called the ‘headers’. They contain the CORE form questions and guidance about which questions are required and how to format your answers.</p>
<h2 class="govuk-heading-s">Create your file</h2>
<ul class="govuk-list govuk-list--bullet">
<li>Fill in the template with data from your housing management system. Your data should go below the headers, with one row per log. The bulk upload fields start at column B. Leave column A blank.</li>
<li>Make sure each column of your data aligns with the matching headers above. You may need to reorder your data.</li>
<li>Use the <%= govuk_link_to "Sales bulk upload Specification (2024 to 2025)", @form.specification_path %> to check your data is in the correct format.</li>
<li><strong>Username field:</strong> To assign a log to someone else, enter the email address they use to log into CORE.</li>
<li>If you have reordered the headers, keep the headers in the file.</li>
</ul>
<%= govuk_list [
"Fill in the template with data from your housing management system. Your data should go below the headers, with one row per log. The bulk upload fields start at column B. Leave column A blank.",
"Make sure each column of your data aligns with the matching headers above. You may need to reorder your data.",
"Use the #{govuk_link_to 'Sales bulk upload Specification (2024 to 2025)', @form.specification_path} to check your data is in the correct format.".html_safe,
"<strong>Username field:</strong> To assign a log to someone else, enter the email address they use to log into CORE.".html_safe,
"If you have reordered the headers, keep the headers in the file.",
], type: :bullet %>
<h2 class="govuk-heading-s">Save your file</h2>
<ul class="govuk-list govuk-list--bullet">
<li>Save your file as a CSV.</li>
<li>Your file should now be ready to upload.</li>
</ul>
<%= govuk_list ["Save your file as a CSV.", "Your file should now be ready to upload."], type: :bullet %>
<%= f.govuk_submit %>
<% end %>

14
app/views/bulk_upload_sales_resume/fix_choice.html.erb

@ -23,18 +23,10 @@
</div>
<%= govuk_details(summary_text: "How to choose between fixing errors on the CORE site or in the CSV") do %>
<p class="govuk-body govuk-!-margin-bottom-2">You may find it easier to fix the errors in the CSV file if:</p>
<ul class="govuk-list govuk-list--bullet">
<li>you have a lot of errors</li>
<li>the CSV file is formatted incorrectly and you can see where the errors are</li>
<li>you need to fix multiple errors at once</li>
</ul>
<p class="govuk-body govuk-!-margin-bottom-2">You may find it easier to fix the errors in the CSV file if:</p>
<%= govuk_list ["you have a lot of errors", "the CSV file is formatted incorrectly and you can see where the errors are", "you need to fix multiple errors at once"], type: :bullet %>
<p class="govuk-body govuk-!-margin-bottom-2">You may find it easier to fix the errors on the CORE site if:</p>
<ul class="govuk-list govuk-list--bullet">
<li>you need to see the data in context</li>
<li>you have a smaller file, with a few errors</li>
<li>you are not sure where the errors are</li>
</ul>
<%= govuk_list ["you need to see the data in context", "you have a smaller file, with a few errors", "you are not sure where the errors are"], type: :bullet %>
<% end %>
<%= f.govuk_collection_radio_buttons :choice,

7
app/views/bulk_upload_shared/guidance.html.erb

@ -34,12 +34,7 @@
<p class="govuk-body">The bulk upload templates contain 8 rows of ‘headers’ with information about how to fill in the template, including:</p>
<% end %>
<ul class="govuk-list govuk-list--bullet">
<li>the CORE form questions and their field numbers</li>
<li>each field’s valid responses</li>
<li>if/when certain fields can be left blank</li>
<li>which fields are used to check for duplicate logs</li>
</ul>
<%= govuk_list ["the CORE form questions and their field numbers", "each field’s valid responses", "if/when certain fields can be left blank", "which fields are used to check for duplicate logs"], type: :bullet %>
<p class="govuk-body">You can paste your data below the headers or copy the headers and insert them above the data in your file. The bulk upload fields start at column B. Leave column A blank.</p>
<p class="govuk-body">Make sure that each column of data aligns with the corresponding question in the headers. We recommend ordering your data to match the headers, but you can also reorder the headers to match your data. When processing the file, we check what each column of data represents based on the headers above.</p>

6
app/views/cookies/show.html.erb

@ -37,11 +37,7 @@
<p>Google is not allowed to use or share our analytics data with anyone.</p>
<p>Google Analytics stores anonymised information about:</p>
<ul class="govuk-list govuk-list--bullet">
<li>how you got to the service</li>
<li>the pages you visit on the service and how long you spend on them</li>
<li>any errors you see while using the service</li>
</ul>
<%= govuk_list ["how you got to the service", "the pages you visit on the service and how long you spend on them", "any errors you see while using the service"], type: :bullet %>
<table class="govuk-table">
<caption class="govuk-visually-hidden">Google Analytics cookies</caption>

2
app/views/layouts/application.html.erb

@ -103,7 +103,7 @@
<% feedback_link = govuk_link_to "giving us your feedback (opens in a new tab)", t("feedback_form"), rel: "noreferrer noopener", target: "_blank" %>
<%= govuk_phase_banner(
classes: "govuk-width-container",
classes: "#{current_user.present? ? 'no-bottom-border ' : ''}govuk-width-container",
tag: govuk_phase_banner_tag(current_user),
text: "This is a new service – help us improve it by #{feedback_link}".html_safe,
) %>

10
app/views/logs/delete_duplicates.html.erb

@ -15,15 +15,7 @@
<p class="govuk-body govuk-!-margin-bottom-2">
<%= @duplicate_logs.count == 1 ? "This log" : "These logs" %> will be deleted:
</p>
<ul class="govuk-list govuk-!-margin-bottom-6">
<% @duplicate_logs.each do |duplicate_log| %>
<li>
<strong>
<%= govuk_link_to "Log #{duplicate_log.id}", url_for(duplicate_log) %>
</strong>
</li>
<% end %>
</ul>
<%= govuk_list(@duplicate_logs.map { |log| "<strong>#{govuk_link_to "Log #{log.id}", url_for(log)}</strong>".html_safe }) %>
<div class="govuk-button-group">
<%= govuk_button_to @duplicate_logs.count == 1 ? "Delete this log" : "Delete these logs",

30
app/views/merge_requests/merge_request.html.erb

@ -14,13 +14,13 @@
<h2 class="govuk-heading-m">Before you start</h2>
<p class="govuk-body">Regardless of the merge type, you’ll be asked for:</p>
<ul class="govuk-list govuk-list--bullet">
<li>the organisations merging in CORE</li>
<li>the merge type: for example one organisation absorbing the rest, or them all creating a new organisation</li>
<li>to confirm or update the telephone number</li>
<li>the merge date</li>
<li>if user email addresses will change with this merge</li>
</ul>
<%= govuk_list [
"the organisations merging in CORE",
"the merge type: for example one organisation absorbing the rest, or them all creating a new organisation",
"to confirm or update the telephone number",
"the merge date",
"if user email addresses will change with this merge",
], type: :bullet %>
<h2 class="govuk-heading-m">If email addresses are changing</h2>
<%= govuk_inset_text(text: "Update all user email addresses on CORE as soon as they change, so that everyone can still access their CORE account. ") %>
@ -30,14 +30,14 @@
<h2 class="govuk-heading-m">If merging into a new organisation</h2>
<p class="govuk-body">You'll also be asked for the new organisation’s:</p>
<ul class="govuk-list govuk-list--bullet">
<li>name</li>
<li>address</li>
<li>telephone number</li>
<li>housing provider type</li>
<li>Regulator of Social Housing registration number</li>
<li>held stock details</li>
</ul>
<%= govuk_list [
"name",
"address",
"telephone number",
"housing provider type",
"Regulator of Social Housing registration number",
"held stock details",
], type: :bullet %>
<%= govuk_warning_text text: "You will not be able to submit your request without the above information. Do not start the form until you have obtained all of the information. " %>

12
app/views/organisation_relationships/add_managing_agent.html.erb

@ -28,12 +28,10 @@
<%= govuk_button_link_to("Cancel", managing_agents_organisation_path(@organisation), secondary: true) %>
</div>
<%= govuk_details(summary_text: "Can't find the managing agent you're looking for?") do %>
<ul class="govuk-list govuk-list--bullet">
<li>Double check the spelling and try again</li>
<li>Type the first few letters to see the suggestions</li>
<li>If you still can't find it,
<%= govuk_link_to("contact the MHCLG service desk", GlobalConstants::HELPDESK_URL, rel: "noreferrer noopener", target: "_blank") %>
</li>
</ul>
<%= govuk_list [
"Double check the spelling and try again",
"Type the first few letters to see the suggestions",
"If you still can't find it, #{govuk_link_to('contact the MHCLG service desk', GlobalConstants::HELPDESK_URL, rel: 'noreferrer noopener', target: '_blank')}",
], type: :bullet %>
<% end %>
<% end %>

12
app/views/organisation_relationships/add_stock_owner.html.erb

@ -28,12 +28,10 @@
<%= govuk_button_link_to("Cancel", stock_owners_organisation_path(@organisation), secondary: true) %>
</div>
<%= govuk_details(summary_text: "Can't find the stock owner you're looking for?") do %>
<ul class="govuk-list govuk-list--bullet">
<li>Double check the spelling and try again</li>
<li>Type the first few letters to see the suggestions</li>
<li>If you still can't find it,
<%= govuk_link_to("contact the MHCLG service desk", GlobalConstants::HELPDESK_URL, rel: "noreferrer noopener", target: "_blank") %>
</li>
</ul>
<%= govuk_list [
"Double check the spelling and try again",
"Type the first few letters to see the suggestions",
"If you still can't find it, #{govuk_link_to('contact the MHCLG service desk', GlobalConstants::HELPDESK_URL, rel: 'noreferrer noopener', target: '_blank')}",
], type: :bullet %>
<% end %>
<% end %>

65
app/views/organisations/data_sharing_agreement.html.erb

@ -35,30 +35,26 @@
<p class="govuk-body-m"><strong>It is now agreed</strong> as follows:</p>
<h3 id="2-definitions-and-interpretation" class="govuk-heading-m">2. Definitions and interpretation</h3>
<p class="govuk-body-m">2.1. In this Agreement the following words and phrases shall have the following meanings, unless expressly stated to the contrary:</p>
<ul class="govuk-list govuk-list--bullet">
<li>“Act” means the Data Protection Act 2018;</li>
<li>“Authorised Representatives” means the nominated lead officer representing each of the
parties with delegated authority to handle the day-to-day matters arising from this Agreement;</li>
<li>“Data Subject” means social housing lettings tenants and participants in discounted sales where their data is reported via the CORE system.</li>
<li>“Data Controller” has the meaning in Article 4(7) of the GDPR and section 5(2) of the Act.</li>
<li>“Data Processor” has the meaning in Article 4(8) of the GDPR.</li>
<li>“Data Protection Legislation” means the Data Protection Act 2018 and all applicable laws and regulations relating to the processing of personal data and privacy, including where applicable the guidance and codes of practice issued by the Information Commissioner; it includes the General Data Protection Regulation (GDPR).</li>
<li>“Data” means the data supplied by the CORE data providers via the CORE system and the data that is calculated or derived via the CORE system based on that initial data;</li>
<li>“GDPR” means the General Data Protection Regulation.</li>
<li>“Parties” means the parties to this Agreement, namely MHCLG and the CORE data providers. CORE data providers include social housing providers and managing organisations that provide data on behalf of the social housing providers.</li>
<li>“Personal Data” has the meaning in Article 4(1) of the GDPR. “Processing” has the meaning in Article 4(2) of the GDPR.</li>
<li>“Request for Information” means a request for information or a request under the Freedom of Information Act 2000.</li>
<li>“Special category personal data” has the meaning in Article 9(1) of the GDPR. In this Agreement:
<ul class="govuk-list govuk-list--bullet">
<li>A. The masculine includes the feminine and neuter;</li>
<li>B. Person means a natural person;</li>
<li>C. The singular includes the plural and vice versa;</li>
<li>D. A reference to any statute, enactment, order, regulation or other similar instrument
shall be construed as a reference to the statute, enactment, order, regulation or instrument as amended by any subsequent statute, enactment, order, regulation or instrument or as contained in any subsequent re-enactment.</li>
</ul></li>
</ul>
<%= govuk_list [
"“Act” means the Data Protection Act 2018;",
"“Authorised Representatives” means the nominated lead officer representing each of the parties with delegated authority to handle the day-to-day matters arising from this Agreement;",
"“Data Subject” means social housing lettings tenants and participants in discounted sales where their data is reported via the CORE system.",
"“Data Controller” has the meaning in Article 4(7) of the GDPR and section 5(2) of the Act.",
"“Data Processor” has the meaning in Article 4(8) of the GDPR.",
"“Data Protection Legislation” means the Data Protection Act 2018 and all applicable laws and regulations relating to the processing of personal data and privacy, including where applicable the guidance and codes of practice issued by the Information Commissioner; it includes the General Data Protection Regulation (GDPR).",
"“Data” means the data supplied by the CORE data providers via the CORE system and the data that is calculated or derived via the CORE system based on that initial data;",
"“GDPR” means the General Data Protection Regulation.",
"“Parties” means the parties to this Agreement, namely MHCLG and the CORE data providers. CORE data providers include social housing providers and managing organisations that provide data on behalf of the social housing providers.",
"“Personal Data” has the meaning in Article 4(1) of the GDPR. “Processing” has the meaning in Article 4(2) of the GDPR.",
"“Request for Information” means a request for information or a request under the Freedom of Information Act 2000.",
"“Special category personal data” has the meaning in Article 9(1) of the GDPR. In this Agreement:
#{ govuk_list([
'A. The masculine includes the feminine and neuter;',
'B. Person means a natural person;',
'C. The singular includes the plural and vice versa;',
'D. A reference to any statute, enactment, order, regulation or other similar instrument shall be construed as a reference to the statute, enactment, order, regulation or instrument as amended by any subsequent statute, enactment, order, regulation or instrument or as contained in any subsequent re-enactment.',
], type: :bullet)}".html_safe,
], type: :bullet %>
<p class="govuk-body-m">2.2. Headings are included in this Agreement for ease of reference only and shall not affect the interpretation or construction of this Agreement.</p>
<p class="govuk-body-m">2.3. References in this Agreement to Clauses, Paragraphs and Annexes are, unless otherwise provided, references to the Clauses, Paragraphs and Annexes of this Agreement.</p>
<p class="govuk-body-m">2.4. In the event and to the extent only of any conflict or inconsistency between the provisions of this Agreement and the provisions of any document referred to or referenced herein, the provisions of this Agreement shall prevail.</p>
@ -95,11 +91,13 @@
<p class="govuk-body-m">8.5. All work carried out by MHCLG will follow appropriate security measures and procedures to ensure the protection of the data.</p>
<h3 id="9-protection-of-personal-data" class="govuk-heading-m">9. Protection of personal data</h3>
<p class="govuk-body-m">9.1. CORE data providers and MHCLG agree that they shall:</p>
<ul class="govuk-list govuk-list--bullet">
<li>A. Implement appropriate technical and organisational measures to protect the Personal Data against unauthorised or unlawful Processing and against accidental loss, destruction, damage, alteration or disclosure. These measures shall ensure a level of security appropriate to the harm which might result from any unauthorised or unlawful Processing, accidental loss, destruction or damage to the Personal Data and having regard to the nature of the Personal Data which is to be protected;</li>
<li>B. Take reasonable steps to ensure the reliability of any personnel who have access to the Personal Data. MHCLG and Data providers will ensure such personnel will be a limited number of analysts assigned to the data collection.</li>
</ul>
<%= govuk_list [
"A. Implement appropriate technical and organisational measures to protect the Personal Data against unauthorised or unlawful Processing and against accidental loss, destruction, damage, alteration or disclosure. These measures shall ensure a level of security appropriate to the harm which might result from any unauthorised or unlawful Processing, accidental loss, destruction or damage to the Personal Data and having regard to the nature of the Personal Data which is to be protected;",
"B. Take reasonable steps to ensure the reliability of any personnel who have access to the Personal Data. MHCLG and Data providers will ensure such personnel will be a limited number of analysts assigned to the data collection.",
],
type: :bullet %>
<p class="govuk-body-m">9.2. The data providers and MHCLG shall comply at all times with the Data Protection Legislation and shall ensure that they each perform their obligations under this agreement in full compliance with the Data Protection Legislation and any other applicable law, in particular the Human Rights Act 1998 and the common law duty of confidentiality.</p>
<p class="govuk-body-m">9.3. CORE data providers should limit access to CORE to a small number of individuals who can be named on request. CORE access is limited to registered users only via password, but it is the responsibility of the CORE data providers to ensure that all individuals granted access to the datasets should be briefed on the legal requirements around handling and storing the Data from CORE.</p>
<h3 id="10-freedom-of-information" class="govuk-heading-m">10. Freedom of information</h3>
@ -128,15 +126,10 @@
<p class="govuk-body-m">16.1. The Parties shall comply with all relevant legislation, regulations, orders, statutory instruments and any amendments or re-enactments thereof from the commencement of this agreement.</p>
<p class="govuk-body-m">As witness of which the parties have set their hands on the day and year first above written
signed for and on behalf of the Data Protection Officer for <%= org_name_for_data_sharing_agreement(@data_protection_confirmation, current_user) %>, by:</p>
<ul class="govuk-list govuk-list--bullet">
<li>Name: <%= name_for_data_sharing_agreement(@data_protection_confirmation, current_user) %></li>
<li>Title: Data Protection Officer</li>
</ul>
<%= govuk_list ["Name: #{name_for_data_sharing_agreement(@data_protection_confirmation, current_user)}".html_safe, "Title: Data Protection Officer"], type: :bullet %>
<p class="govuk-body-m">SIGNED for and on behalf of the deputy director of the data, analytics &amp; statistics in the Ministry of Housing, Communities and Local Government, by:</p>
<ul class="govuk-list govuk-list--bullet">
<li>Name: Sandra Tudor</li>
<li>Title: Deputy Director</li>
</ul>
<%= govuk_list ["Name: Sandra Tudor", "Title: Deputy Director"], type: :bullet %>
<% if current_user.is_dpo? && !(@organisation.data_protection_confirmed?) %>
<div class="govuk-button-group govuk-!-margin-top-9">

53
app/views/organisations/duplicate_schemes.html.erb

@ -29,11 +29,11 @@
<p class="govuk-body">Since your organisation recently merged, we’ve reviewed your schemes for possible duplicates.</p>
<p class="govuk-body">These sets of schemes and locations might be duplicates because they have the same answers for certain fields.</p>
<h2 class="govuk-heading-m">What you need to do</h2>
<ul class="govuk-list govuk-list--bullet">
<li>Review each set of schemes or locations and decide if they are duplicates.</li>
<li>If they are, choose one to keep and deactivate the others on the date your organisation merged.</li>
<li>When you have resolved all duplicates, confirm below.</li>
</ul>
<%= govuk_list [
"Review each set of schemes or locations and decide if they are duplicates.",
"If they are, choose one to keep and deactivate the others on the date your organisation merged.",
"When you have resolved all duplicates, confirm below.",
], type: :bullet %>
<p class="govuk-body">If you need help with this, <%= govuk_link_to "contact the helpdesk (opens in a new tab)", GlobalConstants::HELPDESK_URL, target: "#" %>.</p>
<% if @duplicate_schemes.any? %>
@ -43,17 +43,17 @@
<p class="govuk-body">
These schemes have the same answers for the following fields:
</p>
<ul class="govuk-list govuk-list--bullet">
<li>Type of scheme</li>
<li>Registered under Care Standards Act 2000</li>
<li>Housing stock owned by</li>
<li>Support services provided by</li>
<li>Primary client group</li>
<li>Has another client group</li>
<li>Secondary client group</li>
<li>Level of support given</li>
<li>Intended length of stay</li>
</ul>
<%= govuk_list [
"Type of scheme",
"Registered under Care Standards Act 2000",
"Housing stock owned by",
"Support services provided by",
"Primary client group",
"Has another client group",
"Secondary client group",
"Level of support given",
"Intended length of stay",
], type: :bullet %>
<% end %>
<p class="govuk-body">The links below open in a new tab.</p>
@ -68,13 +68,7 @@
<% @duplicate_schemes.each do |duplicate_set| %>
<% body.with_row do |row| %>
<% row.with_cell do %>
<ol class="govuk-list govuk-list--number">
<% duplicate_set.each do |scheme| %>
<li>
<%= govuk_link_to scheme.service_name, scheme, target: "#" %>
</li>
<% end %>
</ol>
<%= govuk_list duplicate_set.map { |scheme| govuk_link_to(scheme.service_name, scheme, target: "#") }, type: :number %>
<% end %>
<% end %>
<% end %>
@ -89,10 +83,7 @@
<p class="govuk-body">
These locations belong to the same scheme and have the same answers for the following fields:
</p>
<ul class="govuk-list govuk-list--bullet">
<li>Postcode</li>
<li>Mobility standards</li>
</ul>
<%= govuk_list ["Postcode", "Mobility standards"], type: :bullet %>
<% end %>
<p class="govuk-body">The links below open in a new tab.</p>
@ -108,13 +99,7 @@
<% @duplicate_locations.each do |duplicate_set| %>
<% body.with_row do |row| %>
<% row.with_cell do %>
<ol class="govuk-list govuk-list--number">
<% duplicate_set[:locations].each do |location| %>
<li>
<%= govuk_link_to location.name, scheme_location_path(location), target: "#" %>
</li>
<% end %>
</ol>
<%= govuk_list duplicate_set[:locations].map { |location| govuk_link_to(location.name, scheme_location_path(location), target: "#") }, type: :number %>
<% end %>
<% row.with_cell do %>
<%= govuk_link_to duplicate_set[:scheme].service_name, duplicate_set[:scheme], target: "#" %>

10
app/views/schemes/changes.html.erb

@ -15,11 +15,11 @@
<p class="govuk-body">We have restructured the way we group supported housing scheme data.</p>
<p class="govuk-body">On old CORE, a scheme’s data was split into management group and scheme. On new CORE, the data is split into scheme and location.</p>
<p class="govuk-body">These are the main changes:</p>
<ul class="govuk-list govuk-list--bullet">
<li>Schemes now store data about the stock owner and support provider. This was previously stored in management group.</li>
<li>Schemes still store data about the type of support, as they did in old CORE.</li>
<li>Schemes no longer store data about postcodes where support is provided. These are now in locations.</li>
</ul>
<%= govuk_list [
"Schemes now store data about the stock owner and support provider. This was previously stored in management group.",
"Schemes still store data about the type of support, as they did in old CORE.",
"Schemes no longer store data about postcodes where support is provided. These are now in locations.",
], type: :bullet %>
<p class="govuk-body">This new structure means data coordinators only needs to fill in support details once.</p>
<h2 class="govuk-heading-m">How schemes are migrated from old CORE</h2>
<p class="govuk-body">If your organisation has migrated from old CORE to new CORE, your existing schemes are on the <%= govuk_link_to("schemes page", schemes_path) %>, with the same details.</p>

68
app/views/start/guidance.html.erb

@ -21,46 +21,50 @@
<%= accordion.with_section(heading_text: "Types of lettings you should create logs for") do %>
<p class="govuk-body">You’ll need to create a log for:</p>
<ul class="govuk-list govuk-list--bullet">
<li>Tenants in general needs housing allocated a new letting. This includes tenants moving into the social rented sector from outside, existing social tenants moving between properties or landlords, and existing social tenants renewing lettings in the same property. If fixed-term and social or affordable rent, only include tenancies of 2 years or more.</li>
<li>Tenants in supported housing (social housing, sheltered accommodation and care homes) allocated a new letting. This includes tenants moving into the social rented sector from outside, existing social tenants moving between properties or landlords, and existing social tenants renewing lettings in the same property. All supported housing tenancies should be reported regardless of length.</li>
<li>Starter tenancies provided by local authorities (LAs) and lettings with an introductory period provided by private registered providers (PRPs) should be completed in CORE at the beginning of the starter or introductory period. The tenancy type and length entered should be based on the tenancy the tenant will roll onto once the starter or introductory period has been completed. You do not need to submit another CORE log once the period has been completed.</li>
<li>Room moves within a shared housing unit that result in a different property type or support needs – this is classed as an internal transfer of an existing social tenant to another property.</li>
<li>Existing tenants who are issued with a new tenancy agreement when stock is acquired, transferred or permanently decanted.</li>
<li>Tenants under the Rough Sleepers Initiative or Rough Sleeping Accommodation Programme, where accommodation is permanent.</li>
<li>Households previously provided with temporary accommodation to meet a duty under the homelessness legislation who are allocated a tenancy as a settled home ending the duty (this may be the same property).</li>
<li>Refugees and asylum seekers who have been granted indefinite leave to remain, humanitarian protection or exceptional leave to remain.</li>
<li>Affordable Rent lettings – where up to 80% of market rent can be charged and a new supply agreement is signed.</li>
<li>London Affordable Rent lettings – a type of Affordable Rent available in London through the Greater London Authority (GLA).</li>
<li>Intermediate Rent lettings – where the rent must not exceed 80% of the current market rate (including any service charges).</li>
<li>Rent to Buy lettings – where a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered the chance to purchase the property (either shared ownership or outright) at full market value.</li>
<li>London Living Rent lettings – a type of Intermediate Rent available in London through the Greater London Authority (GLA).</li>
</ul>
<%= govuk_list [
"Tenants in general needs housing allocated a new letting. This includes tenants moving into the social rented sector from outside, existing social tenants moving between properties or landlords, and existing social tenants renewing lettings in the same property. If fixed-term and social or affordable rent, only include tenancies of 2 years or more.",
"Tenants in supported housing (social housing, sheltered accommodation and care homes) allocated a new letting. This includes tenants moving into the social rented sector from outside, existing social tenants moving between properties or landlords, and existing social tenants renewing lettings in the same property. All supported housing tenancies should be reported regardless of length.",
"Starter tenancies provided by local authorities (LAs) and lettings with an introductory period provided by private registered providers (PRPs) should be completed in CORE at the beginning of the starter or introductory period. The tenancy type and length entered should be based on the tenancy the tenant will roll onto once the starter or introductory period has been completed. You do not need to submit another CORE log once the period has been completed.",
"Room moves within a shared housing unit that result in a different property type or support needs – this is classed as an internal transfer of an existing social tenant to another property.",
"Existing tenants who are issued with a new tenancy agreement when stock is acquired, transferred or permanently decanted.",
"Tenants under the Rough Sleepers Initiative or Rough Sleeping Accommodation Programme, where accommodation is permanent.",
"Households previously provided with temporary accommodation to meet a duty under the homelessness legislation who are allocated a tenancy as a settled home ending the duty (this may be the same property).",
"Refugees and asylum seekers who have been granted indefinite leave to remain, humanitarian protection or exceptional leave to remain.",
"Affordable Rent lettings – where up to 80% of market rent can be charged and a new supply agreement is signed.",
"London Affordable Rent lettings – a type of Affordable Rent available in London through the Greater London Authority (GLA).",
"Intermediate Rent lettings – where the rent must not exceed 80% of the current market rate (including any service charges).",
"Rent to Buy lettings – where a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered the chance to purchase the property (either shared ownership or outright) at full market value.",
"London Living Rent lettings – a type of Intermediate Rent available in London through the Greater London Authority (GLA).",
],
type: :bullet %>
<% end %>
<%= accordion.with_section(heading_text: "Types of lettings you should not create logs for") do %>
<p class="govuk-body">You don’t need to create a log for:</p>
<ul class="govuk-list govuk-list--bullet">
<li>Temporary general needs housing with a fixed period of less than 2 years if they are social or affordable rent. (Temporary lettings for intermediate rent and supported housing should be recorded).</li>
<li>Starter tenancies or lettings with an introductory period that roll onto or convert into the main tenancy. The CORE log should be completed at the beginning of this period.</li>
<li>Changes from sole to joint or joint to sole tenancies, where the number of people in the household has not changed.</li>
<li>Moves within a shared housing unit resulting in the same support needs or property type, even if a new tenancy or licence agreement is issued.</li>
<li>Lettings where no new tenancy agreement is signed.</li>
<li>Where stock is acquired, transferred or permanently decanted and the existing tenants are not issued with a new tenancy agreement.</li>
<li>Mutual exchanges including lettings where registered provider tenants have exchanged homes, for example through the national HOMESWAP system.</li>
<li>Successions and assignments.</li>
<li>Demotion of a secure or assured tenancy, and any subsequent conversion of the demoted tenancy to a secure or assured tenancy.</li>
<li>Lettings made to asylum seekers who are awaiting a decision on their applications for asylum under the Immigration and Asylum Act 1999.</li>
<li>Non-social lettings, including market-rented properties, employer-provided housing where the employer provides financial support, homes for staff of social landlords linked to employment, homes social landlords manage for organisations who are not social landlords, homes social landlords own but lease in entirety to organisations who are not social landlords, and freehold housing with variable charges for services and communal facilities.</li>
</ul>
<%= govuk_list [
"Temporary general needs housing with a fixed period of less than 2 years if they are social or affordable rent. (Temporary lettings for intermediate rent and supported housing should be recorded).",
"Starter tenancies or lettings with an introductory period that roll onto or convert into the main tenancy. The CORE log should be completed at the beginning of this period.",
"Changes from sole to joint or joint to sole tenancies, where the number of people in the household has not changed.",
"Moves within a shared housing unit resulting in the same support needs or property type, even if a new tenancy or licence agreement is issued.",
"Lettings where no new tenancy agreement is signed.",
"Where stock is acquired, transferred or permanently decanted and the existing tenants are not issued with a new tenancy agreement.",
"Mutual exchanges including lettings where registered provider tenants have exchanged homes, for example through the national HOMESWAP system.",
"Successions and assignments.",
"Demotion of a secure or assured tenancy, and any subsequent conversion of the demoted tenancy to a secure or assured tenancy.",
"Lettings made to asylum seekers who are awaiting a decision on their applications for asylum under the Immigration and Asylum Act 1999.",
"Non-social lettings, including market-rented properties, employer-provided housing where the employer provides financial support, homes for staff of social landlords linked to employment, homes social landlords manage for organisations who are not social landlords, homes social landlords own but lease in entirety to organisations who are not social landlords, and freehold housing with variable charges for services and communal facilities.",
],
type: :bullet %>
<% end %>
<%= accordion.with_section(heading_text: "What if someone is reluctant to answer any questions?") do %>
<p class="govuk-body">If a tenant or buyer is reluctant to answer questions as part of a log, you should explain that:</p>
<ul class="govuk-list govuk-list--bullet">
<li>all information they provide is anonymous and will not affect their housing, benefits or other services they receive.</li>
<li>the data they provide is vital in helping to build a complete picture of social housing in England and is used to inform social housing policy.</li>
</ul>
<%= govuk_list [
"all information they provide is anonymous and will not affect their housing, benefits or other services they receive.",
"the data they provide is vital in helping to build a complete picture of social housing in England and is used to inform social housing policy.",
],
type: :bullet %>
<p class="govuk-body">If a tenant or buyer is still unwilling or unable to answer questions, select the ‘Don’t know’ or ‘Tenant/person prefers not to say’ options.</p>
<% end %>
<% end %>

2
package.json

@ -20,7 +20,7 @@
"css-loader": "^6.7.1",
"custom-event-polyfill": "^1.0.7",
"file-loader": "^6.2.0",
"govuk-frontend": "5.1.0",
"govuk-frontend": "5.7.1",
"html5shiv": "^3.7.3",
"intersection-observer": "^0.12.0",
"mini-css-extract-plugin": "^2.6.0",

2
spec/components/primary_navigation_component_spec.rb

@ -14,7 +14,7 @@ RSpec.describe PrimaryNavigationComponent, type: :component do
it "then that item appears as selected" do
result = render_inline(described_class.new(items:))
expect(result.css('.app-primary-navigation__link[aria-current="page"]').text).to include("Organisations")
expect(result.css('.govuk-service-navigation__link[aria-current="page"]').text).to include("Organisations")
end
end

2
spec/requests/auth/passwords_controller_spec.rb

@ -70,7 +70,7 @@ RSpec.describe Auth::PasswordsController, type: :request do
put "/account/password", params: update_password_params
# Devise redirects once after re-sign in with new password and then root redirects as well.
follow_redirect!
expect(page).to have_css("div", class: "govuk-notification-banner__heading", text: message)
expect(page).to have_css("p", class: "govuk-notification-banner__heading", text: message)
end
end
end

8
spec/requests/organisation_relationships_controller_spec.rb

@ -29,7 +29,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
end
it "shows the tab navigation" do
expected_html = "<nav class=\"app-primary-navigation\""
expected_html = "<nav aria-label=\"Menu\" class=\"govuk-service-navigation__wrapper\""
expect(response.body).to include(expected_html)
end
@ -125,7 +125,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
end
it "shows the tab navigation" do
expected_html = "<nav class=\"app-primary-navigation\""
expected_html = "<nav aria-label=\"Menu\" class=\"govuk-service-navigation__wrapper\""
expect(response.body).to include(expected_html)
end
@ -325,7 +325,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
end
it "shows the tab navigation" do
expected_html = "<nav class=\"app-primary-navigation\""
expected_html = "<nav aria-label=\"Menu\" class=\"govuk-service-navigation__wrapper\""
expect(response.body).to include(expected_html)
end
@ -461,7 +461,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
end
it "shows the tab navigation" do
expected_html = "<nav class=\"app-primary-navigation\""
expected_html = "<nav aria-label=\"Menu\" class=\"govuk-service-navigation__wrapper\""
expect(response.body).to include(expected_html)
end

6
spec/requests/organisations_controller_spec.rb

@ -480,7 +480,7 @@ RSpec.describe OrganisationsController, type: :request do
end
it "shows the tab navigation" do
expected_html = "<nav class=\"app-primary-navigation\""
expected_html = "<nav aria-label=\"Menu\" class=\"govuk-service-navigation__wrapper\""
expect(response.body).to include(expected_html)
end
@ -612,7 +612,7 @@ RSpec.describe OrganisationsController, type: :request do
end
it "shows the tab navigation" do
expected_html = "<nav class=\"app-primary-navigation\""
expected_html = "<nav aria-label=\"Menu\" class=\"govuk-service-navigation__wrapper\""
expect(response.body).to include(expected_html)
end
@ -938,7 +938,7 @@ RSpec.describe OrganisationsController, type: :request do
end
it "shows the tab navigation" do
expected_html = "<nav class=\"app-primary-navigation\""
expected_html = "<nav aria-label=\"Menu\" class=\"govuk-service-navigation__wrapper\""
expect(response.body).to include(expected_html)
end

10
yarn.lock

@ -3405,16 +3405,16 @@ gopd@^1.0.1:
dependencies:
get-intrinsic "^1.1.3"
govuk-frontend@5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-5.1.0.tgz#55e520940b587ddd023e96251efaa076acc9bd5f"
integrity sha512-Dc3J+uOI4i2VR3BVyfxbf6qVjTT4n4bBqbD0/Io6feP8pt/4IfKdP1vWimZf+BwMKKMXacw10hmdy5UcD6Cr8w==
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==
govuk-frontend@5.7.1:
version "5.7.1"
resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-5.7.1.tgz#d4c561ebf8c0b76130f31df8c2e4d70d340cd63f"
integrity sha512-jF1cq5rn57kxZmJRprUZhTQ31zaBBK4b5AyeJaPX3Yhg22lk90Mx/dQLvOk/ycV3wM7e0y+s4IPvb2fFaPlCGg==
govuk-prototype-kit@^13.14.1:
version "13.16.2"
resolved "https://registry.yarnpkg.com/govuk-prototype-kit/-/govuk-prototype-kit-13.16.2.tgz#a491d36ebd49d5aa818934fa767d833e138a9119"

Loading…
Cancel
Save