feat(brand): adopt the schoolcompare identity across the site
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m3s
PR Checks / Backend Smoke (pull_request) Successful in 7s
PR Checks / Build Backend (no push) (pull_request) Successful in 13s
PR Checks / Build Frontend (no push) (pull_request) Successful in 44s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 10s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 4m29s

Implements the supplied brand guideline: the pin-and-leaf mark, the lowercase
schoolcompare wordmark, Manrope for headings and Inter for everything a person
reads a number from, the deep-teal/coral/mustard/sage palette, and the rounder
geometry the guideline asks for.

The landing hero is rebuilt to the concept: a Sand panel carrying the
proposition, the search and a trust line, with the brand landscape bleeding to
the panel's right edge, followed by the four value props.

Concept vs reality — where the guideline describes something this product does
not have, the real feature takes its place and the decision is recorded in a
code comment next to it:

- The Thriving Score is not implemented. Four of its five sub-scores (pastoral,
  enrichment, community, facilities) have no source in DfE or Ofsted data, and
  its band names are Ofsted's own, which would sit beside the real Ofsted grade
  and be indistinguishable from it.
- Guides, About, Favourites and Sign in are not added to the nav — there are no
  such pages and no accounts system. Rankings and Admissions, which the
  guideline omits, keep their places because they exist.
- The fourth value prop is "Never miss a deadline" rather than "Save & revisit",
  which would need shortlisting.

Two deviations from the supplied swatches, both forced by contrast and both
confined to text and fills. Coral #F97360 under a white label measures 2.75:1
against a 4.5 floor, so --action is a darkened #BE3C27 and the original coral
survives as --coral for tints, borders and illustration. Mustard #F2C94C is
1.5:1 as text, so --mustard-ink carries labels while --mustard stays exact for
fills and rings. Every token clears AA on all three light grounds; Sand is the
binding one, so several values sit a step darker than white alone would need.

The guideline is light-only, but the site already ships a dark theme, so it is
rebuilt from the same tokens rather than dropped.

Verified: tsc clean, 159/159 unit tests, production build green, and the
generated share card and app icon render from the new mark. The hero and the
site chrome were rendered from the compiled CSS and the prerendered markup to
confirm Manrope and Inter actually resolve — a font token that silently falls
back has shipped here before.
This commit is contained in:
Tudor
2026-08-07 18:05:49 +01:00
parent f31f6f8404
commit accc562b90
25 changed files with 1698 additions and 886 deletions
+30 -11
View File
@@ -726,11 +726,10 @@ test('the brand typefaces actually load and apply', async ({ page }) => {
// rest are fallbacks and always end in a generic like sans-serif.
const first = (el: Element) =>
getComputedStyle(el).fontFamily.split(',')[0].replace(/["']/g, '').trim();
const prose = document.querySelector('[class*="editorialText"] p');
const headings = [...document.querySelectorAll('h1, h2')].map(first);
return {
body: first(document.body),
heading: first(document.querySelector('h1')!),
prose: prose ? first(prose) : null,
headings,
bodyStack: getComputedStyle(document.body).fontFamily,
displayToken: root.getPropertyValue('--font-display').trim(),
uiToken: root.getPropertyValue('--font-ui').trim(),
@@ -745,18 +744,38 @@ test('the brand typefaces actually load and apply', async ({ page }) => {
expect(fonts.uiToken, '--font-ui resolved').not.toBe('');
expect(fonts.proseToken, '--font-prose resolved').not.toBe('');
expect(fonts.body, 'body uses the UI face').toBe('Schibsted Grotesk');
expect(fonts.heading, 'headings use the display face').toBe('Schibsted Grotesk');
if (fonts.prose) {
expect(fonts.prose, 'running prose uses the serif').toBe('Literata');
}
// Inter carries body copy, every control and every figure; Manrope carries
// headings and key messaging. Both must actually resolve, not merely be
// named in a stack that never loads.
expect(fonts.body, 'body uses Inter').toBe('Inter');
expect(fonts.headings.length, 'the page has headings to check').toBeGreaterThan(0);
expect(fonts.headings, 'at least one heading uses Manrope').toContain('Manrope');
// The Times fallback is the specific failure that shipped. Match the family
// name only — a stack legitimately ends in sans-serif, so anchoring on
// /serif$/ would flag a perfectly healthy page.
// The Times fallback is the specific failure that shipped once. Match the
// family name only — a stack legitimately ends in sans-serif, so anchoring
// on /serif$/ would flag a perfectly healthy page.
expect(fonts.bodyStack).not.toMatch(/\bTimes\b/);
});
/**
* The wordmark is the one piece of brand chrome a user reads on every page,
* and it is set as two spans so "compare" can take the brand colour. A
* refactor that drops the second span, or reverts the lowercase styling,
* changes the brand without failing anything else.
*/
test('the header carries the schoolcompare lockup', async ({ page }) => {
await page.goto('/');
const home = page.getByRole('banner').getByRole('link', { name: /schoolcompare home/i });
await expect(home).toBeVisible({ timeout: 15_000 });
// Assert on rendered text rather than CSS-module class names, which are
// hashed at build time and change on any unrelated edit.
await expect(home).toHaveText(/^\s*schoolcompare\s*$/);
const mark = home.locator('svg').first();
await expect(mark).toBeVisible();
});
test('no visible text falls back to the browser default black', async ({ page }) => {
// Form controls don't inherit colour from their parent, so a missing
// declaration renders pure black — subtle in light mode, invisible in dark.