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

Table: add spacing block supports #43370

Merged
merged 1 commit into from
Aug 19, 2022
Merged

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Aug 18, 2022

Related:

What?

Enabling spacing support for the table block

Why?

To create consistency across blocks.

How?

Adding the relevant block supports in block.json

Testing Instructions

  1. Load the block editor with a table block. Add some content or use the example block code below.
  2. Confirm that the dimensions control panel is there
  3. Add margin and padding.
  4. Save and confirm the styles appear on the frontend.
  5. Test the new support works for the block via theme.json and global styles. See example JSON below.
Example block code
<!-- wp:table -->
<figure class="wp-block-table"><table><tbody><tr><td>Boots</td><td>Shoes</td></tr><tr><td>1</td><td>2</td></tr></tbody></table></figure>
<!-- /wp:table -->
	"styles": {
		"blocks": {
			"core/table": {
				"spacing": {
					"padding": "122px",
					"margin": "22px"
				}
			}
		}
	}

Screen Shot 2022-08-18 at 8 31 05 pm

@ramonjd ramonjd added [Type] Enhancement A suggestion for improvement. [Block] Table Affects the Table Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Aug 18, 2022
@ramonjd ramonjd self-assigned this Aug 18, 2022
@apeatling apeatling self-requested a review August 18, 2022 17:36
Copy link
Contributor

@apeatling apeatling left a comment

Choose a reason for hiding this comment

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

✅ Confirm that the dimensions control panel is there
✅ Add margin and padding.
✅ Save and confirm the styles appear on the frontend.
✅ Test the new support works for the block via theme.json and global styles. See example JSON below.

@ramonjd ramonjd merged commit 05d7e8d into trunk Aug 19, 2022
@ramonjd ramonjd deleted the add/table-add-spacing-block-supports branch August 19, 2022 00:45
@github-actions github-actions bot added this to the Gutenberg 14.0 milestone Aug 19, 2022
@femkreations femkreations added the Needs User Documentation Needs new user documentation label Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Table Affects the Table 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.
3 participants