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

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

Closed
2 tasks
jameskoster opened this issue Apr 22, 2021 · 7 comments · Fixed by #32042
Assignees
Labels
Needs Design Feedback Needs general design feedback.

Comments

@jameskoster
Copy link
Contributor

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
@jameskoster jameskoster changed the title It should be possible to delete new custom block templates, and revert customised block templates It should be possible to delete new custom block templates, and revert customised block templates in the template editor Apr 22, 2021
@karmatosed
Copy link
Member

I think the line seperates the action from it's connection a bit too much perhaps:

image

I really like the idea of at least the first time someone does this adding in a confirmation, but perhaps only the first time otherwise it could get a little much.

@jameskoster
Copy link
Contributor Author

Yeah without the template description (and other actions) the separator does seem a little heavy-handed. I included it because I believe it is already built in to the popover style in the site editor. It should be easy to remove though.

Another option would be to add some template meta data in lieu of a description. I'm not sure how useful that would be?

Screenshot 2021-04-22 at 12 17 03

I really like the idea of at least the first time someone does this adding in a confirmation, but perhaps only the first time otherwise it could get a little much.

We could certainly add a "Don't ask me again" checkbox.

@paaljoachim
Copy link
Contributor

paaljoachim commented Apr 23, 2021

Here is a variation (Ratio is off).

Screen Shot 2021-04-23 at 16 32 54

#31147

@kellychoffman
Copy link
Contributor

I like adding the meta info in there, as it acts like a pre-emptive "are you sure?". It could be a bit more compact. My only thought is the nearly empty Template tab in sidebar. That is the location where you delete/trash a post. It might make more sense to stick it there.

@jorgefilipecosta jorgefilipecosta self-assigned this May 6, 2021
@jameskoster
Copy link
Contributor Author

My only thought is the nearly empty Template tab in sidebar. That is the location where you delete/trash a post. It might make more sense to stick it there.

I acknowledge this is a bit "in the clouds", but if we move more document attributes to the top bar then maybe we don't actually need the "Template" tab at all?

delete.template.mp4

@youknowriad
Copy link
Contributor

We have this in place now. Should we close this issue or keep it for potential improvements?

@jameskoster
Copy link
Contributor Author

We can close once #32042 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Feedback Needs general design feedback.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants