admin: restyle the header nickname as a name
type-body-sm read as a property value — the grid register. type-h3,
one step under the name and muted, keeps it in the heading family.

Assisted-by: GLM-5.3 via pi
change kykyuyurnwxuqtnmnprzpotxqmyzuokz
commit 04c6e92110f5cbf2e288c07b6e07a8dcce90f22c
author Alpha Chen <alpha@kejadlen.dev>
date
parent spqqsnlt
diff --git a/lib/pro_tacts/admin/contacts_show.rb b/lib/pro_tacts/admin/contacts_show.rb
index a6c8fe0..ceb667e 100644
--- a/lib/pro_tacts/admin/contacts_show.rb
+++ b/lib/pro_tacts/admin/contacts_show.rb
@@ -31,12 +31,12 @@ module ProTacts
               div(class: "detail-header") do
                 div do
                   h1(class: "type-h2", style: "margin: 0;") { @contact.name || @contact.id }
-                  # The nickname rides under the name, muted so the formal
-                  # name stays the heading. In the header rather than the
-                  # grid: the grid is what reaches the person, the header
-                  # is who they are.
+                  # The nickname rides under the name in the heading
+                  # family — type-h3 to the name's h2 — so it reads as
+                  # a name rather than a property value; muted, so the
+                  # formal name stays the heading.
                   if @contact.nickname
-                    div(class: "type-body-sm gl-muted", style: "margin-top: var(--gl-space-2xs);") { @contact.nickname }
+                    div(class: "type-h3 gl-muted", style: "margin-top: var(--gl-space-2xs);") { @contact.nickname }
                   end
                 end
                 # Only a picture earns this slot: an initials circle
diff --git a/test/pro_tacts/admin/test_contacts_pages.rb b/test/pro_tacts/admin/test_contacts_pages.rb
index 38294ce..7b856bd 100644
--- a/test/pro_tacts/admin/test_contacts_pages.rb
+++ b/test/pro_tacts/admin/test_contacts_pages.rb
@@ -284,8 +284,9 @@ class AdminContactsPagesTest < Minitest::Test
   end
 
   # The nickname is a name-like fact, so it rides under the name in
-  # the header — muted, so the formal name stays the heading — and
-  # the grid keeps only what reaches the person.
+  # the header, in the heading family but muted — a name, visibly
+  # secondary to the formal one — and the grid keeps only what
+  # reaches the person.
   def test_show_puts_the_nickname_under_the_name_in_the_header
     red = ADA.sub("FN:Ada Lovelace", "FN:Sarah\r\nNICKNAME:Red").sub("UID:ada", "UID:red")
 
@@ -295,6 +296,7 @@ class AdminContactsPagesTest < Minitest::Test
       body = last_response.body
       header = body.split("<dl").first
       assert_includes header, "Sarah</h1>"
+      assert_includes header, 'class="type-h3 gl-muted"'
       assert_includes header, ">Red<"
       refute_includes body, '">nickname</dt>'
     end