fix(compare): expert should-fixes S1-S4, S6 — banded chips, P8 reason, KS4 gap caption, all-through framing, cohort sizes
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m2s
PR Checks / Backend Smoke (pull_request) Successful in 7s
PR Checks / Build Backend (no push) (pull_request) Successful in 10s
PR Checks / Build Frontend (no push) (pull_request) Successful in 49s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 10s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 3m8s
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m2s
PR Checks / Backend Smoke (pull_request) Successful in 7s
PR Checks / Build Backend (no push) (pull_request) Successful in 10s
PR Checks / Build Frontend (no push) (pull_request) Successful in 49s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 10s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 3m8s
S1: first-choice chip banded (More than half / About 1 in 3 / Over 1 in 4
missed out) so a 44%-offered grammar isn't understated by half.
S2: Progress 8 explains its absence for 2024/25+ cohorts (no KS2 baseline,
COVID) instead of a bare 'No data'.
S3: KS4 trend charts get their own honest gap caption (2019/20-2020/21
unpublished; later years not in our dataset yet); y-axis 'Value'→'Score';
buildCompareChart exposes englandOnlyYears.
S4: all-through schools labelled in chips, rail caption says 'N schools ·
<phase> view' for mixed baskets, whole-school roll no longer judged
against the single-phase median, community section carries an all-ages
caveat.
S6 (spec §8.5): disadvantaged attainment shows the cohort behind it
('of ~50 disadvantaged pupils').
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB
This commit is contained in:
@@ -53,6 +53,10 @@ export interface CompareChart {
|
||||
/** True when England published a 2021/22 figure but no school has one —
|
||||
* the UI shows: "DfE didn't publish school-level figures for 2021/22". */
|
||||
showUnpublished202122Note: boolean;
|
||||
/** Years where the England overlay has a value but no school does — the
|
||||
* chart shows a dashed-line-only stretch that needs explaining (KS2 and
|
||||
* KS4 have different honest explanations, so the component owns the copy). */
|
||||
englandOnlyYears: number[];
|
||||
}
|
||||
|
||||
export function buildCompareChart(
|
||||
@@ -92,11 +96,12 @@ export function buildCompareChart(
|
||||
}
|
||||
}
|
||||
|
||||
const idx202122 = years.indexOf(202122);
|
||||
const showUnpublished202122Note =
|
||||
idx202122 >= 0 &&
|
||||
englandDataset?.data[idx202122] != null &&
|
||||
schoolDatasets.every((ds) => ds.data[idx202122] == null);
|
||||
const englandOnlyYears = years.filter(
|
||||
(year, i) =>
|
||||
englandDataset?.data[i] != null && schoolDatasets.every((ds) => ds.data[i] == null),
|
||||
);
|
||||
|
||||
return { years, schoolDatasets, englandDataset, showUnpublished202122Note };
|
||||
const showUnpublished202122Note = englandOnlyYears.includes(202122);
|
||||
|
||||
return { years, schoolDatasets, englandDataset, showUnpublished202122Note, englandOnlyYears };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user