25 lines
1.4 KiB
Markdown
25 lines
1.4 KiB
Markdown
# F-084 — Implementer evidence
|
|
|
|
## What was implemented
|
|
|
|
Single-render fix in the admin `/categories` list: the emoji slot is now shown unconditionally for every category row, with a neutral grey placeholder when the emoji is empty.
|
|
|
|
### Files changed
|
|
|
|
- `project/apps/admin/src/app/(dashboard)/categories/page.tsx`
|
|
- `CategoryRow` name cell: removed the `cat.children && cat.children.length > 0 &&` gate.
|
|
- Emoji slot now renders `<span className="text-xl">{cat.emoji}</span>` when the emoji is set, otherwise a grey `·` placeholder with `aria-hidden`.
|
|
- No changes to the form, save flow, or backend.
|
|
|
|
## Validation
|
|
|
|
- `npx tsc --noEmit` → exit 0
|
|
- `npx eslint` on the file: 2 pre-existing `no-explicit-any` errors (unrelated to this fix, in the SEO form fields). Not introduced by this change.
|
|
|
|
## Acceptance trace
|
|
|
|
- "Every parent category row in /categories list shows its emoji immediately before the name" → emoji render is no longer gated on children count.
|
|
- "Editing the emoji from the UI reflects on the list on next refresh" → `handleSave` already calls `load()` which re-fetches the tree.
|
|
- "Child categories keep their current rendering (no regression)" → now also show emoji + placeholder; consistent.
|
|
- "Categories without an emoji show a neutral placeholder (e.g. greyed hash) instead of an empty space" → grey `·`.
|
|
- "Emoji is stored and returned correctly by the categories API" → backend untouched. |