Conversation
Deployments
|
There was a problem hiding this comment.
Pull request overview
Adds tabbed navigation to the support claim show pages so support users can view claim details, school details, associated school users, and history in one place without extra navigation steps.
Changes:
- Introduces GOV.UK tabs on multiple support claim show views (claims, payments, auditing/samplings, clawbacks).
- Adds new partials for “School details” and “School users” tab content and adjusts existing partials for tab usage.
- Updates system specs and i18n strings to cover/align with the new tabbed UI.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/system/claims/support/claims/payments/view_a_claim_spec.rb | Updates the payments claim show system spec to exercise the new tabs and their content. |
| spec/system/claims/support/claims/clawbacks/support_user_views_clawbacks_show_page_spec.rb | Adjusts assertions to scope grant funding checks under #grant_funding; removes some history assertions. |
| spec/system/claims/support/claims/clawbacks/support_user_requests_a_clawback_with_one_mentor_incorrect_spec.rb | Scopes “Grant funding” expectations within #grant_funding. |
| spec/system/claims/support/claims/clawbacks/support_user_requests_a_clawback_with_all_mentors_incorrect_spec.rb | Scopes “Grant funding” expectations within #grant_funding. |
| spec/system/claims/support/claims/clawbacks/support_user_requests_a_clawback_spec.rb | Scopes “Grant funding” expectations within #grant_funding. |
| config/locales/en/claims/support/claims/samplings.yml | Adds tab labels for auditing claim show. |
| config/locales/en/claims/support/claims/payments/claims.yml | Adds tab labels for payments claim show. |
| config/locales/en/claims/support/claims/clawbacks.yml | Adds tab labels for clawbacks claim show. |
| config/locales/en/claims/support/claims.yml | Adds shared tab labels plus copy for school users/details sections. |
| app/views/claims/support/claims/show.html.erb | Wraps the main support claim show page in tabs and renders new tab content. |
| app/views/claims/support/claims/samplings/show.html.erb | Adds tabs to auditing claim show page. |
| app/views/claims/support/claims/payments/claims/show.html.erb | Adds tabs to payments claim show page. |
| app/views/claims/support/claims/clawbacks/show.html.erb | Adds tabs to clawbacks claim show page. |
| app/views/claims/support/claims/_school_users.html.erb | New partial rendering a table of users for the claim’s school. |
| app/views/claims/support/claims/_school_details.html.erb | New partial rendering school details/grant conditions/funding/contact details. |
| app/views/claims/support/claims/_history.html.erb | Refactors history partial markup to suit tab rendering (heading level changed). |
| app/views/claims/support/claims/_details.html.erb | Removes link on the “School” summary row value. |
| app/views/claims/schools/_contact_details.html.erb | Refactors to use the passed organisation local (instead of @school). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <div class="govuk-grid-row"> | ||
| <div class="govuk-grid-column-two-thirds"> | ||
| <h2 class="govuk-heading-m"><%= t(".sub_heading") %></h2> | ||
| <h1 class="govuk-heading-l"><%= t(".sub_heading") %></h1> |
There was a problem hiding this comment.
Changing the History heading to an
introduces an extra page-level heading when rendered inside the claim tabs. This leads to multiple
s (especially with JS disabled where all tab panels are shown). Recommend using an
/
here and reserving
for the claim title only.
| <h1 class="govuk-heading-l"><%= t(".sub_heading") %></h1> | |
| <h2 class="govuk-heading-l"><%= t(".sub_heading") %></h2> |
| <% summary_list.with_row do |row| %> | ||
| <% row.with_key(text: Claims::Claim.human_attribute_name(:school)) %> | ||
| <% row.with_value(text: govuk_link_to(claim.school_name, claims_support_school_path(claim.school))) %> | ||
| <% row.with_value(text: claim.school_name) %> |
There was a problem hiding this comment.
This change removes the link from the School value in the claim summary list. If support users still need to navigate to the full school page, this is a functional regression. Consider keeping the school name as a link (or adding an explicit “View school” link elsewhere) while still providing the new School details tab.
| <% row.with_value(text: claim.school_name) %> | |
| <% row.with_value(text: govuk_link_to(claim.school_name, claim.school)) %> |
| expect(page).to have_table_row({ | ||
| "Name" => "Sarah Smith", | ||
| "Email" => "sarah.smith@hogwarts.ac.uk", | ||
| "Last signed in" => 1.day.ago.strftime("%d %b %H:%M"), | ||
| }) |
There was a problem hiding this comment.
This assertion formats 1.day.ago directly in the expectation, but the record was created with a separate 1.day.ago call earlier, so the formatted value can differ (and can also be sensitive to timezone/minute boundaries). To avoid flakiness, store the timestamp in a variable (or travel_to a fixed time) and format it using the same l(..., format: :short) as the view.
| within "#grant_funding" do | ||
| expect(page).to have_h2("Grant funding") | ||
| expect(page).to have_summary_list_row("Original claim amount", @clawback_requested_claim.amount) | ||
| end |
There was a problem hiding this comment.
The History assertions for this claim state were removed, so the spec no longer verifies that claim activity is shown correctly on the show page. Since the UI now uses tabs, consider explicitly clicking the “History” tab and reintroducing assertions for the timeline items/links relevant to this scenario.
| within "#grant_funding" do | |
| expect(page).to have_h2("Grant funding") | |
| expect(page).to have_summary_list_row("Original claim amount", @clawback_requested_claim.amount) | |
| end | |
| click_on "History" | |
| expect(page).to have_content("History") | |
| expect(page).to have_content("Claim 22222222") |
| @@ -167,8 +168,6 @@ def then_i_see_the_show_page_for_the_clawback_in_progress_claim | |||
| expect(row).to have_css("ul.govuk-list li", text: mentor.full_name) | |||
| end | |||
| end | |||
There was a problem hiding this comment.
For this scenario the spec no longer asserts the History heading/timeline title, but still expects a “View details” link. If tabs are enhanced with JS (hiding inactive panels), this can become brittle unless the test navigates to the History tab first. Consider clicking “History” and asserting the expected timeline title as well, so the test exercises the intended UI.
| end | |
| end | |
| click_on "History" | |
| expect(page).to have_h2("History") |
| @@ -0,0 +1,25 @@ | |||
| <h1 class="govuk-heading-l"><%= t(".heading") %></h1> | |||
There was a problem hiding this comment.
The tab panels introduce additional
headings (e.g., “School users”). With GOV.UK tabs, all panels are in the DOM (and without JS they’re all visible), so this results in multiple page-level
s, which is invalid heading structure and harms accessibility. Recommend keeping a single
for the page (the claim title) and using
/
headings (or relying on the tabs component’s panel titles) inside each tab panel.
| <h1 class="govuk-heading-l"><%= t(".heading") %></h1> | |
| <h2 class="govuk-heading-l"><%= t(".heading") %></h2> |
| <% organisation.users.each do |user| %> | ||
| <% body.with_row do |row| %> | ||
| <% row.with_cell text: user.full_name %> | ||
| <% row.with_cell text: user.email %> | ||
| <% row.with_cell text: user.last_signed_in_at ? l(user.last_signed_in_at, format: :short) : t(".never_signed_in") %> |
There was a problem hiding this comment.
Table row order is currently based on organisation.users.each, which is not guaranteed to be stable unless the association has an order defined. For a predictable UI (and to avoid flaky tests when multiple users exist), consider ordering explicitly (e.g., by full name using the existing order_by_full_name scope).
| @@ -0,0 +1,9 @@ | |||
| <h1 class="govuk-heading-l"><%= t(".heading") %></h1> | |||
There was a problem hiding this comment.
This partial uses an
(“School details”) but the claim show page already has a page-level
in the first tab. When tabs are rendered without JS, multiple
s will be visible on the page. Recommend changing this to an
(or a smaller GOV.UK heading) so the overall page keeps a single
.
| <h1 class="govuk-heading-l"><%= t(".heading") %></h1> | |
| <h2 class="govuk-heading-l"><%= t(".heading") %></h2> |
Context
The user journey involves jumping through several navigation steps in the service to see basic information which should really be visible when viewing the claim.
Changes proposed in this pull request
Guidance to review
Link to Trello card
https://trello.com/c/mS6kwHTs/323-add-users-and-school-details-to-the-claim-screen-for-support-users
Screenshots