Skip to content

Block Registration: add SlotFill to extend a block's description #49887

@jeherve

Description

@jeherve

What problem does this address?

It was previously possible to use React nodes in a block's description, like so:

description: (
		<Fragment>
			<p>
				{ __(
					'This block does something really fancy and complex.',
					'my-fancy-complex-block'
				) }
			</p>
			<p>
				{ __( 'Here is a detailed description about the things my block does.', 'my-fancy-complex-block' ) }
			</p>
			<ExternalLink href={ supportLink }>{ __( 'Learn more about how to use me', 'my-fancy-complex-block' ) }</ExternalLink>
		</Fragment>
	),

This allowed adding extra information to a block's description, such as links to support documentation or more.

Unfortunately, this is no longer encouraged since #44455.

What is your proposed solution?

Instead of adding all that information to the block's description itself, and since adding it there can have some unintended side-effects, it would be nice to add a new SlotFill that would be displayed right below the block's description in the editor sidebar, and nowhere else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DecisionNeeds a decision to be actionable or relevant[Feature] Block APIAPI that allows to express the block paradigm.[Feature] ExtensibilityThe ability to extend blocks or the editing experience[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions