Skip to content

Comments Block: Add blockGap, layout support, and default padding controls#79477

Draft
dhruvikpatel18 wants to merge 1 commit into
WordPress:trunkfrom
dhruvikpatel18:feat/add-comments-blockgap
Draft

Comments Block: Add blockGap, layout support, and default padding controls#79477
dhruvikpatel18 wants to merge 1 commit into
WordPress:trunkfrom
dhruvikpatel18:feat/add-comments-blockgap

Conversation

@dhruvikpatel18

@dhruvikpatel18 dhruvikpatel18 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What?

Closes #71975

Adds blockGap, layout (inner blocks use content width), and default padding controls to the core/comments block, bringing it to parity with core/group as a layout container.

Why?

The core/comments block is a container that holds several comment-related inner blocks, but unlike core/group it was missing:

  • blockGap support, no way to control spacing between inner blocks
  • layout support, no "Inner blocks use content width" option
  • Default UI controls for padding, padding existed as a support but wasn't enabled by default in the sidebar

This made core/comments a second-class container compared to core/group, limiting layout flexibility for theme authors and site editors.

Testing Instructions

  1. Open a post or page in the site editor or block editor.
  2. Insert a Comments block.
  3. Open the block inspector sidebar.

blockGap:
4. Under Dimensions, confirm a Block spacing (blockGap) control is now visible and enabled by default.
5. Adjust the value, verify the spacing between inner comment blocks updates accordingly in the editor and on the frontend.

Default padding:
6. Under Dimensions, confirm the Padding control is visible and enabled by default (no need to click the "+" to add it).
7. Set a padding value and verify it applies correctly.

Inner blocks use content width (layout):
8. Under Layout in the sidebar, confirm the "Inner blocks use content width" toggle is present.
9. Enable it, verify inner blocks respect constrained/wide/full-width sizing.

Screenshots or screencast

Screen.Recording.2026-06-24.at.2.33.56.PM.mov

@github-actions github-actions Bot added the [Package] Block library /packages/block-library label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Block library /packages/block-library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

core/comments: Missing blockGap and contentWidth options, no global padding

1 participant