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

Feature: History view and changes improvements #6584

Open
4 tasks
stevepiercy opened this issue Jan 13, 2025 · 15 comments
Open
4 tasks

Feature: History view and changes improvements #6584

stevepiercy opened this issue Jan 13, 2025 · 15 comments

Comments

@stevepiercy
Copy link
Collaborator

stevepiercy commented Jan 13, 2025

When viewing the History of any page that is not the Home page, there are some improvements I would like to see for Editors.

To replicate, authenticate as an Editor, and navigate to any page that is not the Home page, such as Accordion. On the upper left, select the More button, represented as a horizontal stoplight icon (three small circles), then select History.

Screenshot 2025-01-13 at 10 06 30 PM

You will now see a list of history for Accordion, where the last column may contain another horizontal stoplight icon for additional options.

  • Add a tooltip of Options for the stoplight. There might be a need for more accessibility bits, too.
  • From the stoplight options list, select View this revision.
    • While viewing it, you cannot revert to it. Instead you have to navigate back to the History interface. It would be nice to have a "Revert to this revision" button, unless it is, of course, the current revision.
    • Additionally there should be some indicator of "You are viewing revision XYZ", because it looks like a normal content type and not revision of it.
  • From the stoplight options list, select View changes to view the diff. You cannot revert to a specific change. Instead you have to navigate back to the History interface. It should allow the Editor to revert to the currently selected revision, unless it is, of course, the current revision.
@KatalKavya96
Copy link

@stevepiercy I have thoroughly studied and aligned with the principles of Plone, and I am confident that I can resolve this issue effectively. Additionally, I am eager to contribute to similar challenges.

Kindly assign this issue to me.

@davisagli
Copy link
Member

@KatalKavya96 Please don't, there's some discussion that needs to happen first. I've worked with Plone for 15 years and don't see a way to implement this feature there.

@stevepiercy The undo control panel provides a database-level undo by rolling back transactions. Zope transactions are not stored in any way that can be easily introspected to see the differences (not even which content items were involved in the transaction), so I don't see any way to provide this there.

What you're describing already exists in the form of the "history" feature that can be accessed in the toolbar for a specific content item to see a history of revisions, preview diffs, and roll back.

@KatalKavya96
Copy link

@davisagli @stevepiercy I understand. I am eager to contribute to Plone, so if there are any other priority issues or necessary tasks where I can assist, please do let me know. I would love to help in any way I can.

@stevepiercy
Copy link
Collaborator Author

@davisagli sorry, I wasn't specific enough. To go into details of issues I've run into:

  • History does not appear on the Volto demo home page under .... I'm not sure if this happens only on the home page, on some content types, or folders.
  • After selecting View this revision and viewing it, you cannot revert to it. Instead you have to navigate back to the History interface. It would be nice to have a "Revert to this revision" button. Additionally there should be some indicator of "You are viewing revision XYZ", because it looks like a normal content type and not revision of it.
  • After selecting View changes and viewing the diff, you cannot revert to a specific change. Instead you have to navigate back to the History interface.

Navigating back to restore a revision also takes away the context. If there is a long history, you might not be able to identify which of the revisions in the list you just viewed and to which you want to revert.

Hope that clarifies.

@KatalKavya96
Copy link

KatalKavya96 commented Jan 13, 2025

@stevepiercy Now that I have a better understanding of the issue:

As checked History option is only not available on Home Page of the Demo,
Yes you cannot revert back when viewing revision, viewing changes or viewing diff you have to go back to history again

I believe I can resolve it. I would love to take this up,
Could you please assign me this issue?

@davisagli
Copy link
Member

@KatalKavya96 Nope, we're still discussing. Also, you'll find when you read our contributor docs that we don't assign issues to people.

@stevepiercy Now you're clearly talking about the Volto history view. So I'm confused why you mentioned the Undo control panel when you first opened the issue.

History does not appear on the Volto demo home page under .... I'm not sure if this happens only on the home page, on some content types, or folders.

The feature is intentionally disabled for the Plone site root, because some more work is needed to support it properly when copying revisions in CMFEditions. (We need a special modifier to avoid copying things like the Zope component configuration that shouldn't be copied.)

  • After selecting View this revision and viewing it, you cannot revert to it. Instead you have to navigate back to the History interface. It would be nice to have a "Revert to this revision" button. Additionally there should be some indicator of "You are viewing revision XYZ", because it looks like a normal content type and not revision of it.
  • After selecting View changes and viewing the diff, you cannot revert to a specific change. Instead you have to navigate back to the History interface.

Good points. I agree it'd be nice to improve those.

@KatalKavya96
Copy link

@davisagli Can i work on the reverting back issue then?

@davisagli
Copy link
Member

@KatalKavya96 Yes, if you've read https://6.docs.plone.org/contributing/first-time.html first. I'd suggest showing a mockup of what you intend to implement before you spend a lot of time on it.

@KatalKavya96
Copy link

@davisagli Ok , Let me go through the document and reach back to you with the implementation mockup

@stevepiercy stevepiercy changed the title Feature: Revisions control panel Feature: History view and changes improvements Jan 14, 2025
@stevepiercy
Copy link
Collaborator Author

@davisagli I renamed the issue. The idea originated from the undo control panel PR, and I must have had "control panel" in my subconscious while my fingers were typing.

From the perspective of an Editor, not having a History for only the home page is weird. Is it reasonably possible to get that feature? If it's way too much work, maybe we say "too bad".

@davisagli
Copy link
Member

@stevepiercy Yes, of course we'd like to support versioning for the site root, it's just not easy (I spent a half day working on it recently and was just uncovering more details that need attention). I think this should be a separate issue from the UI improvements, since the necessary fixes are in different packages.

@stevepiercy
Copy link
Collaborator Author

The edited description could use some feedback, especially from the @plone/volto-accessibility Team.

@Shyam-Raghuwanshi
Copy link

hi @stevepiercy why i am not seeing the block/block-accordion or block link locally

@stevepiercy
Copy link
Collaborator Author

@Shyam-Raghuwanshi because you are not using volto-light-theme as https://demo.plone.org/ indicates.

@davisagli
Copy link
Member

@stevepiercy volto-light-theme doesn't include the example content either. It is part of the voltodemo distribution in https://github.com/plone/demo.plone.org/tree/main/backend/src/plone6/demo/distributions/voltodemo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants