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

Add a confirmation modal when clearing the customizations on a template #39124

Open
hanneslsm opened this issue Feb 28, 2022 · 6 comments
Open
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Enhancement A suggestion for improvement.

Comments

@hanneslsm
Copy link

hanneslsm commented Feb 28, 2022

What problem does this address?

The impact on clearing a customization on a template or template part can be huge, especially when you put a lot work in building your templates with the FSE.
However, all the work can be deleted with just one or two thoughtless clicks on the menu:
image

What is your proposed solution?

Add a modal where the user has to confirm that all their work will be deleted. Maybe some additional info text to make clear what impact the clearing exactly has.

@hanneslsm hanneslsm changed the title Add a confirm modal when clearing the customizations on a templae Add a confirmation modal when clearing the customizations on a template Feb 28, 2022
@ntsekouras
Copy link
Contributor

I agree that the impact might be big and it could be good to have an extra confirmation step.. --cc @jameskoster @jasmussen @kjellr

@jasmussen
Copy link
Contributor

Keeping #25071 in mind, it seems okay to add a confirmation dialog. I'd keep it simple, though. Maybe use the new ConfirmDialog from #34153?

@jameskoster
Copy link
Contributor

Worth noting that when you revert whilst editing the document there is an undo affordance:

revert.mp4

We used the undo pattern here for a couple of reasons:

  1. It aligns with other flows in WP like trashing posts
  2. It essentially allows you to "preview" the revert directly on the canvas before fully committing

Obviously the second point doesn't apply on the template list view, and the first point holds less water generally since we removed the ability to retrieve templates from the trash.

All that to say: I think it's probably okay to install the confirmation dialog on template list, but we should acknowledge that the revert flow would then differ based on the view. Is it risky to make a high impact action feel unpredictable?

If we wanted to make reverting consistent, another option might be to make the button itself feel more like a "danger zone" (IE make the link red, to match Trash links), and add the undo action to the Snackbar on list view.

@afercia
Copy link
Contributor

afercia commented Jul 19, 2022

Worth mentioning that also when deleting a template (e.g. a custom template) there's no confirmation step. Is there a specific issue for that already?

Screenshot 2022-07-19 at 13 43 50

@hanneslsm
Copy link
Author

I have created a new issue for the missing confirmation when deleting a template.

I think most of the user do not distinguish between "clear" and "delete". They will lose all their work, no matter what they click, so a similar/same implementation should be used here for both.
Making the "Clear customisation" buttons red, as for "Delete", is definitely an option.

@jameskoster re while editing: I think a confirmation step should also be included while editing, not only for consistency but also for good UX.
Even better would it be, if the Undo affordance would be also implemented in the Template list.

@hanneslsm
Copy link
Author

hanneslsm commented Jan 17, 2023

Another random thought: If a modal is implemented, the "Export Theme" function could be linked, so that the user can download a snapshot of the theme before clearing the customisations/ deleting a template.

Example wording, this must surely be refined…

Are you sure you want to clear all customisations?

This action will remove any changes you have made and restore the original settings of the current theme. You can copy all blocks or download the complete theme with all templates and styles beforehand."

Are you sure you want to delete this template?

Deleting this template will remove this template. This cannot be undone. You can copy all blocks or download the complete theme with all templates and styles beforehand."

@annezazu annezazu added [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") and removed [Feature] Full Site Editing labels Jul 24, 2023
@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

7 participants