Skip to content

Wire filter presets, the directions picker and report-a-problem into the map - #331

Merged
yakew7 merged 1 commit into
StudentSuite:mainfrom
propcgamer20-png:feat/wire-presets-directions-report
Nov 2, 2026
Merged

yakew7 merged 1 commit into
StudentSuite:mainfrom
propcgamer20-png:feat/wire-presets-directions-report

Conversation

@propcgamer20-png

Copy link
Copy Markdown
Member

What this changes

Part of #313: three more items from its checklist, wired in one PR. The other items stay open, so this does not use "Fixes".

  • FilterPresets goes into MapPanel right under the category chips. One tap applies Libraries, SAT centres, Exam centres (both exam types), Govt offices or Airports by replacing the active type filter, through the existing onFiltersChange, so ?types= and the results update as before.
  • DirectionsModal is what the pin popup's directions button now opens. It was a plain Google link; the modal offers Google Maps, Apple Maps and an Android geo: link. The popup's main "Google Maps" button still links straight to the place.
  • ReportIssueDialog is opened by a new "Report a problem" link in the popup footer. It builds a pre-filled GitHub issue for that place, as the component was written to do.

Tests

  • filter-presets.test.tsx (new, 3 tests): the group and its five buttons, a single-type preset, and the two-type Exam centres preset.
  • pin-popup.test.tsx (new, 4 tests): the directions button opens the picker with Apple Maps and geo: links, the direct Google Maps link is still there, and "Report a problem" opens the report dialog for that place.
  • places-map.test.tsx: one new case: clicking the Airports preset narrows the list and sets types=airport in the URL.

Proof

  • In Chrome against npm run dev at /map: the five preset buttons render under the chips, and clicking Airports changes the URL to ?types=airport&... and the panel to "117 places shown" (the number of records in airport.json is 117 in the checked-out data).
  • npm run lint, npm run typecheck, npm run format:check are clean; npm run test:unit: 654 passed.

Not verified

I did not open a pin popup in the browser (I could not get one to open from a link in the automated run), so the two dialogs inside the Leaflet popup are covered by unit tests only. One thing to look at: the dialogs render in a portal while the popup is a Leaflet popup, and I have not checked what happens if the popup is closed while a dialog is open.

Type of change

  • Code or fix
  • New public place(s)
  • New or updated benefit guide
  • New or updated resource link
  • Docs

@vercel

vercel Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@propcgamer20-png is attempting to deploy a commit to the studentsuite Team on Vercel.

A member of the Team first needs to authorize it.

@yakew7
yakew7 merged commit 7139802 into StudentSuite:main Nov 2, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants