-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Tag Cloud: Add border block support #63579
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. |
…add/tagcloud-border-support
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 making a start on adding borders here @akasunil 👍
For others coming to review this PR, there is some relevant discussion on a related PR adding color supports to this block.
As this block is server-side rendered in the editor, it ends up with the block class applied to both the wrapper and inner markup. This causes issues when the block is styled via theme.json or Global Styles. Things like padding and border get applied multiple times.
Some fine-tuning is needed here before it can be moved forward.
…add/tagcloud-border-support
Flaky tests detected in 2b487fb. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10319846783
|
Skipping border style for serverSIderRender wont be enough. As seen it below screenshot, global border style still getting applied
We may have follow the solution we used for spacing here |
This is to be expected. The As you note a combination of the two approaches should smooth out the application of styles from both sources. |
It works fine now. tag-cloud-block-border-support.webm |
Size Change: +174 B (+0.01%) 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 iterating here 👍
✅ Global Styles apply correctly
✅ Block instance styles override Global Styles
✅ Styling is consistent between editor and frontend
✅ Box sizing allows parent container to enforce accurate width
LGTM 🚢
Screen.Recording.2024-08-12.at.4.25.53.PM.mp4
P.S. Maybe before merging we should update the inline comments explaining the resets in editor.scss. Along the same lines, we could also add a comment explaining the stripping of border values from the attributes passed to ServerSideRender. What do you think?
Thanks for adding the inline comments 🚀 LGTM! |
* Add border support to tag cloud block * Prevent duplicate border styles in editor * Add comments on style and edit component changes in tag cloud block Co-authored-by: akasunil <[email protected]> Co-authored-by: aaronrobertshaw <[email protected]>
What?
Add border block support to the
Tag Cloud
block.Part of #43247
Why?
Tag Cloud
block is missing border support.How?
Adds the border block support in block.json
Testing Instructions
Tag Cloud
block's border is configurable via Global StylesTag Cloud
block and Apply the border stylesScreenshots or screencast
In backend:
In frontend: