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

Spacing visualizers not displaying accurately when adjusting margin/padding using spacing steps #44335

Closed
ndiego opened this issue Sep 21, 2022 · 6 comments · Fixed by #44485
Closed
Assignees
Labels
[Feature] UI Components Impacts or related to the UI component system [Type] Bug An existing feature does not function as intended

Comments

@ndiego
Copy link
Member

ndiego commented Sep 21, 2022

Description

In testing the Twenty Twenty-Three theme, I noticed that the margin and padding visualizers appear incorrectly or quite glitchy when adjusting spacing using the new spacing step functionality. Switching to manual sliders greatly improves the visualizers.

Step-by-step reproduction instructions

  1. In Twenty Twenty-Three (or another theme that supports spacing steps) add a paragraph to the page.
  2. Add margin and padding and adjust the spacing steps, notice the visualizers.
  3. Switch to manual padding and margin and notice the visualizers look much more accurate.

Screenshots, screen recording, code snippet

spacing-visualizers

Environment info

  • WordPress 6.1 Beta
  • Twenty Twenty-Three Theme
  • Gutenberg 14.1.1

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@ndiego ndiego added [Type] Bug An existing feature does not function as intended [Feature] UI Components Impacts or related to the UI component system labels Sep 21, 2022
@ndiego ndiego moved this from Triage to Todo in WordPress 6.1 Editor Tasks Sep 21, 2022
@ndiego
Copy link
Member Author

ndiego commented Sep 21, 2022

@jasmussen and @glendaviesnz sorry for the ping, but I know you both have been working on step spacing and wanted to make sure you saw this. 🙏

@annezazu
Copy link
Contributor

@talldan pinging you since you previously fixed #41823 and might have some context on these controls too!

@jasmussen
Copy link
Contributor

I have noticed a little bit of lag, and some height calculation issues. And from your visual here, it looks like margin goes inwards instead of outwards.

@talldan
Copy link
Contributor

talldan commented Sep 27, 2022

I'm not sure about the calculation, as I haven't looked at that part of the code.

When I tested trunk it seems like there's another new regression that has been introduced:

Kapture.2022-09-27.at.12.55.04.mp4

This time in both the post and site editor.

edit: found a fix for this - #44484. AFAIK, it's only a gutenberg plugin bug, so not something that needs to be backported.

@talldan
Copy link
Contributor

talldan commented Sep 27, 2022

I've put together a fix in #44485, though I'm not seeing the exact same issues as in the screen cap.

Repository owner moved this from Todo to Done in WordPress 6.1 Editor Tasks Sep 27, 2022
@talldan
Copy link
Contributor

talldan commented Sep 27, 2022

Have merged that PR now which closed this, but let me know if there are any other issues you spot in testing.

@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants