-
-
Notifications
You must be signed in to change notification settings - Fork 782
(feat): Autosave using localStorage #6864
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
Conversation
✅ Deploy Preview for plone-components canceled.
|
I've updated the old pr #4252 Currently, the implementation works as follows:
I think it would be useful to start a discussion around what additional features should be included in the final version. |
I've also included a video to remind you about the feature. screen-capture.31.mp4 |
Acceptance tests need to pass. I think this is a great enhancement as is. I'd prefer to merge it after resolving failing tests. If and when we come to agreement on what additional features should be added, then we can enhance it further in separate PRs. |
Co-authored-by: Steve Piercy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve translation messages and change log.
It needs docs in the user manual, as a subsection in Edit content using blocks, "Autosave content". The change log, although terse, would be a good start. Screenshots or brief videos would be helpful.
It also needs a technical review from another member of @plone/volto-team.
Co-authored-by: Steve Piercy <[email protected]>
Co-authored-by: Steve Piercy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One final tweak on the docs (my bad), and they are good to go. I am crying tears of joy.
Co-authored-by: Steve Piercy <[email protected]>
Co-authored-by: Steve Piercy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs look good. Needs a technical review from @plone/volto-team
I definitely want to discuss how to move this forward in the volto team meeting later today. One thing to keep in mind is: does this still work if the content type schema has changed since the last time it autosaved some data? In other words, it doesn't necessarily HAVE to work, but at least it should not break. I'm saying this as a reminder also for whoever will test this, as it hit me as a possible use case but I did not go through the code yet so maybe it's handled already, I don't know. |
EDIT: scratch all this comment, I was working on an item that was broken in the backend. It's working now, I'll keep testing. |
First comment is: it's suggesting me to restore the autosaved data even if it's empty, would be great if it didn't, if at all possible. To reproduce:
|
A couple other thoughts:
I'll review the code shortly as well, the baseline feature is working fine for me when run locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, needs a little cleanup and then it's good to go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I am not 100% sure about the messages still, but let's test drive it during the alpha, and improve on the go.
If your pull request closes an open issue, include the exact text below, immediately followed by the issue number. When your pull request gets merged, then that issue will close automatically.
Closes ##4168
PR preview:
https://volto--6864.org.readthedocs.build/6864/user-manual/blocks.html#autosave