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

Tracking: Dimensions Design Tools Consistency #43243

Open
aaronrobertshaw opened this issue Aug 16, 2022 · 15 comments
Open

Tracking: Dimensions Design Tools Consistency #43243

aaronrobertshaw opened this issue Aug 16, 2022 · 15 comments
Assignees
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.

Comments

@aaronrobertshaw
Copy link
Contributor

aaronrobertshaw commented Aug 16, 2022

Overview

This issue details the current state of dimensions and spacing block support or design tool adoption across all blocks and tasks required to fill any gaps. Overall design tool consistency efforts are being tracked via the parent issue: #43241.

Guidelines for Adopting Spacing Supports

  • We're generally happy to have padding & margin support for all blocks. (Exceptions possible)
  • We're leaning towards simple opt-in for margin support i.e. true rather than ["top", "bottom"]
  • Neither padding nor margin should be shown by default i.e. they're accessed via the ellipsis menu. (Exceptions possible)
  • All blocks (except special cases like Heading & Paragraph) should have box-sizing: border-box. This will be reviewed on a case-by-case basis. (Exceptions likely).

Legend

Value Description
Feature has been adopted and is displayed as a default control
✅ (Optional) Feature has been adopted but is an optional control
There is a bug or issue with this block support feature's adoption
Feature has been explicitly opted out of
<PR#> Links to PR adopting the feature for this block
- Feature has not explicitly been adopted/omitted
🛠 Implemented via an ad hoc / bespoke control
🚧 Work is in progress towards adopting this feature (no PR yet)

Block Support Adoption

Note: Deprecated blocks have been omitted from this table. e.g. Comment Author Avatar, Post Comment & Text Columns.

Block Padding Margin Block Gap Height Width Min Height Aspect Ratio
Archives ✅ (Optional) ✅ (Optional) - - - - -
Audio ✅ (Optional) ✅ (Optional) - - - - -
Avatar ✅ (Optional) ✅ (Optional) - 🛠 🛠 - -
Button ✅ (Horizontal, Vertical) - - - 🛠 - -
Buttons ✅ (Top, Bottom) - - - -
Calendar #43654 (Optional) #43654 (Optional) - - - - -
Categories ✅ (Optional) ✅ (Optional) - - - - -
Code ✅ (Optional) ✅ (Optional / Top, Bottom) - - - - -
Column - - 🛠 - -
Columns ✅ (Top, Bottom) ✅ (Horizontal, Vertical) - - - -
Comment Author Name - - - - -
Comment Content ✅ (Horizontal, Vertical) - - - - - -
Comment Date - - - -
Comment Edit Link - - - - -
Comment Reply Link - - - - -
Comment Template - - - - -
Comments - - - - -
Comments Pagination #43905 #43905 - - - - -
Comments Pagination Next #43905 #43905 - - - - -
Comments Pagination Numbers #43905 #43905 - - - - -
Comments Pagination Previous #43905 #43905 - - - - -
Comments Title - - - - -
Cover ✅ (Top, Bottom) - - 🛠
Details ✅ (Optional) ✅ (Optional) - - - -
Embed - - - - - -
File - - - - -
Footnotes ✅ (Optional) ✅ (Optional) - - - - -
Gallery ✅ (Optional) ✅ (Optional) ✅(Horizontal, Vertical) 🛠 🛠 - -
Group ✅ (Top, Bottom) - - -
Heading ✅ (Optional) ✅ (Optional) - - - - -
Home Link - Navigation - - - - - - -
HTML - - - - - - -
Image - - 🛠 🛠 - 🛠
Latest Comments - - - - -
Latest Posts - - - - -
List ✅ (Optional) ✅ (Optional) - - - - -
List Item ✅ (Optional) ✅ (Optional) - - - - -
Login/logout ✅ (Optional) ✅ (Optional) - - - - -
Media & Text - - - - -
More (Read More) - - - - - - -
Navigation - - - - - -
Navigation Link - - - - - - -
Navigation Submenu - - - - - - -
Next Page (Page Break) - - - - - - -
Page List - - - - - - -
Paragraph ✅ (Optional) ✅ (Optional) - - - - -
Post Author - 🛠 🛠 - -
Post Author Biography - - - - -
Post Author Name - - - - -
Post Comments Count - - - - -
Post Comments Form - - - - -
Post Comments Link - - - - -
Post Content ✅ (Optional) - - - -
Post Date - - - - -
Post Excerpt - - - - -
Post Featured Image - 🛠 🛠 - 🛠
Post Navigation Link - - - - - - -
Post Template - - - - - -
Post Terms - - - - -
Post Title - - - - -
Preformatted - - - - -
Pullquote - - - ✅ (Optional) -
Query 🚫 🚫 🚫 🚫 🚫 🚫 -
Query No Results - - - - - - -
Query Pagination - - - - - - -
Query Pagination Next - - - - - - -
Query Pagination Numbers - - - - - - -
Query Pagination Previous - - - - - - -
Query Title - - - - -
Quote - - ✅ (Optional) -
Read More ✅ (Top, Bottom) - - - - -
RSS - - - - - - -
Search - - - 🛠 - -
Separator - ✅ (Top, Bottom) - - - - -
Shortcode 🚫 🚫 🚫 🚫 🚫 🚫 🚫
Site Logo ✅ (Optional) ✅ (Optional) - - - - -
Site Tagline ✅ (Optional) ✅ (Optional) - - - - -
Site Title ✅ (Optional) ✅ (Optional) - - - - -
Social Link #63782 #63782 - - - - -
Social Links ✅ (Optional) ✅ (Horizontal, Vertical) - - - -
Spacer ✅ (Top, Bottom) - 🛠 🛠 - -
Table ✅ (Optional) ✅ (Optional) - - - - -
Table of Contents - - - - -
Tag Cloud - - - - -
Term Description - - - - -
Time To Read ✅ (Optional) ✅ (Optional) - - - - -
Verse ✅ (Optional) ✅ (Optional) - - - ✅ (Optional) -
Video ✅ (Optional) ✅ (Optional) - - - - -

Known Issues

Merged PRs

The following list details all the PRs merged as part of this effort to increase spacing support.

PRs with pending questions, discussions, or concerns

Possible Follow-Ups

@aaronrobertshaw aaronrobertshaw added [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Aug 16, 2022
@aaronrobertshaw aaronrobertshaw self-assigned this Aug 16, 2022
@t-hamano
Copy link
Contributor

t-hamano commented Sep 1, 2022

It does mean that instead of a single one-size-fits-all approach, we'll need to assess the impact on a case-by-case basis for each block that uses ServerSideRender, since as you mention, some blocks might use margins and paddings in unique ways.

Yes, that makes sense. Let's deal with them individually, along with blocks that have already been merged with block support.

Another thing to discuss is how to handle the issue of additional class(es) being rendered as duplicates, as @ndiego submitted in #43653.

I think we have three options:

  1. Apply only to the wrapper div.
  2. Apply only to server-side rendered elements.
  3. Both. In other words, we don't care duplicate additional classes.

The second plan would be appropriate if we want to respect the match with the front end side. However, since the core class of blocks (wp-block-XXX) is already duplicated, we believe a third plan is also possible.

If these directions are solidified, I think it might be a good idea to first proceed with the review of #43653 👍

@aaronrobertshaw
Copy link
Contributor Author

An overall update on progress towards design tools consistency has been added to the primary tracking issue, including our goals for WordPress 6.1.

@carolinan
Copy link
Contributor

I suggest not adding spacing to the more block which uses the <!--more--> tag and does not use any block props on the front.

@andrewserong
Copy link
Contributor

Small update: as of #45300 there is now a Min Height dimensions block support that we can opt into. That PR has opted in both the Group and Post Content blocks, and I've updated the table in the issue description. @jasmussen flagged on the PR (here: #45300 (comment)) that when we use the Min Height block support, it usually shouldn't be a default control (that is, it should be optional and only exposed via the drop-down menu). There is also a follow-up tracking issue in #45501 to look at tweaks and enhancements for the UI of the Min Height controls.

@t-hamano
Copy link
Contributor

I have updated the table cell because I found #43243 which adds margins to the Embed block.

@annezazu
Copy link
Contributor

Noting this heavily requested negative margins feature request as potentially that could be addressed as part of this wider work: #32644

@aaronrobertshaw
Copy link
Contributor Author

Thanks for flagging that issue @annezazu 👍

It is something that has been explored previously (#40464), however, there were a few blockers at the time, and more recently, there was an issue with layout support styles overriding the margin block support styles. That last issue was a blocker to adopting the design tools here as well.

Supporting negative margins will likely require some design work to ensure we come up with a nice UX. So while I'm 100% on board with us supporting negative margins in the near future. I think it might be better to keep it separate to the efforts adopting dimensions and spacing design tools as they have a knack for hitting enough roadblocks as is 🙂

@andrewserong's comment on the negative margin feature request issue goes into more detail on what we need to address and provides extra context.

@t-hamano
Copy link
Contributor

Update: I have added the Footnotes and Details blocks to the list.

@t-hamano
Copy link
Contributor

t-hamano commented Jul 28, 2024

Update: I have updated the table with the latest specs.

At the same time, I also added the minHeight and units support column. We need to also consider whether we can add this support, except for blocks that already have it and blocks that clearly do not need it.

Something I noticed while working on this is that even if I don't explicitly define support in __experimentalDefaultControls, the control will be displayed by default.

For example, the following definition shows the padding, margin, block gap and min-height controls by default:

{
	"supports": {
		"dimensions": {
			"minHeight": true
		},
		"spacing": {
			"margin": true,
			"padding": true,
			"blockGap": true
		}
	}
}

This behavior is different from the Typography support. I don't know if this is an original specification or some kind of bug 🤔

@aaronrobertshaw
Copy link
Contributor Author

aaronrobertshaw commented Jul 29, 2024

Thanks again @t-hamano for all the effort in keeping these issues up-to-date.

I don't think the units support is intended for wide-spread adoption, or at least might be best dealt with separately to these efforts. Maybe remove it? What do you think?

This behavior is different from the Typography support. I don't know if this is an original specification or some kind of bug

These block supports pre-existed the ability to define which controls display by default. I believe the current behaviour is for backwards compatibility. Perhaps creating an issue to address and discuss this further would be a good idea?

P.S. Can you update the merged PRs list with any links for the blocks you updated?

@t-hamano
Copy link
Contributor

I don't think the units support is intended for wide-spread adoption, or at least might be best dealt with separately to these efforts. Maybe remove it? What do you think?

I also have no strong opinion on adding units support to this PR, so Il remove the units column.

These block supports pre-existed the ability to define which controls display by default. I believe the current behaviour is for backwards compatibility. Perhaps creating an issue to address and discuss this further would be a good idea?

Yes, maybe it can be addressed after this issue is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Projects
None yet
Development

No branches or pull requests

5 participants