gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Template settings panel in Block Editor is unclear on user actions.

Open fwazeter opened this issue 5 years ago • 1 comments

What problem does this address?

Currently, when you load up a post and the available Template's get populated in the Template Settings panel in the Block Editor, you see a drop down with "Default Template" and the available options. Underneath it you have Edit or New options to take you to the Template Editor.

Because there's a dropdown with the current/default front end template selected, when I click on "New" I assume that I'm taking an action like "create New Template from default" and expect the Template Editor to populate with whatever Template I have selected.

However, what you really get, is a new Template with whatever has been set to the 'defaultBlockTemplate' setting for the block editor (e.g. as could be explicitly set via the 'block_editor_settings_all' hook). If the theme hasn't explicitly set a defaultBlockTemplate for that post type, you get the WP default, which is usually very different from the theme templates.

What is your proposed solution?

Adding a toggle to the Template Settings panel, similar to how background color has "Solid" and "Gradient" would alleviate this.

The default screen could have the dropdown with templates and the Edit button, and the Toggle could be effectively "Create" or "Create New" or "New."

Ideally, long term, you could have a dropdown with templates pulled from the corresponding .html files, that'd allow you to use as a base in creating a new template. But short term, separating them so it's more clear that you're creating a new template from scratch, would be good.

Themes can already use the 'block_editor_settings_all' hook to create some basic default templates based on simple post types - so it might make sense to have two options: create from blank or create from default.

fwazeter avatar Aug 11 '21 15:08 fwazeter

The template panel has since been redesigned: "Create new template" (its own modal) is now distinct from "Swap template" and "Edit template" (packages/editor/src/components/post-template/block-theme.js). The ambiguity reported here appears resolved, so this can be closed. (The separate idea of picking an existing template as a base is a distinct enhancement, still unbuilt.)

jasmussen avatar Aug 11 '26 13:08 jasmussen