Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: add examples in block.json #7754

Draft
wants to merge 2 commits into
base: epic/campaigns
Choose a base branch
from

Conversation

JoshuaHungDinh
Copy link
Contributor

@JoshuaHungDinh JoshuaHungDinh commented Feb 21, 2025

Resolves: [GIVE-2256

Description

This PR adds the example object to our blocks registered with block.json. This will allow a small preview to be generated while selecting the block from the left sidebar

https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/#example-optional

Affects

  • Campaign Blocks

Visuals

Example.previews.mov

Testing Instructions

  • create a campaign and select edit campaign page.
  • select the + symbol to open the left sidebar.
  • hover over each new campaign block and see if an associated "example" image is shown above its description.

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

@jonwaldstein
Copy link
Contributor

@JoshuaHungDinh I was hoping someone would update this haha thank you!!!

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