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

Comment Date: Add spacing support #43656

Merged

Conversation

ndiego
Copy link
Member

@ndiego ndiego commented Aug 26, 2022

Related:

What?

Add padding and margin support to the Comment Date block.

Why?

To create consistency across blocks.

How?

Added the relevant block supports in block.json

Note that box-sizing: border-box was not applied to this block like in other implementations. Since the Comment Date block is always contained within the Comments Template, box-sizing: border-box did not seem to be needed in my testing.

Testing Instructions

  1. Insert a new Comments Date block.
  2. Confirm the Dimension control panel allows you to add both padding and margin.
  3. Adding padding and margin.

Screenshots or screencast

comment-date-spacing

The visualizers in the Site Editor are a little wonky, but not related to this PR.

@ndiego ndiego added [Type] Enhancement A suggestion for improvement. [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Block] Comment Date Affects the Comment Date Block labels Aug 26, 2022
@ndiego ndiego self-assigned this Aug 26, 2022
@andrewserong
Copy link
Contributor

Thanks for the ping @ndiego! I'm travelling at the moment, but should be able to take a look through these PRs sometime next week / over the next few days if no-one beats me to it. What do you think about adding in a stylesheet and box-sizing: border-box rule for these ones, too? In principle, I suspect any block that has a wp-block-$name classname attached to its wrapper element, and that wrapper element is a div (or block-level element, which is probably all of them), then it'll likely need the rule to be added (and a corresponding stylesheet if one does not already exist).

Thanks so much again for helping get all these opt-in PRs up!!

Copy link
Contributor

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

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

This LGTM, too!

Note that box-sizing: border-box was not applied to this block like in other implementations. Since the Comment Date block is always contained within the Comments Template, box-sizing: border-box did not seem to be needed in my testing.

Apologies for going quickly earlier and not reading this comment! Yes, this appears to work nicely without needing to add the border-box rule 👍

image

I'll merge this in and update the tracking issue.

@andrewserong andrewserong merged commit 12760b1 into WordPress:trunk Sep 1, 2022
@github-actions github-actions bot added this to the Gutenberg 14.1 milestone Sep 1, 2022
@femkreations femkreations added the Needs User Documentation Needs new user documentation label Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Comment Date Affects the Comment Date Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Needs User Documentation Needs new user documentation [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants