From 4096c3739e3e04d435eee403f0b7c0b15541e10a Mon Sep 17 00:00:00 2001 From: justin Date: Mon, 27 Apr 2026 08:15:32 -0500 Subject: [PATCH] Improve business name search results UI Results now show as proper clickable cards with: - Entity name (bold), DBA (if different from legal name) - FRN (monospace) and Filer ID on the right - Clear "click to check compliance" hint - Bordered list with dividers and hover state - Hides results after selection Co-Authored-By: Claude Opus 4.6 (1M context) --- .../pages/tools/fcc-compliance-check.astro | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/site/src/pages/tools/fcc-compliance-check.astro b/site/src/pages/tools/fcc-compliance-check.astro index 6286dc3..93463d6 100644 --- a/site/src/pages/tools/fcc-compliance-check.astro +++ b/site/src/pages/tools/fcc-compliance-check.astro @@ -222,20 +222,24 @@ import Base from "../../layouts/Base.astro"; return; } - let html = `

${items.length} result${items.length !== 1 ? "s" : ""}

`; - html += '
'; + let html = `

${items.length} result${items.length !== 1 ? "s" : ""} — click to check compliance

`; + html += '
'; for (const item of items) { - const label = [ - item.legal_name || "", - item.dba ? `DBA: ${item.dba}` : "", - item.frn ? `FRN: ${item.frn}` : "", - item.filer_id ? `Filer ID: ${item.filer_id}` : "", - ].filter(Boolean).join(" — "); - + const dba = (item.dba && item.dba !== "None" && item.dba !== item.legal_name) ? item.dba : ""; html += ``; + class="name-result-btn w-full text-left px-4 py-3 flex items-center justify-between gap-3 hover:bg-pw-50 transition cursor-pointer" + style="display:flex;" + > +
+

${item.legal_name || "Unknown"}

+ ${dba ? `

d/b/a ${dba}

` : ""} +
+
+

${item.frn || "—"}

+

ID: ${item.filer_id || "—"}

+
+ `; } html += "
"; nameResults.innerHTML = html; @@ -244,10 +248,11 @@ import Base from "../../layouts/Base.astro"; btn.addEventListener("click", () => { const frn = btn.getAttribute("data-frn"); if (!frn) { - showError("No FRN available for this entity."); + showError("No FRN available for this entity. Try entering the FRN manually."); return; } frnInput.value = frn; + nameResults.classList.add("hidden"); runCheck(); }); });