-
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
Expose revisions in Template and Template Part List and change icon for reverting #56603
Comments
Fantastic! Let's keep this open to ensure it happens. Also, apologies for uploading the same screenshot twice. Updated the original issue to include the correct new view. |
Looping back on this -- here's what the experience is like with 6.5 RC3: 6.5.update.movAs data views work continues, I think two changes would go a long way: change revert icon so it doesn't match the revision icon & surface revisions over destructive actions for templates. Compared to posts or pages, I have a hard time imagining we want destructive actions surfaced so much over information like number of revisions. Just my two cents but, even if it remains there, we need to change the icon. |
It's fantastic that revisions are coming to the template editor! Ran into a couple of things while testing ahead of a workshop that I wanted to provide feedback on: 100% agree with @annezazu that having same icon now used for “reset template” and “view template revisions” – is confusing – and risky. For example, someone could easily click on the "reset" icon thinking it will lead to revisions, and as a result, lose all their template customizations – with no way to get them back. Also completely agree with @annezazu that a user should be able to manage revision history from the "Manage All Templates" area. The three dots next to the templates in table (list) view doesn’t seem to do anything anymore. IMO the three dots menu should have the same functionality, whether you're in grid or table view. It's currently very confusing that the three-dots menu allows deletion or reset from grid view, but does nothing at all from table view. I also think you should be able to access the options to view revisions, reset/clear customizations, or delete each template from both table/grid views, as applicable. These are three key pieces of functionality, and I think all should be accessible from the Manage All Templates overview, in either layout view. Finally, I think the terminology for clearing customizations should be consistent across the board. Either "Clear customizations" or "Reset" – but not both (the current scenario), which can be confusing, unintuitive, and again, result in unintentional user actions. Tested with: WP 6.4.3 |
👋 it seems the revisions action in templates is implemented for a while, but I agree we need to change the icon asap(cc @jameskoster ). Probably we also need to add a modal like we did in sidebar card to confirm, which indicates more the 'destructive' result. @kathrynwp regarding the Data Views actions you mention are there in the ellipsis menu, but only if they are available. For example if a template has revisions then the action is shown. Additionally there are discussions of removing the ellipsis if no actions are available. Finally you mention that in the actions are different when changing layouts. That's not the case since the actions are common per list. So if you have noticed something like that it sounds like a bug and we should address it. Can you retest and confirm that the actions are there? Thanks! |
A modal confirm will help. Should the revert option also be in the ellipsis menu, as Kathryn alludes to? That would allow the action to have more context, and have its footprint match its consequences. |
We've gone back-and-forth a bit on whether destructive actions should be given prominence or not :) I lean towards them not being surfaced as quick-actions, and #59551 seeks to achieve this for pages. If merged I intend to follow-up with a similar PR for templates. Like Joen says that would solve the icon issue as the action would move to the ellipsis. |
@ntsekouras Looking at the code it seems the revisions action is included for templates: gutenberg/packages/edit-site/src/components/page-templates-template-parts/index.js Line 413 in e04cf9c
But for one reason or another it doesn't seem to be working. Edit: It seems to work for template parts, but not templates 🤔 |
Hi @ntsekouras - thanks for looking at this!
I've recorded a screencast to try to help clarify what I'm seeing. Thank you! 2024-03-21-1-templates-etc.mp4After recording the video I tried making some more changes to a different template (404) and then the ellipsis finally became active in Table view. Not sure why it didn't when I made edits to the Category template... |
Thanks for the video @kathrynwp and really appreciate the time it took you to make it! You can only reset theme provided templates, although I get that this can be confusing. We have no current mechanism to track('reset') a template that users create, because they just start empty. The reason why you see some content when creating a new template is just a suggestion from WP, but that doesn't change the fact that the initial content is empty technically. Regarding the ellipsis menu behaving differently between table and grid view, is that the grid view uses a compact representation of actions and combines all of them in the ellipsis menu. Table view utilizes an API that separates primary actions(with icons outside the menu) and then also combines all of them in the ellipsis menu.
Regarding the reset Regarding the I hope all these clarify some things and I'd love if you still find something confusing to let me know. |
@ntsekouras I don't think we can close this yet. The revisions link for templates doesn't appear for me in data views. Strangely it does work for template parts 🤔 revisions.mp4 |
Hm.. It seems we are using different logic between the sidebar footer and the template actions, both in Data Views and sidebar card actions(ellipsis menu). Yeah, let's keep open to consolidate this last part. To be clear the difference is that in navigation sidebar we show even the first revision that is from empty content to some content and cannot be restored. So the question becomes if we should disable the revisions link in sidebar navigation if we have only one revision(the initial one) or the other way around and don't check this in data views.. |
What problem does this address?
Right now, we surface "clear customizations" as an action folks can take when viewing the template and template part list. In chatting with some folks who work regularly with customers using the Site Editor, they noted that having revisions surfaced there would go a long way to prevent users from accidentally clearing out their customizations and instead offering them an option they are more likely to use/benefit from (looking through revisions). Current view:
Experimental view with data views work (currently if you just click on the button, it automatically reverts which feels precarious):
Similar to this: #52221
Relates to Data Views work: #55083
What is your proposed solution?
Surface revisions in the template and template part lists and/or address this feedback to allow to save a revision when clearing customization per this issue #52221 cc @WordPress/gutenberg-design as we think about Data Views work.
The text was updated successfully, but these errors were encountered: