From 63713c3a2bcdba3c752bb80646982e29ef32f4b8 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Tue, 12 May 2026 22:30:36 +0100 Subject: [PATCH] good --- frontend/scripts/prerender.mjs | 4 +- .../src/components/map/LocationSearch.tsx | 3 +- frontend/src/i18n/locales/en.ts | 16 +- frontend/src/index.html | 4 +- frontend/src/lib/api.test.ts | 12 +- frontend/src/lib/consts.ts | 1 + frontend/src/lib/feature-icons.tsx | 2 +- frontend/src/lib/features.test.ts | 30 +-- frontend/src/lib/poi-distance-filter.test.ts | 64 ++++++ frontend/src/lib/poi-distance-filter.ts | 104 +++++---- frontend/src/lib/url-state.ts | 10 +- pipeline/download/places.py | 203 +++++++++++++++++- pipeline/download/test_places.py | 67 ++++++ pipeline/transform/test_merge.py | 32 +-- pipeline/utils/test_fuzzy_join.py | 99 +++++---- 15 files changed, 492 insertions(+), 159 deletions(-) create mode 100644 frontend/src/lib/poi-distance-filter.test.ts diff --git a/frontend/scripts/prerender.mjs b/frontend/scripts/prerender.mjs index 46ff71d..5006dba 100644 --- a/frontend/scripts/prerender.mjs +++ b/frontend/scripts/prerender.mjs @@ -12,9 +12,9 @@ const ROUTES = [ { path: '/', output: 'index.html', - title: 'Find the best postcodes and areas to live in England | Perfect Postcode', + title: 'Stop searching the wrong places | Perfect Postcode', description: - 'Discover where to live by comparing England postcodes by budget, commute, schools, crime, noise, broadband, property prices and local amenities before viewing homes.', + 'Filter every postcode in England by budget, commute, schools, crime, noise, broadband, property prices and amenities before you start chasing viewings.', }, { path: '/learn', diff --git a/frontend/src/components/map/LocationSearch.tsx b/frontend/src/components/map/LocationSearch.tsx index adb3da3..9bca0ec 100644 --- a/frontend/src/components/map/LocationSearch.tsx +++ b/frontend/src/components/map/LocationSearch.tsx @@ -2,6 +2,7 @@ import { useState, useCallback, useRef, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import type { MapFlyToOptions, PostcodeGeometry } from '../../types'; import { authHeaders } from '../../lib/api'; +import { POSTCODE_SEARCH_ZOOM } from '../../lib/consts'; import { useIsMobile } from '../../hooks/useIsMobile'; import { useLocationSearch, type SearchResult } from '../../hooks/useLocationSearch'; import { PlaceSearchInput } from '../ui/PlaceSearchInput'; @@ -148,7 +149,7 @@ export default function LocationSearch({ longitude: number; geometry: PostcodeGeometry; } = await res.json(); - onFlyTo(json.latitude, json.longitude, 16); + onFlyTo(json.latitude, json.longitude, POSTCODE_SEARCH_ZOOM); onLocationSearched?.({ postcode: json.postcode, geometry: json.geometry, diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index 906d47b..b1616c5 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -410,16 +410,16 @@ const en = { // ── Home Page ────────────────────────────────────── home: { - heroEyebrow: "For buyers who don't know where to start", - heroTitle1: 'Start with your needs,', - heroTitle2: 'not an area name', - heroTitle3: 'Then shortlist postcodes worth viewing.', + heroEyebrow: 'Find where to look first', + heroTitle1: 'Stop searching', + heroTitle2: 'the wrong places', + heroTitle3: 'Before listings take over.', heroSubtitle: - 'Most buyers start with a few familiar areas, then stitch together listing sites, commute checks, school reports, crime maps, broadband tools, and sold prices in separate tabs.', + 'Find postcodes where your budget, commute, and daily life line up.', heroDescription: - 'Set your budget, commute, schools, safety, noise, broadband, parks, shops, and property needs. Perfect Postcode checks postcodes across England and shows the areas worth shortlisting, including places you may not know by name.', - exploreTheMap: 'Start matching postcodes', - seeTheDifference: 'Watch the demo', + 'Perfect Postcode shows where to look before you start chasing viewings.', + exploreTheMap: 'Show me where to look', + seeTheDifference: 'Watch demo', productDemoLabel: 'Watch the postcode shortlist demo', playProductDemo: 'Play the postcode shortlist demo', scrollToProductDemo: 'Scroll to product demo', diff --git a/frontend/src/index.html b/frontend/src/index.html index 5d01745..ad6870b 100644 --- a/frontend/src/index.html +++ b/frontend/src/index.html @@ -6,8 +6,8 @@ - Find the best postcodes and areas to live in England | Perfect Postcode - + Stop searching the wrong places | Perfect Postcode +