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

SpacingSizesControl: Differenciate between default and zero #69082

Closed
krokodok opened this issue Feb 6, 2025 · 1 comment
Closed

SpacingSizesControl: Differenciate between default and zero #69082

krokodok opened this issue Feb 6, 2025 · 1 comment
Labels
[Feature] Layout Layout block support, its UI controls, and style output. [Type] Enhancement A suggestion for improvement.

Comments

@krokodok
Copy link
Contributor

krokodok commented Feb 6, 2025

What problem does this address?

Right now it is not clear from the controls if the smallest value (most times "0") is set or no value at all. I often encounter this confusing scenario when working with the block editor in an existing theme when I want to unset theme spacings by explicitly selecting the 0 value in the SpacingSizesControl.

I feel this issue relates to #43082. However, since we could improve the UX for this singular Control-Element only, I think we could keep this as a separate issue.

No spacings set

Image

<!-- wp:paragraph -->
<p>Test</p>
<!-- /wp:paragraph -->

Spacings set to zero

Image

(I took the effort to take a new screenshot, which is, in fact, pointless, as it looks identical to the default state, which is the point of this issue…)

<!-- wp:paragraph {"style":{"spacing":{"padding":{"top":"0","bottom":"0","left":"0","right":"0"},"margin":{"top":"0","bottom":"0","left":"0","right":"0"}}}} -->
<p style="margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0">Test</p>
<!-- /wp:paragraph -->

What is your proposed solution?

We should try to find an easy, accessible design solution that immediately improves the editing experience. I am not too familiar with the Block Editor design guidelines, so these are just some examples I just came up with.

Image

Image

Image

@krokodok krokodok added the [Type] Enhancement A suggestion for improvement. label Feb 6, 2025
@t-hamano
Copy link
Contributor

t-hamano commented Feb 7, 2025

Closing as duplicate of #68069

@t-hamano t-hamano closed this as completed Feb 7, 2025
@t-hamano t-hamano added the [Feature] Layout Layout block support, its UI controls, and style output. label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Layout Layout block support, its UI controls, and style output. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants