-
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
Add "Clear customisations" template action to other views #36303
Comments
Adding a I think this could also make sense in the Block tab as well, allowing you to reset blocks to their defaults and/or saving settings as a new style. Do you think it'd make sense to try and follow the design language of the -- I'm not so sure about adding it to the table-view for templates; It seems like a really easy way to accidentally reset a template. I feel like there should be some more friction as I'd expect this to be a destructive action. |
Certainly 👍
Yeah we can mimic trashing – red link, confirmation notice with undo option. |
There's a parallel flow here which is "Update template with new changes from theme". We had a similar flow for the template property when defining custom post types. |
Unpacking that a little...
In this case you do not receive the 2.0 updates to the Page template, because your customised version of the Page template that was bundled in 1.0 is being used. However, wouldn't resetting the customizations essentially do the same thing as "update template with new changes from theme"? Or are you thinking about some kind of diff checker / conflict resolution tool that allows you to update the template and keep your customisations? Seems hard to do that update automatically without some kind of user intervention. |
The wording of "revert to theme" doesn't imply an update or awareness that there is an update. And I am thinking of a merge between updates from the theme and local customizations. We've done some of that for the template update, I believe, in that user content transferred but other things were discarded. It's also an overlapping problem with the idea of pattern transforms, which we also have partially solved by selecting some attributes (text, images, etc) and discarding others. |
OK so it's not just a case of conditionally updating the "Clear customizations" button label :D The merging sounds fraught with quirks. Updating attributes on existing blocks seems easy enough, but what if I deleted a block entirely, or swapped out a template part? Seems like something to explore in a different issue. |
We can still improve the copy so that it doesn't only imply a setback. |
So we need something more generic that doesn't refer to reversion. Perhaps:
would be more versatile than the current
This would make more sense after theme switches as well. In the future we can augment this with a merge option, either as a subsequent action, or a dedicated flow. |
Hm... Should I reopen and create a quick follow up to update the copy like this?
The merging seems quite convoluted and should be a different issue IMO. |
@ntsekouras I think it's worth opening a PR to discuss, if it's an easy one :) |
I think we should open an issue with the ideas for the merging and connect it conceptually to the work we've done in updating patterns and transforming patterns. |
Opened an issue for the merging idea here: #41764 |
It's currently possible to reset customisations to a template whilst editing it via the dropdown in the top bar:
We may remove this dropdown in the Appearance Editor (#36207), but it should however still be possible to reset template customisation in this view, so we should explore ways we can make that possible.
One idea would be to add an actions dropdown in the Template tab of the inspector:
Additionally, it may be worthwhile making this action available on the list views at Appearance > Templates and Appearance > Template parts.
The text was updated successfully, but these errors were encountered: