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

FSE Beta: periodically autosave entities in the Site Editor #59371

Closed
vindl opened this issue Dec 18, 2021 · 3 comments
Closed

FSE Beta: periodically autosave entities in the Site Editor #59371

vindl opened this issue Dec 18, 2021 · 3 comments

Comments

@vindl
Copy link
Member

vindl commented Dec 18, 2021

Core currently doesn't have drafts and autosaving in the Site Editor. Adding that will probably take a while, so we should look into some temporary measures that could make things better for WP.com.

@mtias proposed the following:

I’d say that the role of the site editor in signup for WP.com is a bit different, though, and you could consider forcing saves as auto-saves on regular intervals without much problem since you are not concerned with draft states on already published entities because the site is presumably not live yet.

We should investigate ways to implement this and assess the UX consequences of this change.

@vindl
Copy link
Member Author

vindl commented Dec 18, 2021

Comment thread discussion p58i-bAv-p2#comment-52747

@zaguiini zaguiini self-assigned this Dec 28, 2021
@zaguiini
Copy link
Contributor

zaguiini commented Jan 6, 2022

One way of doing that would be to implement changesets.

The idea is to initially implement a single draft state so one could have an immediate backup point. From there, we could extend this functionality by implementing multiple draft versions and, most importantly, finally allowing previews directly in the browser instead of inside the editor.

The draft state would contain several bits of changed information including, but not limited to:

  • current template;
  • contents of the template;
  • global styles;
  • block global styles;
  • option changes.

I think the most practical solution, for starters, would be to store a JSON in the database as a custom post, just like we do in the Customizer.

In fact, there are already some thoughts on using the Customize API and a plugin called wp-customize-posts, so it looks like this is the right direction. Thoughts?

@zaguiini zaguiini removed their assignment Jan 17, 2022
@vindl
Copy link
Member Author

vindl commented Jan 17, 2022

We decided to punt this work for now based on the discussion in paYE8P-1np-p2.

@vindl vindl closed this as completed Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants