dashboard: results say contacts, groups step below
Assisted-by: GLM-5.3 via pi
diff --git a/lib/pro_tacts/admin/dashboard.rb b/lib/pro_tacts/admin/dashboard.rb
index 7d6db31..d12597c 100644
--- a/lib/pro_tacts/admin/dashboard.rb
+++ b/lib/pro_tacts/admin/dashboard.rb
@@ -52,7 +52,7 @@ module ProTacts
div(class: "dashboard") do
section do
div(class: "section-head") do
- h2(class: "type-label") { @query.empty? ? "recently updated" : "results" }
+ h2(class: "type-label") { @query.empty? ? "recently updated" : "contacts" }
# A button, not a link: it changes the page's state
# rather than navigating, and the Popover API is what
# it invokes (see ContactDialog).
@@ -99,7 +99,7 @@ module ProTacts
# (docs/DESIGN.md, "When adding something new").
#: () -> void
def group_results
- div(class: "section-head") do
+ div(class: "section-head group-results") do
h2(class: "type-label") { "groups" }
end
ul(class: "card") do
diff --git a/public/admin.css b/public/admin.css
index 9369215..1bc4545 100644
--- a/public/admin.css
+++ b/public/admin.css
@@ -723,6 +723,18 @@ section > h2 {
align-items: baseline;
}
+/* The groups block under a search's contacts results. A
+ section-head's own step is s, heading to the list it names — this
+ one names the next block under the contacts card instead, so it
+ takes the page's block step (m, .admin-main's gap): the break
+ between the two lists reads as a block boundary, not another row
+ of the same list. Scoped to a second class because every other
+ section-head opens its section and has nothing above it to step
+ from. */
+.group-results {
+ margin-top: var(--gl-space-m);
+}
+
/* /contacts' rows, one card per first letter (ContactsIndex's
letter_groups), the letter in a narrow column at the card's left
rather than a heading over it: a heading row between every pair of
diff --git a/test/pro_tacts/admin/test_contacts_pages.rb b/test/pro_tacts/admin/test_contacts_pages.rb
index be4e9bc..967734a 100644
--- a/test/pro_tacts/admin/test_contacts_pages.rb
+++ b/test/pro_tacts/admin/test_contacts_pages.rb
@@ -376,7 +376,7 @@ class AdminContactsPagesTest < Minitest::Test
contacts_column = last_response.body.split("upcoming birthdays").first
assert_includes contacts_column, "Grace Hopper"
refute_includes contacts_column, "Ada Lovelace"
- assert_includes last_response.body, "results"
+ assert_includes last_response.body, %(<h2 class="type-label">contacts</h2>)
end
end