refactor(web): extract the entity list-row card (title + action + metadata) — TokenCard/CredentialCard/ImportRow #282
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab#282
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Split out of umbrella #276 (frontend component reuse, follow-up to #275).
The entity list-row pattern is hand-rolled at least three times:
TokenCard,CredentialCard, andImportRoweach render anarticle.cardwith a.card-head(a.card-titlespan, a spacer, a small danger action button with a busy label) above a.card-submetadata line, plus duplicated confirm-then-delete wiring.Extract the row shell into a shared component and migrate the known rows. The agent brief follows in a comment.
Agent Brief
Category: enhancement
Summary: Extract the entity list-row card (title + right-aligned action + metadata line) into a shared component and migrate the hand-rolled rows.
Current behavior:
Entity rows in list views are hand-rolled per entity.
TokenCard,CredentialCard, andImportRoweach render anarticlewith thecardclass containing a.card-headrow — a.card-titlespan, an always-present spacer, and a small danger button whose label swaps while busy ("Deleting…") — followed by a muted.card-submetadata line ("Created …, last used …"). The confirm-then-call-API-then-notify-parent delete wiring is duplicated across them.Desired behavior:
A shared component (name free — e.g.
ListRowCard/EntityRow) owns the row markup: title, optional metadata line, and an actions slot. The three known rows render through it with their current text, confirm prompts, and busy behavior intact. Whether busy/confirm handling stays with each caller or is offered by the component is an implementation decision. No visual change.Key interfaces:
SectionCardstylecard-title/card-subCSS hooks keep working; after migration the row markup for these entities is produced only by the componenttoken-card-style modifier) must remain attachableAcceptance criteria:
Out of scope:
<h2>— that's the head-row family under #276