Skip to content

fix: consultation-popup - Open the popup from the CTA band and section buttons (LSA-214) - #162

Merged
brandonmarshal merged 2 commits into
fix/lsa-214-popup-hero-buttonsfrom
fix/lsa-214-popup-cta-buttons
Oct 26, 2026
Merged

brandonmarshal merged 2 commits into
fix/lsa-214-popup-hero-buttonsfrom
fix/lsa-214-popup-cta-buttons

Conversation

@brandonmarshal

@brandonmarshal brandonmarshal commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Bugfix Pull Request

This repository enforces changelog, release, and label automation for all PRs and issues.
See the organisation-wide Automation Governance & Release Strategy for required rules.

Stack

Linked issues

Relates to #160 and Linear LSA-214 (improve: consultation-popup). It does not close the issue: PR 3, the inline Form 4 on /free-consultation/ and the DEV page content are still open.

Context

  • Severity/Impact: Medium. The LIVE consultation workflow changes when DEV goes live: visitors need an extra click, and every Form 4 entry records /free-consultation/ as its source page instead of the page the visitor was on.
  • Affected versions/environments: the redesigned ls-theme patterns on DEV. LIVE is not affected.

Reproduction

  • Steps: 1) Open a redesigned page on DEV that uses a CTA band, for example /services/discovery/. 2) Click the "Book a free consultation" button.
  • Expected vs Actual: on LIVE the Consultation popup opens in place. On DEV the button navigates to /free-consultation/.

Root Cause

The consultation buttons in these CTA and section patterns are plain links to /free-consultation/. The Consultation popup (Popup Maker popup 48606, Form 4) already loads on every DEV page and opens from the CSS selector .pum-triggercta, but none of these buttons carries that class. The "Send a brief first" buttons likewise do not open the Website Brief popup (selector .pum-triggerbrief).

Fix Summary

PR 2 of 3: CTA bands and sections. It adds pum-triggercta to the consultation button in 13 patterns, and pum-triggerbrief to two brief buttons, and keeps every button's existing link as the fallback.

  • CTA bands (8): cta-dark-band-buttons, section-cta-consultation-band, section-cta-consultation-inline, section-cta-consultation-reassurance, section-cta-consultation-strip, section-cta-split-checklist, split-cta-check-card, split-cta-tile-band.
  • Sections (5): blog-writing-cta, homepage-cta, phase-support-focus ("Request Assessment"), services-cta, work-discuss-project.
  • Brief buttons: the "Send a brief first" buttons in homepage-cta and work-discuss-project get pum-triggerbrief. Their /contact/ link is kept as the fallback, so their destination is unchanged.
  • Class placement: on the wp-block-button wrapper, as in the existing trigger patterns. Each wp:button block comment and its rendered class are updated together.

Scope and exclusions

  • Left as plain links: "Explore related work", "See discovery in practice", "Explore our services" and any other non-consultation links.
  • Not in this PR: the hero, header and phase CTA buttons (fix: consultation-popup - Open the Consultation popup from the hero, header and phase CTA buttons (LSA-214) #161), the popup and Gravity Forms styling (PR 3), the inline Form 4 on /free-consultation/, and updating the existing DEV page content. Pages built from these patterns keep their own copy of the old buttons until their content is updated.
  • Review size: 14 files (13 patterns plus CHANGELOG.md), 30 added and 30 removed lines in the patterns. No generated files.

Verification

  • Tests added/updated to cover the bug (no automated tests exist for these patterns)
  • Manual verification on the local site, using a test page with all 13 patterns: a consultation button opens the Consultation popup and a brief button opens the Website Brief popup, without leaving the page. The fallback was confirmed by the maintainer by breaking the popup on purpose: the button then goes to /free-consultation/. Desktop only; the buttons were spot-checked, not every one individually.
  • Negative/edge cases checked locally: with the popup blocked the button falls back to its link; tablet and mobile (checked by the maintainer). The header button is part of fix: consultation-popup - Open the Consultation popup from the hero, header and phase CTA buttons (LSA-214) #161.
  • php -l and vendor/bin/phpcs pass for the 13 patterns
  • npm run patterns:escape, npm run lint:json and npm run security:scan pass
  • Keyboard check of the popup (checked by the maintainer)
  • Screen reader check of the popup
  • CodeRabbit review (approved; all checks passing)

Risk & Rollback

  • Risk level: Low. Each change is one class name on a button, and the link stays as the fallback.
  • Rollback plan: revert the commit. The buttons go back to plain links.

Changelog

meta:needs-changelog: restores the popup behaviour from the CTA band and section buttons. The entry is in CHANGELOG.md on this branch.

Changed


Checklist (Global DoD / PR)

  • All AC met and demonstrated (see the issue; this is the second of three PRs)
  • Tests added/updated (unit/E2E as appropriate)
  • Accessibility checklist completed (where relevant):
    • Semantic HTML and heading order verified (no markup structure changed)
    • Keyboard navigation and visible focus states verified
    • ARIA used only where needed (none added)
    • Contrast and non-colour cues reviewed (no visual change intended; checked locally)
  • Docs/readme/changelog updated
  • Security checklist completed (where relevant):
    • Untrusted input validated and sanitised (no input handling changed)
    • Output escaped for its rendering context (patterns:escape clean)
    • Privileged actions enforce nonce and capability checks (none involved)
    • No secrets/sensitive data introduced
  • Code/design reviews approved
  • CI green; linked issues closed; release notes prepared (if shipping)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Consultation buttons across the site now open the Consultation popup, while retaining their existing consultation-page links as fallbacks.
    • “Send a brief first” buttons on the homepage and project discussion section now open the Website Brief popup, with existing contact-page links retained as fallbacks.

@brandonmarshal brandonmarshal added comp:block-patterns Patterns library/registration lang:php PHP code priority:normal Default priority for most issues. status:needs-review Awaiting code review meta:needs-changelog Requires a CHANGELOG.md entry before merge area:core type:bug labels Oct 26, 2026
@brandonmarshal brandonmarshal self-assigned this Oct 26, 2026
@brandonmarshal brandonmarshal added status:needs-review Awaiting code review meta:needs-changelog Requires a CHANGELOG.md entry before merge area:core type:bug labels Oct 26, 2026
@linear-code

linear-code Bot commented Oct 26, 2026

Copy link
Copy Markdown

LSA-214

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
Commits

Reviewing files that changed from the base of the PR and between d9fd026 and 669ca54.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 21d009a and d9fd026.

Files selected for processing: 14
  • CHANGELOG.md
  • patterns/cta/cta-dark-band-buttons.php
  • patterns/cta/section-cta-consultation-band.php
  • patterns/cta/section-cta-consultation-inline.php
  • patterns/cta/section-cta-consultation-reassurance.php
  • patterns/cta/section-cta-consultation-strip.php
  • patterns/cta/section-cta-split-checklist.php
  • patterns/cta/split-cta-check-card.php
  • patterns/cta/split-cta-tile-band.php
  • patterns/sections/blog-writing-cta.php
  • patterns/sections/homepage-cta.php
  • patterns/sections/phase-support-focus.php
  • patterns/sections/services-cta.php
  • patterns/sections/work-discuss-project.php

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Walkthrough

The PR adds popup-trigger classes to consultation and brief CTA buttons in CTA patterns. Their links, labels, and styles remain unchanged. The changelog records the popup behavior and fallback links.

Changes: CTA Popup Triggers

Layer / File(s) Summary
Add trigger classes to CTA patterns
patterns/cta/*, patterns/sections/*, CHANGELOG.md
CTA button block metadata and rendered wrappers gain pum-triggercta or pum-triggerbrief. Existing links and labels remain unchanged. The changelog records /free-consultation/ and /contact/ fallback links.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • lightspeedwp/ls-theme#160: The issue requests Consultation popup triggers on redesigned pages. This PR adds the trigger to CTA band and section patterns.
  • lightspeedwp/ls-theme#155: The issue covers the shared Website Brief popup trigger. This PR adds that trigger to two “Send a brief first” buttons.

Possibly related PRs

Suggested reviewers: zaredrogers

Merge Risk: Minimal · up to d9fd0

No actionable issue was found in these CTA changes. Confirm popup activation and fallback behavior on the target site during normal release checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: opening the Consultation popup from CTA band and section buttons. It also includes the relevant issue identifier.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 13 files. (1 skipped: 1 unsupported.)

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Comment @coderabbitai help to get the list of available commands.

@brandonmarshal
brandonmarshal added this pull request to stack #163 October 26, 2026 10:57
brandonmarshal added a commit that referenced this pull request Oct 26, 2026
…SA-214)

Changelog
- Add the entry for the CTA band and section popup buttons
- Note the Website Brief popup on the two "Send a brief first" buttons
- Note that each button keeps its fallback link
- Link the entry to PR #162

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
brandonmarshal and others added 2 commits October 26, 2026 14:09
…n buttons (LSA-214)

Consultation trigger
- Add the pum-triggercta class to the consultation button in 8 CTA band patterns
- Cover cta-dark-band-buttons, the five section-cta-consultation and split-checklist
  patterns, split-cta-check-card and split-cta-tile-band
- Add it to the buttons in blog-writing-cta, homepage-cta, phase-support-focus,
  services-cta and work-discuss-project

Brief trigger
- Add the pum-triggerbrief class to the "Send a brief first" buttons in
  homepage-cta and work-discuss-project
- Keep their /contact/ link as the fallback

Fallback
- Keep every button's existing link, so the button still works if the popup
  or JavaScript fails
- Put the class on the wp-block-button wrapper, as in the existing trigger patterns

Left unchanged
- Leave the "Explore related work", "See discovery in practice" and
  "Explore our services" links as plain links
- Add no new SCSS, tokens or styles
…SA-214)

Changelog
- Add the entry for the CTA band and section popup buttons
- Note the Website Brief popup on the two "Send a brief first" buttons
- Note that each button keeps its fallback link
- Link the entry to PR #162

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@brandonmarshal
brandonmarshal force-pushed the fix/lsa-214-popup-cta-buttons branch from d9fd026 to 669ca54 Compare October 26, 2026 12:09
@brandonmarshal
brandonmarshal merged commit 72a4f56 into develop Oct 26, 2026
4 checks passed
@brandonmarshal
brandonmarshal deleted the fix/lsa-214-popup-cta-buttons branch October 26, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core comp:block-patterns Patterns library/registration lang:php PHP code meta:needs-changelog Requires a CHANGELOG.md entry before merge priority:normal Default priority for most issues. status:needs-review Awaiting code review type:bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants