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

Expose revisions in Template and Template Part List and change icon for reverting #56603

Closed
1 of 2 tasks
annezazu opened this issue Nov 28, 2023 · 14 comments · Fixed by #60119 or #60194
Closed
1 of 2 tasks

Expose revisions in Template and Template Part List and change icon for reverting #56603

annezazu opened this issue Nov 28, 2023 · 14 comments · Fixed by #60119 or #60194
Assignees
Labels
[Feature] Data Views Work surrounding upgrading and evolving views in the site editor and beyond [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") Needs Design Feedback Needs general design feedback. [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@annezazu
Copy link
Contributor

annezazu commented Nov 28, 2023

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:

Screenshot 2023-11-28 at 8 54 29 AM

Experimental view with data views work (currently if you just click on the button, it automatically reverts which feels precarious):

Screenshot 2023-11-28 at 8 56 33 AM

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.

  • Provide access to revisions for templates and template parts
  • Add confirmation modal for clearing customizations
@annezazu annezazu added [Type] Enhancement A suggestion for improvement. [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Feature] Data Views Work surrounding upgrading and evolving views in the site editor and beyond Needs Design Feedback Needs general design feedback. labels Nov 28, 2023
@jameskoster
Copy link
Contributor

Totally. It's already there for pages in the new data view, so it makes sense to align.

Screenshot 2023-11-28 at 19 29 05

@annezazu
Copy link
Contributor Author

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.

@annezazu annezazu changed the title Expose revisions in Template and Template Part List Expose revisions in Template and Template Part List and change icon for reverting Mar 20, 2024
@annezazu
Copy link
Contributor Author

Looping back on this -- here's what the experience is like with 6.5 RC3:

6.5.update.mov

As 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.

@kathrynwp
Copy link

kathrynwp commented Mar 20, 2024

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.

templates-gh2

templates-gh1

Blog_Home_‹_Template_‹_Food_Connection_‹_Editor_—_WordPress

Tested with:

WP 6.4.3
GB 17.9.0

@ntsekouras
Copy link
Contributor

👋 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!

@jasmussen
Copy link
Contributor

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.

@jameskoster
Copy link
Contributor

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.

@jameskoster
Copy link
Contributor

jameskoster commented Mar 21, 2024

@ntsekouras Looking at the code it seems the revisions action is included for templates:

But for one reason or another it doesn't seem to be working.

Edit: It seems to work for template parts, but not templates 🤔

@jameskoster
Copy link
Contributor

#59551 is merged 🎉

I opened #60075 to move the destructive actions in the templates data view as well.

@kathrynwp
Copy link

Hi @ntsekouras - thanks for looking at this!

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.

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!

I've recorded a screencast to try to help clarify what I'm seeing. Thank you!

2024-03-21-1-templates-etc.mp4

After 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...

@kathrynwp
Copy link

Ran into a situation where you can clearly see here that I made template edits 3 minutes ago... and yet the revisions icon is not active, it's unclickable. There's also still no way to know whether this icon meant is for viewing revisions or resetting the template, as there's no popover/tooltip.

All_Archives_‹_Template_‹_Food_Connection_‹_Editor_—_WordPress

@ntsekouras
Copy link
Contributor

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.

Ran into a situation where you can clearly see here that I made template edits 3 minutes ago... and yet the revisions icon is not active, it's unclickable. There's also still no way to know whether this icon meant is for viewing revisions or resetting the template, as there's no popover/tooltip.

Regarding the reset icon in Data Views, it has already been removed and the reset action has been denoted to secondary, so it's only available through the ellipsis menu. Additionally soon enough I'll open a PR that adds a confirm dialog to clear customizations.

Regarding the revisions inactive icons it's because there is only one revision(the initial creation of the template actually with no content). The icon becomes active when perform any additional change and same goes why in that case you don't see the view revisions action in Data Views.

I hope all these clarify some things and I'd love if you still find something confusing to let me know.

@jameskoster
Copy link
Contributor

@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

@jameskoster jameskoster reopened this Mar 22, 2024
@ntsekouras
Copy link
Contributor

ntsekouras commented Mar 26, 2024

@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 🤔

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Data Views Work surrounding upgrading and evolving views in the site editor and beyond [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") Needs Design Feedback Needs general design feedback. [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
5 participants