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

BoxControlVisualizer: Create a new separate component, and fix existing issues #40057

Closed
4 tasks
apeatling opened this issue Apr 5, 2022 · 0 comments · Fixed by #40505
Closed
4 tasks

BoxControlVisualizer: Create a new separate component, and fix existing issues #40057

apeatling opened this issue Apr 5, 2022 · 0 comments · Fixed by #40505
Assignees
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Enhancement A suggestion for improvement.

Comments

@apeatling
Copy link
Contributor

apeatling commented Apr 5, 2022

What problem does this address?

We'd like to add more visual feedback on the canvas when using Gutenberg design tools. Here's an example of how the existing BoxControlVisualizer can be used to display padding on an element on the cavas:

Screen Shot 2022-04-05 at 1 52 10 PM

Currently the BoxControlVisualizer is in an unusable state and is turned off. It's also tied closely with the BoxControl component. Some of the recently highlighted issues include:

What is your proposed solution?

I think we should:

  • Extract the BoxControlVisualizer into its own component so we can convert to TypeScript, add tests, and develop and review it in isolation.
  • Modify the visualizer so that it uses popover or :before :after styles so that we aren't adding a bunch of wrapper markup to the DOM to support it.
  • Look at using state instead of block attributes to support the new component.
  • Test this new visualizer component with a different design tool, perhaps block gap.
@apeatling apeatling added [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Enhancement A suggestion for improvement. labels Apr 5, 2022
@apeatling apeatling changed the title Visualizer: Create a new separate component, and fix existing issues Apr 5, 2022
@kevin940726 kevin940726 self-assigned this Apr 8, 2022
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] Enhancement A suggestion for improvement.
2 participants