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

Suggested Improvements to Preset Slider (things like Margin/Padding) around no value and zero value #59135

Open
MadtownLems opened this issue Feb 16, 2024 · 2 comments
Labels
[Package] Block editor /packages/block-editor [Type] Enhancement A suggestion for improvement.

Comments

@MadtownLems
Copy link

What problem does this address?

There are several issues around the preset slider, for things like Margin/Padding. Some are new with 6.4, and some have existed previously but are worth taking a look at.

A lot of the issue is around the default state of the slider being positioned at the left, and explicitly dragging the slider to 0. Take a look at the following screenshot. The top/bottom has not been touched, and should use my theme's default settings. However, I explicitly dragged left/right to 0. There is zero visual indication that one of these has been set to 0 and one is the theme's default.

2024-02-16 13_19_26-Add New Post ‹ Topic Hub — WordPress

You can investigate the markup to confirm:
wp:columns {"style":{"spacing":{"padding":{"right":"0","left":"0"}}}}

You can also see that one has no value, and one has a value of 0, if you toggle away from the presets:

2024-02-16 13_21_55-Add New Post ‹ Topic Hub — WordPress

Note that, before 6.4, if something was set to 0, it would explicitly indicate that in the UI. That seems to have stopped happening in 6.4. This is very confusing to know if something has been marked 0, or untouched.

Related, and this has been the case as long as presets have existed: Might it be possible to not have the 'dot' on the slider at all, until a value has been set? When the 'dot' is to the very left of the slider, I think it implies a value of 0. We are frequently explaining to our content providers that there is a difference between touching the dot and sliding it to the left to get a value of 0, vs not touching it at all (even if the dot doesn't move). I think that if the dot wasn't present at all on the slider, until a value was set, that would clear up a lot of confusion.

What is your proposed solution?

As mentioned above, I think the best solution is probably to not even have the 'dot' on the slider when a value hasn't been set. Failing that, at least clearly show a difference between no value set and the leftmost value set.

@MadtownLems MadtownLems added the [Type] Enhancement A suggestion for improvement. label Feb 16, 2024
@MadtownLems MadtownLems changed the title Suggested Improvements to Preset Slider (things like Margin/Padding) Suggested Improvements to Preset Slider (things like Margin/Padding) around no value and zero value Feb 16, 2024
@jordesign jordesign added the [Package] Block editor /packages/block-editor label Feb 18, 2024
@ndiego
Copy link
Member

ndiego commented Feb 19, 2024

dot-state.mp4

Here is a little video with some more context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block editor /packages/block-editor [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants