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

BoxControl: Unify all the different box control components that we have in the code base. #67625

Open
youknowriad opened this issue Dec 5, 2024 · 0 comments
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.

Comments

@youknowriad
Copy link
Contributor

youknowriad commented Dec 5, 2024

While working on #67544 I noticed that we don't really use the BoxControl component much and that it has been forked several times already.

We used to use it for padding/margin. We still use in some conditions for block gap, padding and margin, but most of the time it's not used and instead a custom "Spacing" component is used.

I believe it was also considered for BorderRadius but was discarded. So in the end, we built a component that we don't really use much (and we forked for the original use-cases that it was built for). (Context here is this PR comment).

Proposal

With some small tweaks/features added to the component, we can drop a number of custom components we have right now, these features include:

  • support for presets (like we already for ColorPalette component for instance)
  • More customization options (like providing custom icons and labels for the "sides")

All these components should be using BoxControl

Image
Image
Image
Image

cc @WordPress/gutenberg-components

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

No branches or pull requests

1 participant