-
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 Previous: Add Border and Spacing Support #64308
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 the PR @shail-mehta 🙇
This is looking pretty good so far.
During the recent wave of border support adoption across more blocks, a trend has developed that the border controls should be hidden by default where their application is more of a niche use case. This seems to be the case on most of the blocks that you might describe as "typographic", for example:
- Site Title
- Site Tagline
- Post Navigation Link
- Time to Read etc.
"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 | |
} | |
}, |
Following other similar blocks, it might be best to hide these controls by default.
Spacing controls are normally displayed by default so need to be explicitly hidden here.
"__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.
"__experimentalDefaultControls": { | |
"radius": true, | |
"color": true, | |
"width": true, | |
"style": true | |
} |
Applying borders to this block is more of a niche use case. It might be best to hide these controls by default.
Unlike for the spacing support, here we can simply omit the __experimentalDefaultControls
values.
@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 further on this one.
I've taken it for another spin and noticed that the default margin styles for the comments pagination override the global styles margins.
It might be worth getting some design feedback on whether it does make sense to allow margin support on these inner comment pagination blocks or if the margin here should be control via the parent Comments Pagination block.
I've added a "Needs Design Feedback" label to this PR.
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 Previous
block.Part of #43247
Why?
Comments Pagination Previous
block is missing border and Spacing support.How?
Adds the border and Spacing support in block.json.
Testing Instructions
Comments Pagination Previous
block's border and Spacing is Configurable via Global Styles.Comments Pagination Previous
block and Apply the border Styles and Spacing.Comments Pagination Previous
block styles take precedence over global Styles.Comments Pagination Previous
block borders and Spacing display correctly in both the Editor and Frontend.Screenshots or Screencast
add-border-support-in-comment-previous-text.mp4