Skip to content

It should be possible to delete new custom block templates, and revert customised block templates in the template editor #31076

@jameskoster

Description

@jameskoster

In the post editor it is now possible to:

  • Create a new custom block template on the fly
  • If a block template is used, edit it visually in the template editor

Screenshot 2021-04-22 at 10 13 29

In the case of user-generated block templates, the UI should provide a way for users to delete that template.

In the case of customised block theme templates it should be possible to revert those customisations and re-instate the theme default.

The Site Editor already offers a way to revert customised block theme templates:

Screenshot 2021-04-22 at 10 18 34

This is something we can consider bringing to the template editor (albeit without the "Browse all templates" button for now). The same design can be utilised for deletion. Here's a rough mockup:

Screenshot 2021-04-22 at 10 27 20

Since this would be a destructive action, we might want to expose a confirmation dialog that briefly explains the consequences of this action, something like:

Delete "My Custom Template"?
All posts that use this template will be affected.
[Cancel] [Delete]

It we could provide a count of how many posts would be affected, that would be even better :)

  • Provide a way to revert customised theme-supplied block templates in the template edior
  • Provide a way to delete custom block templates in the template editor

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions