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.1 KiB
Markdown
34 lines
1.1 KiB
Markdown
+++
|
|
title = "Implement error display component — consistent error state UI across all pages"
|
|
priority = 4
|
|
status = "todo"
|
|
ticket_type = "task"
|
|
dependencies = ["c3503b", "93515e"]
|
|
+++
|
|
|
|
<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 `ErrorDisplay` Yew component (`src/bin/ui/components/error_display.rs`) that renders a styled error message when an API call fails. Used on all pages. Accepts an `Option<String>` error message prop — renders nothing when `None`.
|
|
</goal>
|
|
|
|
<constraints>
|
|
- Resolve TRIAGE ticket 5e3e37 (CSS/styling approach) before adding class names.
|
|
- Do not use `panic!` or `unwrap` in component code — all errors should surface via this component.
|
|
- Render nothing (not an empty box) when the error is `None`.
|
|
</constraints>
|
|
|
|
<validation>
|
|
From the `quotesdb/` directory:
|
|
|
|
```sh
|
|
trunk build
|
|
```
|
|
</validation>
|
|
|
|
<commit>
|
|
`feat(quotesdb): implement shared ErrorDisplay component`
|
|
</commit>
|