Skip to content

Accordion: Enable layout switching controls#78152

Draft
deepakpra wants to merge 1 commit into
WordPress:trunkfrom
deepakpra:add-accordion-layout-switching
Draft

Accordion: Enable layout switching controls#78152
deepakpra wants to merge 1 commit into
WordPress:trunkfrom
deepakpra:add-accordion-layout-switching

Conversation

@deepakpra

@deepakpra deepakpra commented May 11, 2026

Copy link
Copy Markdown

What?

Enables layout switching for the Accordion block.

Why?

The Accordion block already supports layout, but it did not expose the layout type switcher in the editor. This prevented users from using existing Flex and Grid layout controls for multi-column accordion layouts.

How?

Updates core/accordion block supports to use:

  • layout.allowSwitching
  • layout.allowSizingOnChildren

Testing Instructions

  1. Insert an Accordion block.
  2. Select the parent Accordion block.
  3. Open the Settings sidebar.
  4. Confirm the Layout panel shows the layout type switcher.
  5. Switch to Flex or Grid.
  6. Confirm Accordion Item child sizing controls are available.
Before After
image image

Use of AI Tools

@deepakpra deepakpra marked this pull request as draft May 11, 2026 10:14
@github-actions

Copy link
Copy Markdown

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: deepakpra <deepakprajapati@git.wordpress.org>

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

@github-actions github-actions Bot added [Package] Block library /packages/block-library First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository labels May 11, 2026
@github-actions

Copy link
Copy Markdown

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @deepakpra! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Accordion Affects the Accordion Block labels May 11, 2026
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 First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants