Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create ofsted pages #641

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Create ofsted pages #641

wants to merge 13 commits into from

Conversation

nwarms
Copy link
Collaborator

@nwarms nwarms commented Nov 28, 2024

User Story 183586: Build: New Ofsted data (iteration 1 - Add Ofsted pages)

Create the ofsted page in the service nav and ofsted pages in the sub nav of the page.

Changes

  • Create CategoriesOfConcernsExtensions.cs and SafeguardingScoreExtensions.cs with display and sort string methods
  • Updated OfstedRatingScoreExtensions.cs with the new ofsted ratings
  • Deleted the old ofsted pages from the Academies section
  • Created CurrentRatings.cshtml, ImportantDates.cshtml, PreviousRatings.cshtml and SafeguardingAndConcerns.cshtml
  • Created OfstedAreaModel.cs for all the page models in the ofsted area to use
  • Created the _OfstedLayout.cshtml and _BeforeOrAfterTag.cshtml for use across the Ofsted pages
  • Updated the TrustAreaModel.cs to add the Osfted pages to navigation
  • Added tests for these changes

Screenshots of UI changes

Before

image

After

image

Checklist

  • Pull request attached to the appropriate user story in Azure DevOps
  • ADR decision log updated (if needed)
  • Release notes added to CHANGELOG.md
  • Testing complete - all manual and automated tests pass

Copy link

sonarcloud bot commented Nov 28, 2024

return rating switch
{
CategoriesOfConcern.None => "None",
CategoriesOfConcern.SpecialMeasures => "Special Measures",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CategoriesOfConcern.SpecialMeasures => "Special Measures",
CategoriesOfConcern.SpecialMeasures => "Special measures",

{
CategoriesOfConcern.None => "None",
CategoriesOfConcern.SpecialMeasures => "Special Measures",
CategoriesOfConcern.SeriousWeakness => "Serious Weakness",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CategoriesOfConcern.SeriousWeakness => "Serious Weakness",
CategoriesOfConcern.SeriousWeakness => "Serious weakness",

CategoriesOfConcern.None => "None",
CategoriesOfConcern.SpecialMeasures => "Special Measures",
CategoriesOfConcern.SeriousWeakness => "Serious Weakness",
CategoriesOfConcern.NoticeToImprove => "Notice To Improve",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CategoriesOfConcern.NoticeToImprove => "Notice To Improve",
CategoriesOfConcern.NoticeToImprove => "Notice to improve",

@@ -26,8 +28,9 @@ public static string ToDisplayString(this OfstedRatingScore rating)
OfstedRatingScore.RequiresImprovement => "Requires improvement",
OfstedRatingScore.Inadequate => "Inadequate",
OfstedRatingScore.None => "Not yet inspected",
OfstedRatingScore.NoJudgement => "No Judgement",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
OfstedRatingScore.NoJudgement => "No Judgement",
OfstedRatingScore.NoJudgement => "No judgement",

SafeguardingScore.None => "None",
SafeguardingScore.Yes => "Yes",
SafeguardingScore.No => "No",
SafeguardingScore.NotRecorded => "Not Recorded",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SafeguardingScore.NotRecorded => "Not Recorded",
SafeguardingScore.NotRecorded => "Not recorded",


### Removed

- Remove acadmies in trust ofsted page
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Remove acadmies in trust ofsted page
- Remove academies in trust Ofsted page

@dynamictulip dynamictulip mentioned this pull request Nov 28, 2024
4 tasks
<caption class="govuk-table__caption govuk-table__caption--m">Current ratings</caption>
<thead class="govuk-table__head">
<tr class="govuk-table__row">
<th scope="col" class="govuk-table__header" aria-sort="ascending" data-testid="ofsted-current-ratings-school-name-header">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing govuk-body (which leads to browser font re-sizing a11y issues)

Same on all tables for the school name column

<th scope="col" class="govuk-table__header govuk-body column-header-ofsted-rating" aria-sort="none" data-testid="ofsted-current-ratings-early-years-provision-header">
Early years provision
</th>
<th scope="col" class="govuk-table__header govuk-body column-header-ofsted-rating" aria-sort="none" data-testid="ofsted-current-ratings-sixth-form-provision-header">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We seem to be overriding the width of most columns on most tables but overrides should be the exception rather than the norm.
I think it would be better to only override the width of the school name column and before/after joining column if they need to be specific widths

CategoriesOfConcern.SpecialMeasures => "Special Measures",
CategoriesOfConcern.SeriousWeakness => "Serious Weakness",
CategoriesOfConcern.NoticeToImprove => "Notice To Improve",
_ => "Unknown"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From old PR: #634 (comment)
image

@academy.PreviousOfstedRating.SixthFormProvision.ToDisplayString()
</td>
<td class="govuk-table__cell govuk-body" data-sort-value="@(academy.IsPreviousInspectionAfterJoining ? "After" : "Before")" data-testid="ofsted-previous-ratings-before-or-after-joining ">
@await Html.PartialAsync("_BeforeOrAfterTag", academy.IsCurrentInspectionAfterJoining)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@await Html.PartialAsync("_BeforeOrAfterTag", academy.IsCurrentInspectionAfterJoining)
@await Html.PartialAsync("_BeforeOrAfterTag", academy.IsPreviousInspectionAfterJoining)

<td class="govuk-table__cell govuk-body" data-sort-value="@academy.CurrentOfstedRating.CategoryOfConcern.ToDataSortValue()" data-testid="category-of-concern" data-testid="ofsted-safeguarding-and-concerns-category-of-concern">
@academy.CurrentOfstedRating.CategoryOfConcern.ToDisplayString()
</td>
<td class="govuk-table__cell govuk-body" data-sort-value="@(academy.IsPreviousInspectionAfterJoining ? "After" : "Before")" data-testid="ofsted-safeguarding-and-concerns-before-or-after-joining">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<td class="govuk-table__cell govuk-body" data-sort-value="@(academy.IsPreviousInspectionAfterJoining ? "After" : "Before")" data-testid="ofsted-safeguarding-and-concerns-before-or-after-joining">
<td class="govuk-table__cell govuk-body" data-sort-value="@(academy.IsCurrentInspectionAfterJoining ? "After" : "Before")" data-testid="ofsted-safeguarding-and-concerns-before-or-after-joining">

@@ -0,0 +1,13 @@
@model bool
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For readability and to enable extra states (like not inspected) we could use an enum instead of a bool to store the before/after state

public enum BeforeOrAfterJoining
{
    Before,
    After
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants