feat: add dedicated criteria detail page at /heritages/criteria/:code#400
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/heritages/criteria/:code, since each code is an independent resource and deserves a path param rather than a query param.CriteriaTagsnow 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): addexampleSites/viewAllResults/unescoCriteriaSourceui-text keysfeat(criteria): addCriteriaExampleCard(single example site card)feat(criteria): addCriteriaDetailPage(title/description + example grid + "view all results")feat(criteria): addCriteriaDetailContainer(resolves:code, redirects invalid codes, fetches up to 6 example sites via the existing search query hook)feat(routes): wire/heritages/criteria/:codeintoAppRoutesrefactor(criteria-tags): link criteria badges to the internal detail page instead of the external UNESCO linkCloses #399
Test plan
tsc --noEmitpassesjest— 17 suites / 94 tests passing (10 new tests added for the criteria feature)/heritages/criteria/iii(and an invalid code) in a browser to confirm rendering and the redirect behavior