You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.2 KiB
Markdown
34 lines
1.2 KiB
Markdown
+++
|
|
title = "Implement tag filter component — tag input/select for browse and author pages"
|
|
priority = 5
|
|
status = "todo"
|
|
ticket_type = "task"
|
|
dependencies = ["93515e", "0fbdd5"]
|
|
+++
|
|
|
|
<context>
|
|
The `quotesdb` UI is a Yew (Rust → Wasm) single-page app compiled by Trunk and hosted on Cloudflare Pages. It communicates with the backend API via `fetch` calls. Source lives in `src/bin/ui/`. Run with `trunk serve` for local development.
|
|
</context>
|
|
|
|
<goal>
|
|
Implement a shared `TagFilter` Yew component (`src/bin/ui/components/tag_filter.rs`) that renders a text input for filtering by tag. Used on the Browse and Author pages. The component accepts an `on_tag_change: Callback<String>` prop and calls it when the user types or clears the input.
|
|
</goal>
|
|
|
|
<constraints>
|
|
- Resolve TRIAGE ticket 5e3e37 (CSS/styling approach) before adding class names.
|
|
- Debounce or on-submit? Decide based on API latency — for now, fire on input change.
|
|
- Empty string means "no filter" — the parent clears the tag filter when the input is empty.
|
|
</constraints>
|
|
|
|
<validation>
|
|
From the `quotesdb/` directory:
|
|
|
|
```sh
|
|
trunk build
|
|
```
|
|
</validation>
|
|
|
|
<commit>
|
|
`feat(quotesdb): implement shared TagFilter component`
|
|
</commit>
|