-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Autosave plugin not ignoring transparent
type events.
#9233
Comments
This is not a safe change, unfortunately. There are several places where we use
Maybe it would be possible to use
What kind of events do you mean? |
Actually, I don't know. I was under the impression that transparent events can be safely ignored.
Isn't the value change to everyone connected and everyone will call the API right if we compare it with the old one? I think if we let the server decide whether to overwrite the old data, yes, |
To solve this problem, we need to identify which changes are remote. It is difficult at the moment, as we don't give direct tools to check whether given batch comes from a remote client or from the local client. It was somewhat intentional, as we wanted to treat all changes equal but maybe it will be a good idea to implement an easy way to check the source of the changes. OTOH, even remote changes can trigger some local changes (due to postfixers, etc.) so this is not always a black-and-white situation. I wanted to use EDIT: ☝️ the above solution has additional difficulty - autosave callbacks are debounced while But I have even better idea now. As I said, we need to identify whether the changes in given batch have been all remote. And we can do that by scanning operations in that batch and checking their author. You can call I'd implement the final solution as a micro-plugin, which would:
Maybe this will solve your issue until we implement a good solution for the problem? |
It will. thanks. I need a way to control the autosave call from the outside of the CKE engine.( ie as a consumer ). |
Feature (autosave): `Autosave#save()` will now return a promise that is resolved when the autosave callback has finished. Other (autosave): Autosave plugin will now ignore changes coming from remote clients during real-time collaboration. Closes #9233.
Thanks people |
The current autosave calls the Promise for almost all
change:data
events. This is not needed as some changes may be from the Collaboration Mode, (ie, changes from other users). This will cause in collaboration mode:Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: