Skip to content
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

Categories List: Add border block support #63950

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

akasunil
Copy link
Member

What?

Add border block support to the Categories List block.

Part of #43247

Why?

Categories List block is missing border support.

How?

Adds the border block support in block.json

Testing Instructions

  • Go to Global Styles setting ( under appearance > editor > styles > edit styles > blocks )
  • Make sure that Categories List block's border is configurable via Global Styles
  • Verify that Global Styles are applied correctly in the editor and frontend
  • Edit template/page, Add Categories List block and Apply the border styles
  • Verify that block styles take precedence over global styles
  • Verify that block borders display correctly in both the editor and frontend

Watch attached video for more information.

Screenshots or screencast

Blog-Home-.-Template-.-gutenberg-.-Editor-.-WordPress.9.webm

@akasunil akasunil added [Type] Enhancement A suggestion for improvement. [Block] Categories Affects the Categories Block labels Jul 25, 2024
@akasunil akasunil marked this pull request as ready for review July 26, 2024 05:17
@akasunil akasunil requested a review from ajitbohra as a code owner July 26, 2024 05:17
Copy link

github-actions bot commented Jul 26, 2024

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: akasunil <[email protected]>
Co-authored-by: carolinan <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Contributor

@carolinan carolinan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have followed the testing instructions and the border is working as described.

When there is only one category in the list, the content is slightly offset because the list item has a bottom margin of 0.5rem. Then the content is not perfectly vertically centered inside the border. But I don't think that should block this PR.

@akasunil
Copy link
Member Author

Thank you @carolinan

the content is slightly offset because the list item has a bottom margin of 0.5rem. Then the content is not perfectly vertically centered inside the border.

Spent little time on this, it appears to be theme-specific. When I tested it with an empty theme, the categories list had no margin.

@akasunil akasunil merged commit 3c53a6a into trunk Jul 26, 2024
69 checks passed
@akasunil akasunil deleted the add/category-list-border-support branch July 26, 2024 11:41
@github-actions github-actions bot added this to the Gutenberg 19.0 milestone Jul 26, 2024
@fabiankaegy fabiankaegy mentioned this pull request Oct 1, 2024
97 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Categories Affects the Categories Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants