shadcn: migrate domain page (dnsTable to table, details to accordion, forms to input/label/checkbox)
closedTask
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
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.checkbox.templstray literalelseattr (templ mishandles} else ifin attribute position; nested-if restructure, pinned in test);new_account.jshook resolves attr-on-span or attr-on-input (null-safe).ui_test.goTestActiveCollapsesDNS updated (old<detailsassertion contradicted migration).mailboxList/formErrorstill slate/blue (fragments-owned, next); accordion Item ID “domain-dns” unique.