feat(school-detail): dedupe hero header, drop redundant chip strip
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 12s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 49s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 12s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 12s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 49s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 12s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
The hero header rendered the Ofsted signal twice — once as a chip in the strip and again as a tile in the at-a-glance scorecard — and an Oversubscribed chip already covered by the First-choice tile's footnote. Remove the chip strip on both primary and secondary detail views, leaving the scorecard trio (Results · Ofsted · First-choice) as the single home for the headline numbers. Widen the scorecard's render gate to hasHeroStats so a school with an Ofsted rating but no results still shows its Ofsted signal (previously carried by the chip strip). Drop the now-dead .heroChip CSS, keeping the shared .tone-* tokens the scorecard's serif number uses. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -192,6 +192,12 @@ export function SecondarySchoolDetailView({
|
||||
const heroAtt8Nat = secondaryAvg.attainment_8_score ?? null;
|
||||
const heroAcademicYear = latestResults ? formatAcademicYear(latestResults.year) : '';
|
||||
|
||||
// Scorecard renders if any tile has content, so a results-less school still
|
||||
// shows its Ofsted signal (previously carried by the now-removed chip strip).
|
||||
const hasHeroStats = heroAtt8 != null
|
||||
|| ofsted != null
|
||||
|| admissions?.first_preference_offer_pct != null;
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
{/* ── Header ─────────────────────────────────────── */}
|
||||
@@ -265,30 +271,10 @@ export function SecondarySchoolDetailView({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Hero signal chips */}
|
||||
<div className={styles.heroChips}>
|
||||
<div className={`${styles.heroChip} ${styles[`tone-${ofstedHeroChip.tone}`]}`}>
|
||||
<div className={styles.heroChipTitle}>{ofstedHeroChip.title}</div>
|
||||
<div className={styles.heroChipSub}>{ofstedHeroChip.subtitle}</div>
|
||||
{ofstedHeroChip.detail && (
|
||||
<div className={styles.heroChipDetail}>{ofstedHeroChip.detail}</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{admissions?.oversubscribed && (
|
||||
<div className={`${styles.heroChip} ${styles['tone-coral']}`}>
|
||||
<div className={styles.heroChipTitle}>Oversubscribed</div>
|
||||
<div className={styles.heroChipSub}>
|
||||
{admissions.first_preference_offer_pct != null
|
||||
? `${Math.round(admissions.first_preference_offer_pct)}% of first-choice applicants offered a place`
|
||||
: 'More applicants than places'}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* At-a-glance stats row */}
|
||||
{latestResults && (
|
||||
{/* At-a-glance stats row — the single home for the headline numbers.
|
||||
Shows whenever any tile has content (results, Ofsted, or admissions),
|
||||
so schools without KS4 results still carry their Ofsted signal. */}
|
||||
{hasHeroStats && (
|
||||
<div className={styles.heroStats}>
|
||||
{heroAtt8 != null && (
|
||||
<div className={styles.heroStat}>
|
||||
|
||||
Reference in New Issue
Block a user