fix(search): keep the map list's count and sort on one line #161

Merged
tudor merged 1 commits from fix/map-pane-header into main 2026-10-01 09:25:17 +00:00
Owner

Keeps the count and the sort on one line at the top of the map view's list.

Why it wrapped

The list is 427px wide inside its padding. "19 schools within 1.0 miles of SW196AR" takes 359px, and the sort menu takes 281px because a native <select> is as wide as its longest option ("Highest Reading, Writing & Maths %"). Together they don't fit, so the sort dropped to a second line.

Fix

  • Shorter heading in the map view: it now reads "19 schools within 1 mile". The postcode is already in the search box just above, and "1 mile" matches the toolbar's wording. List view keeps the full heading.
  • Narrower sort menu: capped at 11rem; a long choice is cut short with "…".
  • No wrapping: if a narrow screen still can't fit both, the heading is cut short with "…" instead.

Tried on staging first by injecting the change into the live page. At 1440px the heading takes 243px and the sort menu 176px, on one line. Phones show only the heading (no sort) above the map, and it now fits on one line there too.

Tests

  • Unit: 518/518 pass, and next build succeeds. The map view's heading is checked for the short text, and list view still has the full one.
  • E2E: the desktop map journey checks that the heading and the sort sit on the same line.

🤖 Generated with Claude Code

Keeps the count and the sort on one line at the top of the map view's list. ## Why it wrapped The list is 427px wide inside its padding. "19 schools within 1.0 miles of SW196AR" takes 359px, and the sort menu takes 281px because a native `<select>` is as wide as its longest option ("Highest Reading, Writing & Maths %"). Together they don't fit, so the sort dropped to a second line. ## Fix - **Shorter heading in the map view:** it now reads **"19 schools within 1 mile"**. The postcode is already in the search box just above, and "1 mile" matches the toolbar's wording. List view keeps the full heading. - **Narrower sort menu:** capped at 11rem; a long choice is cut short with "…". - **No wrapping:** if a narrow screen still can't fit both, the heading is cut short with "…" instead. Tried on staging first by injecting the change into the live page. At 1440px the heading takes 243px and the sort menu 176px, on one line. Phones show only the heading (no sort) above the map, and it now fits on one line there too. ## Tests - Unit: 518/518 pass, and `next build` succeeds. The map view's heading is checked for the short text, and list view still has the full one. - E2E: the desktop map journey checks that the heading and the sort sit on the same line. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
tudor added 1 commit 2026-10-01 09:18:27 +00:00
fix(search): keep the map list's count and sort on one line
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m12s
PR Checks / Backend Smoke (pull_request) Successful in 10s
PR Checks / Build Backend (no push) (pull_request) Successful in 18s
PR Checks / Build Frontend (no push) (pull_request) Successful in 1m21s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 11s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 18s
5df8c93420
Beside the map, "19 schools within 1.0 miles of SW196AR" (359px) and the
sort menu (281px, as wide as its longest option) could not share the
pane's 427px, so the sort dropped to a second line.

In the map view the heading now reads "19 schools within 1 mile": the
postcode is already in the search box just above, and the radius reads
as the toolbar's does. The sort menu is capped at 11rem, truncating a
long choice, and the header no longer wraps; on a narrow pane the count
truncates rather than pushing the sort down. List view keeps the full
heading. Tried on staging by injecting the change: 243px + 176px, one
line at 1440.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

🤖 AI Code Review (Claude Code)

This PR shortens the results heading beside the map to "N schools within X miles", dropping the postcode, so it shares one line with the sort. The CSS keeps the count and sort on one line, truncating the count with an ellipsis and capping the select width. I checked that isMapView and radiusMiles are defined in HomeView.tsx before the heading uses them. Unit and e2e tests cover both the map and list headings. I found no correctness, security or deploy problems.

✅ No issues found.

## 🤖 AI Code Review (Claude Code) This PR shortens the results heading beside the map to "N schools within X miles", dropping the postcode, so it shares one line with the sort. The CSS keeps the count and sort on one line, truncating the count with an ellipsis and capping the select width. I checked that `isMapView` and `radiusMiles` are defined in HomeView.tsx before the heading uses them. Unit and e2e tests cover both the map and list headings. I found no correctness, security or deploy problems. ✅ No issues found.
tudor merged commit 74418ca6b9 into main 2026-10-01 09:25:17 +00:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tudor/school_compare#161