From 4e6be0ce65647410b4ff74f8b763207c28920c26 Mon Sep 17 00:00:00 2001 From: Tudor Date: Mon, 20 Jul 2026 12:03:23 +0100 Subject: [PATCH] fix(detail): banded first-choice interpretation + plain-English P8 absence copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Batch C (points 7-10): - Point 7: the admissions section shows the first-choice offer rate but no sense of how severe a low rate is. Reuse the compare screen's banded summariseAdmissions ('More than half of first choices missed out' etc.) as an interpretive line under the tiles. (Selective/faith framing was already present via admissionsTag.) - Point 8: replace the jargon P8-suspended banner ('not used for accountability purposes ... treat with caution') with the compare screen's plain-English 'no KS2 baseline (COVID)' explanation. - Points 9 (disadvantaged cohort sizes) and 10 (FSM benchmark) don't apply to the detail page: it shows disadvantaged composition, not disadvantaged attainment, and no FSM-vs-benchmark comparison — so there's no small-cohort caveat or cross-definition fallback to fix here. - Also fixed a stray lowercase 'national avg' provenance string Batch B missed. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB --- nextjs-app/components/SchoolDetailView.tsx | 10 +++++++++- nextjs-app/components/SecondarySchoolDetailView.tsx | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/nextjs-app/components/SchoolDetailView.tsx b/nextjs-app/components/SchoolDetailView.tsx index 13d7d87..229b71e 100644 --- a/nextjs-app/components/SchoolDetailView.tsx +++ b/nextjs-app/components/SchoolDetailView.tsx @@ -21,6 +21,7 @@ import { formatPercentage, formatProgress, formatAcademicYear, isProposedToClose, ofstedLegacyAreas, } from '@/lib/utils'; import { DeltaChip } from './DeltaChip'; +import { summariseAdmissions } from '@/lib/compareLogic'; const PerformanceChart = dynamic( () => import('./PerformanceChart').then((m) => m.PerformanceChart), @@ -85,6 +86,10 @@ export function SchoolDetailView({ // Trend toggle only appears with ≥2 years carrying an offer rate. const admissionsOfferYears = admissionsHistory.filter((h) => h.first_preference_offer_pct != null).length; const showAdmissionsTrend = admissionsOfferYears >= 2; + // Banded interpretation of the first-choice offer rate ("More than half of + // first choices missed out" etc.) — the same banding the compare screen + // uses, so a low offer rate reads as how severe it actually is. + const admissionsSummary = summariseAdmissions(admissions); // Only the section links scroll horizontally; Back and "All" stay pinned. const sectionLinksRef = useRef(null); const [sectionNavAtEnd, setSectionNavAtEnd] = useState(false); @@ -906,6 +911,9 @@ export function SchoolDetailView({ )} + {admissionsSummary.chip && ( +

{admissionsSummary.chip.text}

+ )} {/* Multi-year trend */} @@ -941,7 +949,7 @@ export function SchoolDetailView({ )} -
Pupils from disadvantaged backgrounds{primaryAvg.disadvantaged_pct != null ? ` · national avg: ${primaryAvg.disadvantaged_pct.toFixed(0)}%` : ''}
+
Pupils from disadvantaged backgrounds{primaryAvg.disadvantaged_pct != null ? ` · England avg: ${primaryAvg.disadvantaged_pct.toFixed(0)}%` : ''}
)} {latestResults?.eal_pct != null && ( diff --git a/nextjs-app/components/SecondarySchoolDetailView.tsx b/nextjs-app/components/SecondarySchoolDetailView.tsx index 8710078..d9cc74a 100644 --- a/nextjs-app/components/SecondarySchoolDetailView.tsx +++ b/nextjs-app/components/SecondarySchoolDetailView.tsx @@ -457,7 +457,8 @@ export function SecondarySchoolDetailView({ {p8Suspended && (
- Progress 8 scores for 2024/25 are not used for accountability purposes following the KS2 assessment disruption. Treat with caution. + Progress 8 isn't published for 2024/25: this GCSE year group sat no KS2 tests + (COVID), so DfE has no starting point to measure their progress from.
)} -- 2.54.0