Skip to content

Fix: Spotlight BugHerd batch fixes (tickets #7–#17) - #22

Merged
josearmandoabreu merged 11 commits into
developfrom
fix/bugherd-batch-fixes
Sep 16, 2026
Merged

josearmandoabreu merged 11 commits into
developfrom
fix/bugherd-batch-fixes

Conversation

@josearmandoabreu

@josearmandoabreu josearmandoabreu commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Fixes 11 style/content/behavior issues reported via BugHerd on the Spotlight project (spotlightnsp.lightspeedwp.dev), covering the header, the search experience, category archive listings, sitewide horizontal spacing consistency, the homepage dashboard promo, hero story selection, footer navigation, the Contact Us page, and page-hero heading weight — plus an additional search-results-page redesign requested mid-batch. Two tickets (#9, #11) were also resolved but live entirely in page/template content in the database, not in this repo — see Deployment Notes for manual staging replication.

Changes

Files Modified

Templates: templates/archive.html, front-page.html, home.html, index.html, page.html, page-full-width.html, single.html, 404.html, search.html
New templates: templates/page-contact-us.html
Patterns: patterns/archive-listing-header.php, archive-listing-header-archive.php, dashboard-promo.php, hero-lead-story.php, page-intro-banner.php, project-entry.php, related-coverage.php, story-card.php, story-card-editorial.php
New patterns: patterns/page-intro-banner-contact-us.php
Template parts: parts/header.html, parts/footer.html
Assets: assets/css/archive-listing-header.css
New assets: assets/css/header-search.css
PHP: functions.php (new stylesheet enqueue)

Key Improvements

  • ✅ Every fix reuses existing tokens/components (spacing scale, story-card-editorial, the search pill styling) instead of introducing new one-off values
  • ✅ The sitewide alignment fix (Build related-coverage, article-header, and onward-journey patterns (LS-1722) #12) was caught and fixed everywhere in one pass instead of one-page-at-a-time, after finding the same bug repeated across every template
  • ✅ Verified with pixel-level measurement (getBoundingClientRect/getComputedStyle in Playwright), not just visual review, for the alignment and spacing fixes
  • ✅ Contact Us's subtitle is scoped to that page only — confirmed via screenshot that no other page on the shared page.html template picked it up
  • ✅ Found and documented 3 separate cases where a DB-customized template/page had "detached" a pattern (a frozen copy instead of a live reference), which would have silently made a correct file fix look like it didn't work

Related Issues

BugHerd project: Spotlight (https://www.bugherd.com/projects/540664/)
Closes: #7, #8, #9, #10, #11, #12, #13, #14, #15, #16, #17
(Ticket links: https://www.bugherd.com/projects/540664/tasks/<number>)

Testing

  • npm run lint, npm run schema:validate, npm run theme:validate, npm run patterns:escape, npm run security:scan — pass
  • composer run lint:php, composer run phpcs — pass (4 pre-existing warnings in functions.php, unrelated to this batch)
  • Verified every fix visually and functionally on spotlight.local via Playwright, including responsive checks (mobile/tablet/desktop) for the header search and sitewide alignment fixes
  • Verified in the Site Editor that no touched template/pattern shows a block-validation error

Deployment Notes

⚠️ The following are DB-only or detached-copy fixes that this PR does NOT carry — they must be repeated by hand on staging/production after this deploys:

  1. Build lead-story hero, archive listing header, and page intro banner patterns (LS-1719) #9 + Build province, project, and dashboard-entry patterns (LS-1723) #13 — on the /dashboards/ page's content: remove the redundant padding wrapper around dashboard-promo, and tighten blockGap on its 4 stat pairs.
  2. Build trust-bar, newsletter-signup, and republish-notice patterns (LS-1721) #11 — on hiv-dashboard/tb-dashboard pages: set Template to "Full Width Page," remove align:full from the content wrapper, add spacing--60 top/bottom padding.
  3. Fix newsletter popup styles for Gravity Forms 3.x and non-portable theme ID #17 — if staging's page-full-width template is also DB-customized: its inlined page-intro-banner copy needs the same fontWeight fix as the pattern file (check source via the templates REST endpoint first — may not apply if staging's copy isn't customized).
  4. Add interactive provincial-map pattern and full styling-fidelity pass (LS-2616) #14 — mark the intended homepage-hero post as Sticky (Status & visibility → Sticky).

No other breaking changes — this PR is theme templates/patterns/CSS only, no build step required.

Checklist

josearmandoabreu and others added 10 commits September 16, 2026 10:31
Add blockGap: spacing--10 to the newsletter and republish-stories
icon+text groups in the header, which previously fell back to the
larger global default blockGap.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The collapsed search input (core/search, isSearchFieldHidden) had no
styling of its own and stayed in normal flex flow, so opening it pushed
the "Dashboards" button around and broke onto two lines.

Adds a header-search.css component styled after ati-theme-2026's
is-style-header-search: the input opens out of flow via position, sized
per breakpoint. Above 1000px it slides out to the left of the icon,
tiered narrower at each step to stay clear of the site logo as the
available gap shrinks. At 1000px and below that gap is too tight for a
usable inline input, so it instead drops open as a full-width bar below
the whole header (utility row + logo + nav), anchored to .site-header
so it clears both.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Bump the "is-style-card-links" category badge (e.g. "HIV/AIDS") from
fontSize 100 to 200 everywhere it appears on story cards, matching the
size already used on the single-post article header. Requested by
Zared despite Figma showing 100, for legibility.

Applied consistently across all 8 occurrences so the badge doesn't
render at two different sizes depending on which listing it's in:
story-card-editorial, story-card, and project-entry patterns, plus
the archive, home, and front-page templates (which embed the same
markup directly rather than via wp:pattern).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…#12)

Sections that are already align:"wide" (auto-centered to theme.json's
1320px wideSize) also had their own manual left/right padding on top
of that centering. Below 1320px that padding was necessary — align:wide
alone provides no edge protection until the width cap engages — but
above 1320px it stacked on top of the centering and pushed content
further in than sibling sections without that extra padding (e.g. the
header, or the archive hero, which happened to look right only because
of WordPress core's unrelated `.wp-block-group.has-background` default
padding fallback).

Standardizes on the one pattern that's actually safe at every width
(already used by parts/header.html): real spacing--20 padding on the
outer, unconstrained container (now each template's <main>), with the
align:"wide" sections inside it relying purely on the width cap for
centering, no padding of their own. Full-bleed background sections
(archive-listing-header, archive-listing-header-archive) get explicit
spacing--20 padding instead of relying on the has-background accident.
dashboard-promo.php already did this correctly; trust-bar.html is
intentionally left out of scope, it matches Figma and has no reported
issue.

page-full-width had a DB "custom" override (from an earlier Site Editor
save) patched separately via REST so the fix actually renders.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The group wrapping each stat's number + label (e.g. "6.1m" / "On
Antiretroviral Treatment") had no blockGap of its own, so it inherited
the theme's global default (spacing--30) — too loose for a tightly
related number/caption pair. Sets blockGap: spacing--5 explicitly on
all 4 occurrences (HIV and TB cards, 2 stats each).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The homepage hero query picked the newest post by date automatically,
with no editorial control over what's featured. Adds "sticky":"only"
so it instead pulls the post(s) editors explicitly pin via WordPress's
native "Stick to the top of the blog" option, keeping order:desc/
orderBy:date as the tie-breaker if more than one post is stuck.

Verified the filter is genuine (not coincidentally showing the newest
post already) by temporarily sticking an older post and confirming
the hero switched to it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Footer nav links ("Latest News", "Data Desk", "Republish", "Contact
us") matched the header's main nav styling (fontWeight 500, fontSize
300/Small). Ticket asked for a thinner weight (400) and smaller size
(200/Base) to differentiate them from the main navigation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Figma (node 234:6734) shows a subtitle under the "Contact us" H1 that
was missing on the live page. page-intro-banner.php itself deliberately
has no subtitle (per Zared's 2026-09-04 "no intro copy under the title"
note) and is shared by every page on the default page.html template, so
the fix couldn't touch that file without reintroducing copy on pages
that don't want it — confirmed core/post-excerpt wouldn't help either,
since get_the_excerpt() falls back to an auto-trimmed content snippet
rather than rendering nothing when a page has no manual excerpt.

Adds a Contact-us-only variant instead:
- patterns/page-intro-banner-contact-us.php: near-identical copy of
  page-intro-banner.php with the subtitle paragraph added (fontSize
  400/neutral-300, matching Figma exactly). Inserter:false, same
  precedent as spotlight-badge.php, so it can't be accidentally
  inserted into an unrelated page.
- templates/page-contact-us.html: picked up automatically by
  WordPress's page-{slug}.html template hierarchy for the "contact-us"
  page (verified against wp-includes/template.php's own hierarchy
  order) — no manual template assignment needed, and no other page is
  affected since they still resolve to the generic page.html.

Spacing needed no changes — blockGap:30 between title/subtitle and the
banner's padding-bottom:100 already matched Figma's measured gaps
exactly (verified via getBoundingClientRect in the browser).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
templates/search.html rendered raw, unstyled core blocks (default blue
links, no images, no card treatment, huge unstyled gaps between
results) instead of reusing any of the theme's actual design. Rebuilds
it out of components already proven elsewhere:
- Header row: same styled search pill (border-radius--500, icon,
  button-inside) as archive-listing-header's, plus a properly sized/
  colored query-title.
- Results: same story-card-editorial markup used on archive.html
  (featured image, category badge, title, excerpt, author/date row).
- Pagination: same post-listing-pagination pill style as archive.html.
- No-results state: centered, readable copy instead of a bare
  paragraph.

Extends archive-listing-header.css's search selectors to also match
.post-listing-header instead of duplicating the CSS, and adds a
max-width:100% safeguard — wp:search's "width" attribute is a fixed px
value with no responsive fallback, which overflowed narrow viewports
before this (affects both search.html and archive-listing-header's own
search box).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The H1 in every page-intro-banner/archive-listing-header variant had
no explicit fontWeight, so it rendered at the browser's UA-stylesheet
bold default (700) on Libre Baskerville's 400-700 variable range —
heavier than intended. Adds fontWeight: var(--wp--custom--font-weight
--semi-bold) (the theme's own 600 token, not a bare number) to:
- patterns/page-intro-banner.php (all default pages)
- patterns/page-intro-banner-contact-us.php (Contact Us variant, #16)
- patterns/archive-listing-header-archive.php (category/tag archives)
- patterns/archive-listing-header.php (home.html's "Latest" header)

Scope grew from the ticket's single Contact Us pin to every page-hero
H1 after confirming with Jose, since they all shared the same
unstyled-weight gap.

Also fixed a DB-only issue this surfaced: templates/page-full-width.html
has a DB override whose saved content had page-intro-banner fully
detached (inlined raw blocks instead of a live wp:pattern reference),
so the pattern-file fix alone didn't reach /dashboards/, /hiv-dashboard/,
or /tb-dashboard/ — patched separately via REST, no git change needed
for that part.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Adopts the review-behavior and tooling additions from ls-theme's
CodeRabbit config that make sense for this repo too: assertive review
profile, incremental re-review on push, request_changes_workflow,
walkthrough/linked-issue presentation options, path_filters, finishing
touches (autofix/docstrings/unit tests), eslint/markdownlint/gitleaks/
trufflehog tooling, and a knowledge_base pointing at AGENTS.md with
auto-learning enabled.

Also extends auto_review.base_branches to feature/.* and fix/.* so
CodeRabbit reviews PRs opened against those branches too, not just
main/develop.

Keeps this repo's own Spotlight-specific path_instructions and
review_checklist wording (client theme, not a starter template) and
its recursive path globs (patterns/**/*.php, templates/**/*.html,
parts/**/*.html), which are already more thorough than ls-theme's
single-level globs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@josearmandoabreu
josearmandoabreu merged commit 975407f into develop Sep 16, 2026
2 of 3 checks passed
@josearmandoabreu
josearmandoabreu deleted the fix/bugherd-batch-fixes branch September 16, 2026 19:45
@josearmandoabreu josearmandoabreu mentioned this pull request Sep 16, 2026
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants