Repository navigation
Comments Block: Add blockGap, layout support, and default padding controls - #79477
dhruvikpatel18 wants to merge 1 commit into
Conversation
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @EldarAgalarov. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
🤖 PR meta 🤖🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe Comments block adds padding and block-gap controls, layout support for sizing child blocks, and editor wiring for layout. A new v2 deprecated definition saves inner blocks unless its legacy attribute is true. ChangesComments block support
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Feature Merge Risk: ⚪ Minimal · up to The change adds Comments layout and spacing controls while retaining legacy serialization support. No actionable merge-blocking risk is established; merge after normal checks pass. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change reuses existing editor and save mechanisms and retains a compatibility path for older Comments blocks. No new privilege or content-access path was identified, but frontend handling of persisted attributes and interrupted save recovery were not fully verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 2⚔️ Resolve merge conflicts 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What?
Closes #71975
Adds
blockGap,layout(inner blocks use content width), and default padding controls to thecore/commentsblock, bringing it to parity withcore/groupas a layout container.Why?
The
core/commentsblock is a container that holds several comment-related inner blocks, but unlikecore/groupit was missing:blockGapsupport, no way to control spacing between inner blockslayoutsupport, no "Inner blocks use content width" optionpadding, padding existed as a support but wasn't enabled by default in the sidebarThis made
core/commentsa second-class container compared tocore/group, limiting layout flexibility for theme authors and site editors.Testing Instructions
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
Summary by CodeRabbit