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.
41 lines
1.3 KiB
Markdown
41 lines
1.3 KiB
Markdown
+++
|
|
title = "Implement shared QuoteCard component — displays text, author, source, date, tags"
|
|
priority = 5
|
|
status = "done"
|
|
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 `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>
|