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

Documentation: spacing.blockGap explanation is inadequate for custom blocks #43921

Open
dsas opened this issue Sep 6, 2022 · 1 comment
Open
Assignees
Labels
[Feature] Block API API that allows to express the block paradigm. [Feature] Layout Layout block support, its UI controls, and style output. Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts [Type] Developer Documentation Documentation for developers

Comments

@dsas
Copy link
Contributor

dsas commented Sep 6, 2022

Description

Part of #41236.

spacing.blockGap is mentioned in the supports section of the block API reference.

It says that setting the property to true is enough to enable the functionality if the theme supports it. This wasn't the case for me. Looking at the blocks which currently support blockGap, they either use layouts or use some gap specific hooks.

It would be great to have better documentation on how I can use blockGap in custom container blocks of my own.

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

@glendaviesnz glendaviesnz added [Type] Developer Documentation Documentation for developers [Feature] Block API API that allows to express the block paradigm. labels Sep 7, 2022
@gziolo gziolo added Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts labels Feb 27, 2023
@gziolo gziolo changed the title spacing.blockGap documentation is inadequate for custom blocks Documentation: spacing.blockGap explanation is inadequate for custom blocks Mar 3, 2023
@gziolo gziolo mentioned this issue Mar 3, 2023
69 tasks
@andrewserong andrewserong added the [Feature] Layout Layout block support, its UI controls, and style output. label Mar 5, 2023
@andrewserong
Copy link
Contributor

This is a good issue, thanks for flagging it. Currently the spacing.blockGap feature expects that the block also opts in to the (still technically experimental) layout block support via the __experimentalLayout setting (described in this page of the docs). As the layout support is stabilised, it'd be good to add both further documentation for it and clarify the relationship between it and spacing.blockGap as described here 👍. Just pinging @tellthemachines for visibility on this one too, since it relates to Layout support stabilisation 🙂

@ryanwelcher ryanwelcher self-assigned this May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block API API that allows to express the block paradigm. [Feature] Layout Layout block support, its UI controls, and style output. Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

No branches or pull requests

5 participants