Skip to content

Conversation

@himanshupathak95
Copy link
Contributor

@himanshupathak95 himanshupathak95 commented Aug 26, 2025

What?

Closes #71354

Updates the Accordion block preview to display two example headers.

Why?

Previously, the Accordion block preview was empty, making it difficult to visualize how accordion sections would appear. This change improves clarity for users by showing a more realistic example.

How?

Defines two core/accordion-content inner blocks in the Accordion block’s example field, each with its own header.

Testing Instructions

  1. Enable experimental blocks ( Gutenberg > Experiments > enable Blocks: add experimental blocks )
  2. Open a post or page.
  3. Check the Accordion block example preview.
  4. Confirm that the block preview displays two example headers.

Screenshots

Before After
image image

@himanshupathak95 himanshupathak95 marked this pull request as ready for review August 27, 2025 08:35
@github-actions
Copy link

github-actions bot commented Aug 27, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: himanshupathak95 <[email protected]>
Co-authored-by: Soean <[email protected]>
Co-authored-by: t-hamano <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@himanshupathak95 himanshupathak95 force-pushed the fix/71354-accordion-block-preview branch from ca5da70 to 63acf80 Compare August 27, 2025 08:37
Soean
Soean previously requested changes Aug 27, 2025
Copy link
Member

@Soean Soean left a comment

Choose a reason for hiding this comment

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

Looks good, I have two minor suggestions:

  • The content should be translatable. Please wrap the content in a __( 'English text' ) function.
  • We also should use a more generic or Lorem ipsum text. We can use the other blocks as a reference.

@Soean Soean added [Type] Enhancement A suggestion for improvement. [Block] Accordion Affects the Accordion Block labels Aug 27, 2025
@himanshupathak95 himanshupathak95 force-pushed the fix/71354-accordion-block-preview branch from 233024f to 2f1cb2f Compare August 28, 2025 07:56
@himanshupathak95
Copy link
Contributor Author

  • The content should be translatable. Please wrap the content in a __( 'English text' ) function.

I completely missed this one. Thanks, @Soean, for pointing this out.

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

LGTM!

@himanshupathak95, can you rebase this PR on top of trunk before merging?

@t-hamano t-hamano dismissed Soean’s stale review September 19, 2025 03:06

Feedback has been addressed

@himanshupathak95 himanshupathak95 force-pushed the fix/71354-accordion-block-preview branch from 2f1cb2f to f9ca7fd Compare September 19, 2025 07:25
@t-hamano t-hamano merged commit 268258f into WordPress:trunk Sep 19, 2025
67 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.8 milestone Sep 19, 2025
adamsilverstein pushed a commit to adamsilverstein/gutenberg that referenced this pull request Sep 22, 2025
* Accordion: Add example block preview

* Accordion: Make example preview texts translatable and generic

Co-authored-by: himanshupathak95 <[email protected]>
Co-authored-by: Soean <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Accordion Affects the Accordion Block [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accordion Block: Add block example

3 participants