Skip to content

feat: add dedicated criteria detail page at /heritages/criteria/:code#400

Merged
zigzagdev merged 6 commits into
mainfrom
feat/criteria-detail-page
Jun 23, 2026
Merged

feat: add dedicated criteria detail page at /heritages/criteria/:code#400
zigzagdev merged 6 commits into
mainfrom
feat/criteria-detail-page

Conversation

@zigzagdev

Copy link
Copy Markdown
Owner

Summary

  • Add a dedicated, shareable page per UNESCO selection criterion (i–x) at /heritages/criteria/:code, since each code is an independent resource and deserves a path param rather than a query param.
  • Page layout is modeled on pamon.sekaken.jp's heritage list cards: site name, description, region/country/category/year metadata line, criteria tags, and a detail link.
  • CriteriaTags now links to this internal page instead of the external UNESCO source URL, so users can see real example sites without leaving the SPA.

Changes

  • feat(i18n): add exampleSites / viewAllResults / unescoCriteriaSource ui-text keys
  • feat(criteria): add CriteriaExampleCard (single example site card)
  • feat(criteria): add CriteriaDetailPage (title/description + example grid + "view all results")
  • feat(criteria): add CriteriaDetailContainer (resolves :code, redirects invalid codes, fetches up to 6 example sites via the existing search query hook)
  • feat(routes): wire /heritages/criteria/:code into AppRoutes
  • refactor(criteria-tags): link criteria badges to the internal detail page instead of the external UNESCO link

Closes #399

Test plan

  • tsc --noEmit passes
  • jest — 17 suites / 94 tests passing (10 new tests added for the criteria feature)
  • Manually visit /heritages/criteria/iii (and an invalid code) in a browser to confirm rendering and the redirect behavior

Adds exampleSites/viewAllResults/unescoCriteriaSource keys ahead of
the new /heritages/criteria/:code page.
Card for a single heritage site example, modeled on
pamon.sekaken.jp's layout: name, description, region/country/
category/year metadata line, criteria tags, and a detail link.
Renders the criteria title/description, UNESCO source link, and a
grid of CriteriaExampleCard items with a "view all results" action.
Resolves the :code route param, redirects invalid criteria codes
back to /heritages, and fetches up to 6 example sites for that
criterion via the existing heritage search query hook.
Replaces the external UNESCO criteria link with an in-app Link to
/heritages/criteria/:code so users can see example sites without
leaving the SPA.

@zigzagdev zigzagdev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@zigzagdev zigzagdev merged commit d2ecce5 into main Jun 23, 2026
1 check passed
@zigzagdev zigzagdev deleted the feat/criteria-detail-page branch June 23, 2026 01:01
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.

feat: add dedicated criteria detail page at /worldheritages/criteria/:code

1 participant