-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Comment Pagination Next: Add Border and Spacing Support #64310
base: trunk
Are you sure you want to change the base?
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 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. |
Size Change: +3 kB (+0.17%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this PR together along with #64308 @shail-mehta 👍
As noted over on #64308, I think we might need to make the new block support controls optional so they don't display by default.
I've left a couple of suggested tweaks below.
"spacing": { | ||
"margin": true, | ||
"padding": true | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"spacing": { | |
"margin": true, | |
"padding": true | |
}, | |
"spacing": { | |
"margin": true, | |
"padding": true, | |
"__experimentalDefaultControls": { | |
"margin": false, | |
"padding": false | |
} | |
}, |
Spacing controls show by default but their application here is a bit of a niche use case. To make them hidden by default, they need to be explicitly opted out of.
"style": true, | ||
"__experimentalDefaultControls": { | ||
"radius": true, | ||
"color": true, | ||
"width": true, | ||
"style": true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"style": true, | |
"__experimentalDefaultControls": { | |
"radius": true, | |
"color": true, | |
"width": true, | |
"style": true | |
} | |
"style": true |
To make the border controls optional (hidden by default) we can just omit this default controls config.
@aaronrobertshaw Thank you for your feedback. I have addressed the suggested changes in the latest commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for iterating here @shail-mehta 👍
While testing the latest changes, I noticed the default margins on the block override those applied via Global Styles. This is the same issue noted in my review of the Comment Pagination Previous PR.
My hunch is we might need to lower the specificity of those default styles to 0-1-0
and make sure that they still work as expected, including with custom layouts applied to the parent Comments Pagination block.
This is what I was seeing while testing:
Screen.Recording.2024-08-09.at.2.54.20.PM.mp4
P.S. As the scope of this PR has expanded to spacing supports, can you update the PR title, description, and test instructions to match? This will help others who may come to the PR in the future seeking context.
I have updated PR Title, description and Instructions in this PR. |
What?
Add Border and Spacing support to the
Comments Pagination Next
block.Part of #43247
Why?
Comments Pagination Next
block is missing border and Spacing support.How?
Adds the Border and Spacing support in block.json.
Testing Instructions
Comments Pagination Next
block's border and Spacing is Configurable via Global Styles.Comments Pagination Next
block and Apply the border Styles and Spacing.Comments Pagination Next
block styles take precedence over global Styles.Comments Pagination Next
block borders and Spacing display correctly in both the Editor and Frontend.Screenshots or Screencast
add-border-support-in-comment-next.mp4