From 3650f7d8b77ea44c86695524cc8206e76963b899 Mon Sep 17 00:00:00 2001
From: Tudor A new section on the school detail page. Fictional schools and figures; shipped
+ colour, type and section shell taken from
+
+ {count
+ ? `${count} school${count === 1 ? '' : 's'} selected`
+ : 'Compare side by side'}
+
+ {count
+ ? 'This school is included automatically.'
+ : 'Add a school to compare it with this one.'}
+
+ {loosest >= 3
+ ? `Other ${phaseNoun} schools near ${schoolName}.`
+ : `Other ${phaseNoun} schools near ${schoolName}, with a similar intake.`}
+
+ Schools of the same phase, nearest first, preferring those whose intake
+ resembles this one — gender, religious character, and whether the school
+ selects by ability. Special schools are only ever compared with other
+ special schools.
+
+ The labels on each card list what that school actually shares with this
+ one. Where nothing close enough was found nearby, the match is loosened
+ and the labels say less.
+
+ Distances are straight-line from this school, not road distance and not
+ from your home. Being listed here is not a recommendation.
+ {school.distance_miles} miles away
+ {[school.school_type, school.age_range && `Ages ${school.age_range}`]
+ .filter(Boolean)
+ .join(' · ')}
+
+ {formatMetric(school.metric_value, school.metric_key)}
+ {metricLabel(school.metric_key)}
+ {formatMetric(thisMetricValue, metricKey)} at this school
+ Similar schools nearby
+ globals.css.Similar schools nearby
+ How these schools are chosen
+
+ {schools.map((school) => (
+
+
+
+
+ {school.school_name}
+
+
+
+ {school.shared.map((label) => (
+
+
- Schools of the same phase, nearest first, preferring those whose intake - resembles this one — gender, religious character, and whether the school - selects by ability. Special schools are only ever compared with other - special schools. -
-- The labels on each card list what that school actually shares with this - one. Where nothing close enough was found nearby, the match is loosened - and the labels say less. -
-- Distances are straight-line from this school, not road distance and not - from your home. Being listed here is not a recommendation. -
-+ Distances are straight-line from this school, not road distance. +
); } @@ -1170,13 +1171,8 @@ Create `nextjs-app/components/school/SimilarSchools.module.css`. Tokens only — ```css .heading { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -0.4px; margin: 0; } -.lede { margin: 0.5rem 0 0; color: var(--text-secondary); max-width: 64ch; } - -.method { margin: 0.9rem 0 1.4rem; } -.method summary { cursor: pointer; color: var(--brand); font-size: 0.85rem; font-weight: 500; width: fit-content; } -.method div { margin-top: 0.6rem; padding: 0.9rem 1rem; background: var(--bg-secondary); border-radius: 8px; } -.method p { margin: 0 0 0.55rem; font-size: 0.82rem; color: var(--text-secondary); max-width: 70ch; } -.method p:last-child { margin-bottom: 0; } +.lede { margin: 0.5rem 0 1.25rem; color: var(--text-secondary); max-width: 64ch; } +.caption { margin: 1rem 0 0; font-size: 0.72rem; color: var(--text-muted); } .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; list-style: none; margin: 0; padding: 0; } @media (max-width: 820px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } } diff --git a/docs/superpowers/specs/2026-09-21-similar-schools-nearby-design.md b/docs/superpowers/specs/2026-09-21-similar-schools-nearby-design.md index a7191ae..e0ba5cc 100644 --- a/docs/superpowers/specs/2026-09-21-similar-schools-nearby-design.md +++ b/docs/superpowers/specs/2026-09-21-similar-schools-nearby-design.md @@ -105,6 +105,13 @@ the promise in the heading and a reader scanning the row reads the first card as the closest. A tier-2 school at 0.4 miles therefore appears above a tier-1 school at 2.9 miles, and the chips explain the difference in match quality. +**More than three qualifying schools are dropped, not paginated.** In a dense +urban area dozens of schools clear tier 1, and the section shows the three +nearest of them. There is no "show more" and no count of what was left out, +because `NearbyPlaces` sits directly beneath and already answers "more schools +near here" by linking to the place pages — which are the pages built for +browsing a full list, and which the school page exists to feed. + **Fewer than two results renders nothing.** Not an empty state, not a single lonely card, not padding with schools that failed the hard filters. The section is absent, the nav item is absent, and the page is unchanged from today. A page @@ -170,7 +177,7 @@ match the selection did not actually make. `components/school/SimilarSchoolsSection.tsx` — a server component wrapped in the shared `Section` shell from `sectionShared.tsx`. It renders the heading, -the lede, the `${v.lede}
-Schools of the same phase, nearest first, preferring those whose intake - resembles this one — gender, religious character, and whether the school - selects by ability. Special schools are only ever compared with other - special schools.
-The chips on each card list what that school actually shares with this - one. Where nothing close enough was found nearby, the match is loosened - and the chips say less.
-Distances are straight-line from this school, not road distance and not - from your home. Being listed here is not a recommendation, and the - results shown are context rather than a measure of fit.
-${v.caption} Fictional schools and figures for this mockup.
+Distances are straight-line from this school, not road distance. + ${v.caption} Fictional schools and figures for this mockup.
${v.note}
`; -- 2.54.0 From e4e8f02599a06ba2a965045f7ce97047612d35c6 Mon Sep 17 00:00:00 2001 From: Tudor- {loosest >= 3 - ? `Other ${phaseNoun} schools near ${schoolName}.` - : `Other ${phaseNoun} schools near ${schoolName}, with a similar intake.`} -
- -+ {loosest >= 3 + ? `Other ${phaseNoun} schools near ${schoolName}.` + : `Other ${phaseNoun} schools near ${schoolName}, with a similar intake.`} +
+ + } + > {schools.map((school) => ({school.distance_miles} miles away
@@ -1149,7 +1360,7 @@ export function SimilarSchoolsSection({