feat(admissions): publish the latest cut-off only, holding history back
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m4s
PR Checks / Backend Smoke (pull_request) Successful in 7s
PR Checks / Build Backend (no push) (pull_request) Successful in 16s
PR Checks / Build Frontend (no push) (pull_request) Successful in 45s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 11s
PR Checks / AI Code Review (Claude) (pull_request) Failing after 3m17s
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m4s
PR Checks / Backend Smoke (pull_request) Successful in 7s
PR Checks / Build Backend (no push) (pull_request) Successful in 16s
PR Checks / Build Frontend (no push) (pull_request) Successful in 45s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 11s
PR Checks / AI Code Review (Claude) (pull_request) Failing after 3m17s
Earlier years are to become a paid feature, so they stop being published.
The load-bearing part is that this is a change to the API, not only to the
page. /api/schools/{urn} is public and unauthenticated: leaving
admission_distance_history in the payload while declining to render it would
have handed the whole record to anyone who opened the network tab. It is
withheld at the source, and the page follows.
Nothing changes upstream. The tap, the plausibility band and
fact_admission_distance are untouched and still load every published year, so
restoring history for entitled callers is a change to one function in
data_loader rather than a re-collection.
What the reader now gets is the latest figure on the Admissions tile, and a
Distance section that answers the question the number alone cannot: whether
their own address falls inside it. Retitled to "How far away are you?", which
is what it now does — the previous title described a record that is no longer
there.
Removed with the history: the trend chart, the year-by-year table, the
per-year verdict strip, the trend summary and the coverage note, along with
their CSS. The section goes from 743px to 417px.
One consequence worth naming. A run of years used to soften a single close
call — a home just outside one year's cut-off was usually inside another. With
one year published, the "too close to call" band is the entire safety margin
between a parent and a place they do not have, so the verdict now names its
year, and the three outcomes are tinted apart rather than distinguished by
wording alone.
The existing stylesheet test earned its keep here: the three verdict classes
were referenced before they were written, and it caught them. Unstyled, a
"beyond the cut-off" result would have been indistinguishable from an "inside"
one — the exact failure the longhand class map was written to prevent.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WDvkyqqHABm4bmth2kjAxE
This commit is contained in:
1 parent
50b599a09b
commit
c9a1892bfb
20 files changed
+382
-1215
No files matched your search
@@ -2099,105 +2099,6 @@
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.cutoffChartKey {
|
||||
margin: 0.6rem 0 0;
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.55;
|
||||
color: var(--text-secondary);
|
||||
max-width: 68ch;
|
||||
}
|
||||
|
||||
/* ── Year-by-year table ── */
|
||||
|
||||
.cutoffTableWrap {
|
||||
margin-top: 1.25rem;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.cutoffTable {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.875rem;
|
||||
/* Below this the four columns crush; the wrapper scrolls instead of the
|
||||
page, so the section itself never scrolls sideways. */
|
||||
min-width: 26rem;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.cutoffTable thead th {
|
||||
text-align: right;
|
||||
font-size: 0.6875rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
color: var(--text-secondary);
|
||||
padding: 0 0.625rem 0.55rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cutoffTable thead th:first-child,
|
||||
.cutoffTable tbody th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.cutoffTable tbody td,
|
||||
.cutoffTable tbody th {
|
||||
text-align: right;
|
||||
padding: 0.65rem 0.625rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-weight: 400;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.cutoffTable tbody th {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.cutoffTable tbody tr:last-child td,
|
||||
.cutoffTable tbody tr:last-child th {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.cutoffRowLatest td,
|
||||
.cutoffRowLatest th {
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
|
||||
.cutoffCellMissing {
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.cutoffRouteFlag {
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-secondary);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cutoffPill {
|
||||
display: inline-block;
|
||||
font-size: 0.6875rem;
|
||||
font-weight: 600;
|
||||
padding: 0.15rem 0.55rem;
|
||||
border-radius: 999px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cutoffPillOver {
|
||||
background: var(--brand-bg);
|
||||
color: var(--brand-strong);
|
||||
}
|
||||
|
||||
.cutoffPillOk {
|
||||
background: var(--status-above-bg);
|
||||
color: var(--status-above);
|
||||
}
|
||||
|
||||
.cutoffPillNa {
|
||||
background: var(--bg-secondary);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
/* ── Map panel ── */
|
||||
|
||||
.cutoffMapPanel {
|
||||
@@ -2252,12 +2153,6 @@
|
||||
box-shadow: inset 0 0 0 2px var(--brand);
|
||||
}
|
||||
|
||||
.cutoffSwatchPast {
|
||||
background: transparent;
|
||||
box-shadow: inset 0 0 0 1.5px var(--brand);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.cutoffSwatchHome {
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
@@ -2394,54 +2289,6 @@
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.cutoffYearStrip {
|
||||
list-style: none;
|
||||
margin: 0.75rem 0 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.cutoffYearChip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.3rem;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
padding: 0.2rem 0.5rem;
|
||||
border-radius: 999px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cutoffYearChipYear {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.cutoffYearInside {
|
||||
background: var(--status-above-bg);
|
||||
color: var(--status-above);
|
||||
}
|
||||
|
||||
.cutoffYearOutside {
|
||||
background: var(--status-below-bg);
|
||||
color: var(--status-below);
|
||||
}
|
||||
|
||||
/* Deliberately neutral rather than a warning colour: "we cannot tell" is not a
|
||||
bad outcome, and tinting it amber would read as one. */
|
||||
.cutoffYearTooClose {
|
||||
background: var(--bg-secondary);
|
||||
color: var(--text-primary);
|
||||
box-shadow: inset 0 0 0 1px var(--border);
|
||||
}
|
||||
|
||||
.cutoffYearUnknown {
|
||||
background: var(--bg-secondary);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.cutoffCheckCaveat {
|
||||
margin: 0.9rem 0 0;
|
||||
font-size: 0.8125rem;
|
||||
@@ -2488,3 +2335,25 @@
|
||||
.cutoffMapReveal {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
/* ── Postcode check result, coloured by verdict ──
|
||||
*
|
||||
* These override the neutral brand tint on .cutoffCheckResult. Without them the
|
||||
* three outcomes render identically, which is the specific failure the class
|
||||
* map in CutoffMapPanel is written out longhand to avoid — and which the
|
||||
* stylesheet test caught when they were referenced before being defined.
|
||||
*/
|
||||
.cutoffResultInside {
|
||||
background-image: linear-gradient(var(--status-above-bg), var(--status-above-bg));
|
||||
}
|
||||
|
||||
.cutoffResultOutside {
|
||||
background-image: linear-gradient(var(--status-below-bg), var(--status-below-bg));
|
||||
}
|
||||
|
||||
/* Deliberately neutral: "we cannot tell" is not a bad outcome, and tinting it
|
||||
like one would push a reader toward a conclusion the data does not support. */
|
||||
.cutoffResultTooClose {
|
||||
background-image: none;
|
||||
background-color: var(--bg-secondary);
|
||||
}
|
||||
Reference in new issue
Block a user