-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Consider a "Save history" option on "Clear Customizations" #52221
Comments
Right, I think at least a warning advising the consequences of clicking on "Clear customizations". In addition, instead of clearing all the revisions, make the very last revision the new "1st revision", (optionally remove all other previous revisions), and copy the template contents from the theme files as the latest revision. This gives users an "undo" option in case they made a mistake. |
Parity with the global styles would be great. One can reset global styles, and the previous revisions are not deleted, so it is possible to revert back to any revision even after doing a reset. I think it could be confusing for users why template/part revisions are not available in the same way. As I understand it, this is because on theme activation an empty global styles post is created, and when resetting the global styles its post is not trashed, rather it is emptied and so the post and its revisions still exist. Would it be possible for the template post content to be emptied when doing a reset, rather than the post being trashed? This way the revisions would still exist. But then how do we ensure an empty template is not rendered? To add some context to my issue; I was working on an importer to import templates. This was working quite well until said template was reset by the user after being further edited. Maybe they thought that resetting would bring back the originally imported template. When that happens the imported template no longer exists and then defaults back to the default theme (or plugin) template. I worked around this by duplicating the imported template as a pattern that can be accessed via Template > Design. This works really well for 1 pattern per template, so I thought about duplicating every revision as a pattern, but the presentation of it in the Design area of the template editor became unwieldy after more than 2 or 3 revisions. |
If I'm following you correctly, this is the part where we would want to copy-paste the markup from the original theme file into the now latest revision - which then looks like a "reset". |
Yes I think that would work 👌 |
What problem does this address?
The new revisions option is a great tool, but at the moment there is no way to revert to the original theme file version of a template or template part, using the revisions tool. The closest you can get is the second save. As a result, users are forced to either manually edit the template (and therefore creating another revision), or use the "clear customizations" option.
The issue with clearing customizations is that it wipes all revisions from the database, so at this point there's no going back, and a potential heart breaking scenario for an un-seasoned user. There's also no second chances with this action - clicking the button does not bring up a warning or modal window to confirm the action or consequence.
What is your proposed solution?
There's likely a few possibilities around this, here's a few options:
The text was updated successfully, but these errors were encountered: