Skip to content

Improve search result page titles#264

Merged
ewlarson merged 1 commit into
developfrom
feature/search-page-title-constraints
May 27, 2026
Merged

Improve search result page titles#264
ewlarson merged 1 commit into
developfrom
feature/search-page-title-constraints

Conversation

@ewlarson

Copy link
Copy Markdown
Contributor

Summary

  • Add a shared search page title builder for keyword, facet-only, advanced, year range, exclusion, and bounding-box searches.
  • Use the shared builder in both the client-side Seo fallback and the React Router meta export so browser titles and SSR metadata stay aligned.
  • Cover the legacy Geoportal-style f[...] and bbox= URL shapes as well as current include_filters[...] geo/facet params.

Impact

Facet-only and bounding-box search pages now produce distinct page titles such as Place: Wisconsin / Resource Class: Maps / Resource Type: Topographic maps and Bounding Box: -87.1418 28.265814 -50.799027 60.34877, which should make Google Analytics page-title reporting easier to segment.

Validation

  • npm test -- searchPageTitle page-titles
  • ./node_modules/.bin/prettier --check src/utils/searchPageTitle.ts src/__tests__/utils/searchPageTitle.test.ts src/pages/SearchPage.tsx src/__tests__/pages/page-titles.test.tsx app/routes/search.tsx
  • ./node_modules/.bin/eslint src/utils/searchPageTitle.ts src/pages/SearchPage.tsx src/__tests__/utils/searchPageTitle.test.ts src/__tests__/pages/page-titles.test.tsx app/routes/search.tsx (0 errors; existing route Fast Refresh warnings remain)
  • git diff --check

Note: full npm run lint still reports existing unrelated lint errors across other frontend files.

@ewlarson ewlarson changed the title [codex] Improve search result page titles Improve search result page titles May 27, 2026
@ewlarson ewlarson marked this pull request as ready for review May 27, 2026 19:12
@ewlarson ewlarson merged commit 2246f20 into develop May 27, 2026
12 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.

1 participant