Skip to content

surveys hub: search, filter and sort the cards in the browser - #231

Merged
bvkay merged 1 commit into
mainfrom
feat/surveys-index-controls
Sep 18, 2026
Merged

bvkay merged 1 commit into
mainfrom
feat/surveys-index-controls

Conversation

@bvkay

@bvkay bvkay commented Sep 18, 2026

Copy link
Copy Markdown
Owner

The /surveys page renders its controls hidden, a GET form on its own path with option lists drawn from the rows it lists, and every card carries its facts as data attributes (slug, title, organisation, region, stations, years, types, licence, DOI). One same-origin script, /src/surveys-hub.js, reveals the form and drives it: every search word must match the title, organisation, region or slug; each select narrows to one value; sorts by title, station count, newest, oldest or organisation, a survey with no stated year last; the view rides the URL query so it can be shared and reloaded; Clear is a plain link. Without script the page is the whole list in title order, as before.

The index page test allows the hub's one script on the same terms as the survey page's dialog scripts and pins the controls contract the script reads; the Caddy page-script pin covers the new file; a jsdom test drives the script against a fixture that mirrors the engine's markup. The hub rows now carry year_start and year_end for the sort.

The /surveys page renders its controls hidden, a GET form on its own path with
option lists drawn from the rows it lists, and every card carries its facts as
data attributes (slug, title, organisation, region, stations, years, types,
licence, DOI). One same-origin script, /src/surveys-hub.js, reveals the form
and drives it: every search word must match the title, organisation, region or
slug; each select narrows to one value; sorts by title, station count, newest,
oldest or organisation, a survey with no stated year last; the view rides the
URL query so it can be shared and reloaded; Clear is a plain link. Without
script the page is the whole list in title order, as before.

The index page test allows the hub's one script on the same terms as the survey
page's dialog scripts and pins the controls contract the script reads; the
Caddy page-script pin covers the new file; a jsdom test drives the script
against a fixture that mirrors the engine's markup. The hub rows now carry
year_start and year_end for the sort.
@bvkay
bvkay merged commit fe775c8 into main Sep 18, 2026
15 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