Skip to content

Chore: Add criteria & endangered selector into search form#310

Merged
zigzagdev merged 12 commits intomainfrom
chore/add-criteria_endangered-search-form
May 4, 2026
Merged

Chore: Add criteria & endangered selector into search form#310
zigzagdev merged 12 commits intomainfrom
chore/add-criteria_endangered-search-form

Conversation

@zigzagdev
Copy link
Copy Markdown
Owner

No description provided.

zigzagdev and others added 12 commits May 3, 2026 20:11
…rip)

Add is_endangered to HeritageSearchParams and SearchValues, default it
to null/false, parse and serialize the URL query param, and round-trip
the value through the form / result containers and the detail layout's
quick-submit. The form's internal state initialiser, the detail layout's
DEFAULT_SEARCH, and the search container test mocks are updated to
satisfy the new field.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Place a LocaleToggle next to "Back to all sites" so users can switch
locales from the search results page itself, and read the button text
plus the empty-state message from useText. The h1 brand "Search Results"
and the subtitle stay untranslated by design.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…chParams literals

Two literals in test code and the detail-side HeritageSubHeader were
missed when is_endangered was added to the types, breaking CI typecheck.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… round-trip)

Add criteria: CriteriaCode[] to HeritageSearchParams and SearchValues,
default it to [], and parse/serialize the URL as a comma-separated list
(criteria=ii,iv) — invalid codes are dropped, duplicates collapsed, and
the resulting array is sorted in CRITERIA canonical order. The form /
result containers, detail layout, both HeritageSubHeaders, and the test
helpers are updated to satisfy the new field. Empty array stays out of
the URL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Render the i–x criteria as multi-toggle chips between the Category row
and the Endangered checkbox. Clicking a chip adds or removes the code
from the selection (kept in CRITERIA canonical order); the heading
reuses the existing text.criteria key.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Chore: multi-select filter (i–x) to the heritage search form
@zigzagdev zigzagdev self-assigned this May 4, 2026
@zigzagdev zigzagdev linked an issue May 4, 2026 that may be closed by this pull request
4 tasks
Copy link
Copy Markdown
Owner Author

@zigzagdev zigzagdev left a comment

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 531bb78 into main May 4, 2026
1 check passed
@zigzagdev zigzagdev deleted the chore/add-criteria_endangered-search-form branch May 4, 2026 02:08
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.

Extend heritage search filters with Endangered + UNESCO Criteria

1 participant