WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.51k stars 4.2k forks source link

Expose "block hooks" at the section level #65676

Open mtias opened 1 month ago

mtias commented 1 month ago

It'd be great if sections (patterns/top-level-groups/template-parts) were able to list blocks hooked into child elements when in select/content-only mode, re block hooks.

For example, say WooCommerce is hooking "Cart" to the navigation block, when selecting the header template part we should surface the block hooks interface so the Cart block can be toggled on or off without having to explicitly select the navigation menu itself.

simison commented 1 day ago

This would be helpful bubbling to templates like "single post":

E.g. "Likes" and "Subscription" blocks get hooked to "the content" block, but now we require users to choose the content block to be able even to discover there are some block hooks disabled.

They'd be more discoverable if they bubbled up as "features to enable" at the single post template level:

Image