-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Full site editing: The UI should provide a way to revert a template part to its default state #29687
Comments
This seems critical to FSE's inclusion in WordPress 5.8. The Site Editor encourages users to edit templates and users should have a way to revert to the author's original intent and upgrade to updated Theme changes. It seems a minimally-viable to-do is to at least notify users when an update to their Theme contains an updated template file to one of their custom As-is, Theme Authors cannot safely release refactored stylesheets or block templates without risking a user not knowing updates are available or worse perhaps breaking a site (if a developer changes a css selector Long-term we need to think about how to help Theme Authors and Users safely merge changes, but an MVP is notifying users that Theme v1.5 contains template changes from their prior v1.4.1 they originally extended. This would probably mean saving the filesystem template as a revision anytime a user modifies in the site editor, such that it can be compared with their modifications and the filesystem version to detect a change upon Theme update. |
Yeah, theme updates (and to a lesser extent theme switches) all need careful consideration. I would encourage you to open issues to discuss details of the update flows since reverting will likely only be a small part of a much larger overall experience. |
I posted the same reply on Slack where this was discussed, but posting here as well for posterity. |
@aristath I hear what you're saying and I agree with much of it. However, I do think this differs from the existing parent/child scenario in a way that affects both "Clear customizations" that @jameskoster originally pointed out and the separate but related issue of "updates available."
We can move this discussion to another ticket, however this issue is tightly coupled to "Clear customizations." FSE is a powerful, intuitive and effective tool -- particularly to users already comfortable with Gutenberg. I think users will make excellent use of it. That's why I worry this could be a problem. It's both an issue for Theme Developers to release iterative updates and a UX issue for Site Owners who unknowingly could upgrade/not be aware of changes the Theme Author released. |
I shared a concept in #30773 (comment) for reverting a template part while editing the parent template. I think it would be worth adding that here. We'd need #29147 to land first. |
Hopefully we can borrow much of the work done in #28141 to accomplish this.
The one difference here is that it should probably be possible to revert a template part while editing a template, or editing the template part directly in isolation.
The text was updated successfully, but these errors were encountered: