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

Site Editor: Allow Revisions for the Site Editor #36060

Closed
jordesign opened this issue Oct 28, 2021 · 8 comments
Closed

Site Editor: Allow Revisions for the Site Editor #36060

jordesign opened this issue Oct 28, 2021 · 8 comments
Labels
Needs Technical Feedback Needs testing from a developer perspective. [Type] Feature New feature to highlight in changelogs.

Comments

@jordesign
Copy link
Contributor

What problem does this address?

No revision history for the site Editor

What is your proposed solution?

I'm not sure it's possible but a revision history within the Site Editor would be nice to have.
This would allow users to revert to a previous version of what they've created within the Site Editor.

This is currently available for pages and posts:

Screen.Capture.on.2021-10-26.at.05-37-55.mp4

But not within the Site Editor:

Screen.Capture.on.2021-10-26.at.05-39-47.mp4
@jordesign
Copy link
Contributor Author

Originally reported by @synora in Automattic/wp-calypso#57349

@stevenlinx stevenlinx added [Feature] Full Site Editing [Type] Feature New feature to highlight in changelogs. Needs Technical Feedback Needs testing from a developer perspective. labels Nov 1, 2021
@yahilmadakiya
Copy link
Contributor

wp_template and wp_template_part has revisions support added.
Also DB has new entry on template update. Looks like only UI is missing.

@yahilmadakiya
Copy link
Contributor

yahilmadakiya commented Nov 1, 2021

I tried to debug more in code. Adding my research here for feature reference.

For revision LastRevision Component being used which has 2 component PostLastRevisionCheck and PostLastRevision.
Both component check for getCurrentPostLastRevisionId() and getCurrentPostRevisionsCount() if that is available then only display content revisions UI.

Problem Statement

  • For post and page post_type both function return object which has _links key but not for wp_template OR wp_template_part and because of that PostLastRevisionCheck does not render any UI
  • Also We have rest-endpoint to store those value Here.

@coreyworrell
Copy link
Contributor

Any updates on this? Say a developer creates a default template part in the theme file, client updates through UI, then later updates again, but messes something up. Reverting to what is in the theme is not helpful because all their previous changes would be lost. There needs to be a way to revert to each incremental update to each template.

In any case, having such a core feature of a website, the templates, saved only to a database feels very wrong compared to having templates as files that can be checked into version control systems. But I'm not sure of a nice way to solve that (save for locking individual blocks in a template) or it it ultimately matters anymore with such modular themes.

@supernovia
Copy link

Noting this request for a revision history of style switches and changes to global fonts:
Automattic/wp-calypso#64348

Could these be included in a general Revisions history?

@LukaszJaro
Copy link

I just lost my work but not all of it since I saved the template at a certain point into index.html.

I'm not even sure exactly how I lost it, did I accidently "clear customizations"

I have to recreate a bunch of things now..I couldn't find a revisions for templates and that's how I ended up here. With FSE it's best creating the theme visually in the site editor vs trying to do it in the html with markup. Then copying it over to the html file in the templates directory.

I guess I should be manually copying it over more often, that's all I can think of or else it's unforgiving if a mistake is done.

@cuemarie
Copy link

+1 This would be an awesome feature to see!

@jordesign
Copy link
Contributor Author

Closing this issue as it seems to be covered by #44503

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Technical Feedback Needs testing from a developer perspective. [Type] Feature New feature to highlight in changelogs.
Projects
None yet
Development

No branches or pull requests

7 participants