Summary
Add tagging UI to collections on the frontend: type definitions, form input, detail view, and list filtering.
Depends on: #1265
Type changes (Collection.ts)
- Add
tags: string[] to Collection and CollectionSummary.
- Add
tags: string[] (default []) to CollectionRequest schema.
- Add
tags: string[] | undefined to CollectionUpdate schema (undefined = no change).
CollectionForm (CollectionForm.tsx)
Multi-tag input field:
- User types a tag and confirms with Enter or comma → tag appears as a removable chip.
- Tags are lowercased on input (mirrors backend normalisation).
- Submitted as the
tags array in the request body.
CollectionDetail (CollectionDetail.tsx)
Display the collection's tags as chips in the metadata section (alongside name, organism, description).
Collections list page
- Add a tag filter control (multi-tag chip input or multi-select).
- When one or more tags are selected, pass them as
?tags=… query params to the API (AND semantics — all selected tags must be present).
- Update
getCollections.ts to accept and forward a tags?: string[] parameter.
Summary
Add tagging UI to collections on the frontend: type definitions, form input, detail view, and list filtering.
Depends on: #1265
Type changes (
Collection.ts)tags: string[]toCollectionandCollectionSummary.tags: string[](default[]) toCollectionRequestschema.tags: string[] | undefinedtoCollectionUpdateschema (undefined = no change).CollectionForm (
CollectionForm.tsx)Multi-tag input field:
tagsarray in the request body.CollectionDetail (
CollectionDetail.tsx)Display the collection's tags as chips in the metadata section (alongside name, organism, description).
Collections list page
?tags=…query params to the API (AND semantics — all selected tags must be present).getCollections.tsto accept and forward atags?: string[]parameter.