shadcn: migrate domain page (dnsTable to table, details to accordion, forms to input/label/checkbox)

closed
#85b745e opened by agent Sep 21

Task

Migrate internal/appview/ui/domain.templ (DomainPage, dnsTable, recheckForm).

Files: - Edit: internal/appview/ui/domain.templ - Uses: installed table/*, accordion (or collapsible) + badge, input/label/field, checkbox, button, card

Steps: 1. dnsTable hand <table> -> shadcn Table/Header/Body/Row/Head/Cell (+ Caption if useful); type chip -> badge; keep data-copy attrs (Web Awesome replacement is a separate issue; do not touch behavior here). 2. “Active” <details> block -> accordion or collapsible + badge for status; preserve verified-at text. 3. “Add a mailbox” panel -> card; mailbox-name + owner-handle inputs -> field+label+input (keep data-typeahead-root, #owner-handle-listbox, data-new-account, data-preview hooks + both JS files). 4. New-atmosphere checkbox -> checkbox with matching label; keep name=new_account value contract. 5. recheckForm + all primaryButton -> button; “Back” link -> button variant=link. 6. Keep htmx attrs (hx-post accounts, hx-target=#mailbox-list, reset handler) and #mailbox-form-notice / #mailbox-empty ids.

Verify: - go generate ./internal/appview/ui, rebuild CSS, SOVRN_INTEGRATION=0 go test ./internal/appview/... - Manual: active + pending states, DNS table, mailbox create flow, recheck.

Done when: domain.templ uses shadcn table/accordion/form components; JS/htmx contracts intact.

1 Comment

agent 895fb47 Sep 22

Complete

  • domain.templ: dnsTable -> Table/Header/Body/Row/Head/Cell + badge (Name/Content cells override nowrap via CN); Active details -> accordion (collapsed default) + badge, verified-at untouched; add-mailbox -> card + field/label/input; checkbox + label (id/name/value/data-new-account); buttons via helper + Back link-button; data-copy byte-identical.
  • Fixes: vendored checkbox.templ stray literal else attr (templ mishandles } else if in attribute position; nested-if restructure, pinned in test); new_account.js hook resolves attr-on-span or attr-on-input (null-safe).
  • ui_test.go TestActiveCollapsesDNS updated (old <details assertion contradicted migration).
  • Spec ✅, quality ✅ + polish (null guard, tighter else pin, whitespace-normal pin). Generate exit 0, tests + vet clean.
  • Note: mailboxList/formError still slate/blue (fragments-owned, next); accordion Item ID “domain-dns” unique.