Skip to content

WD-33531: Dev update cta section to support blocks like newer patterns#5769

Merged
immortalcodes merged 5 commits intomainfrom
WD-33531-dev-update-cta-section-to-support-blocks-like-newer-patterns
Mar 13, 2026
Merged

WD-33531: Dev update cta section to support blocks like newer patterns#5769
immortalcodes merged 5 commits intomainfrom
WD-33531-dev-update-cta-section-to-support-blocks-like-newer-patterns

Conversation

@immortalcodes
Copy link
Member

@immortalcodes immortalcodes commented Mar 5, 2026

Done

  • Update CTA-section pattern to use blocks

Fixes https://warthogs.atlassian.net/browse/WD-33531

QA

Check if PR is ready for release

If this PR contains Vanilla SCSS or macro code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 🎁, Breaking Change 💣, Bug 🐛, Documentation 📝, Maintenance 🔨.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention
    • if existing APIs (CSS classes & macro APIs) are not changed it can be a bugfix release (x.x.X)
    • if existing APIs (CSS classes & macro APIs) are changed/added/removed it should be a minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) or macros should be listed on the what's new page.

Screenshots

[if relevant, include a screenshot or screen capture]

Copilot AI review requested due to automatic review settings March 5, 2026 12:27
@webteam-app
Copy link

@immortalcodes immortalcodes added Review: QA needed Review: Code needed Feature 🎁 New feature or request Review: Percy needed This PR needs a review of Percy for visual regressions labels Mar 5, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the CTA section pattern in Vanilla Framework docs/examples and the vf_cta_section Jinja macro to support a new blocks API (as a successor to the existing slot-based API), aligning CTA section with newer block-based patterns.

Changes:

  • Add blocks support to vf_cta_section, reusing shared vf_description_block and vf_cta_block helpers.
  • Update CTA section documentation to describe available block types and deprecate slots.
  • Migrate CTA section examples to use the new blocks API; bump release notes and package version.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
templates/docs/patterns/cta-section/index.md Documents new block types, adds blocks param to macro docs, marks slots as deprecated.
templates/_macros/vf_cta-section.jinja Implements blocks parsing/rendering for description + CTA content.
templates/docs/examples/patterns/cta-section/description-block.html New example demonstrating description block usage.
templates/docs/examples/patterns/cta-section/cta-block.html New example demonstrating CTA block usage.
templates/docs/examples/patterns/cta-section/default-full-width.html Migrates example from slots to blocks (HTML CTA).
templates/docs/examples/patterns/cta-section/default-full-width-links-within-text.html Migrates example from slots to blocks (HTML CTA with inline links).
templates/docs/examples/patterns/cta-section/default-25-75.html Migrates example from slots to blocks (HTML CTA).
templates/docs/examples/patterns/cta-section/default-25-75-links-within-text.html Migrates example from slots to blocks (HTML CTA with inline links).
templates/docs/examples/patterns/cta-section/block-full-width.html Migrates block-variant example from slots to blocks (structured CTA).
templates/docs/examples/patterns/cta-section/block-25-75.html Migrates block-variant example from slots to blocks (structured CTA).
releases.yml Adds 4.46.0 entry noting blocks as successor to slots.
package.json Bumps version to 4.46.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@samhotep samhotep left a comment

Choose a reason for hiding this comment

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

LGTM, though some checks are failing

@immortalcodes immortalcodes merged commit 398afa8 into main Mar 13, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants