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.
vibed/quotesdb/.beans/quotesdb-oukj--implement-sh...

46 lines
1.4 KiB
Markdown

---
# quotesdb-oukj
title: Implement shared QuoteCard component — displays text, author, source, date, tags
status: completed
type: task
priority: normal
created_at: 2026-03-10T23:32:05Z
updated_at: 2026-03-10T23:32:12Z
blocked_by:
- quotesdb-kaat
- quotesdb-wlpv
---
<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 `QuoteCard` Yew component (`src/bin/ui/components/quote_card.rs`) that displays:
- Quote text (styled as a blockquote)
- Author name (linked to `/author/:name`)
- Optional source and date
- Tags as clickable chips (linking to `/browse?tag=X`)
This component is reused on the Home, Browse, Author, and Quote Detail pages.
</goal>
<constraints>
- Resolve TRIAGE ticket 5e3e37 (CSS/styling approach) before adding class names.
- Accept a `Quote` struct as a prop (from shared types in `src/lib.rs`).
- Author link must navigate to `/author/:name` using yew-router's `Link` component.
- Tags are optional — render nothing if the quote has no tags.
</constraints>
<validation>
From the `quotesdb/` directory:
```sh
trunk build
```
</validation>
<commit>
`feat(quotesdb): implement shared QuoteCard component`
</commit>