-
Notifications
You must be signed in to change notification settings - Fork 84
Handle conflicts arising from simultaneous editing on app + web #144
Comments
Hi @Windyo! I'll have to look into what's really causing this - thanks for the suggestion. I don't think I understand your 2nd suggestion - do you mean check whether the server has a newer version of the post and if so replace Quill's copy of the post with the one on the server? |
Hi @vickychijwani ! yeah my second suggestion is just to do a diff check if online between quill and the server, then ask what should be done if a diff exists. I don't know if you can get the savedate from a post in the database, so that would work in any case |
Adding to this issue : if you use Quill to update a post which Quill knows is published, it won't force-push anything and instead display "changes auto saved, not pushed to server" untill you press "update post", which is great. . However if you published a draft via the web interface and quill still thinks it's a draft, it will overwrite with extreme prejudice if you ever go into edit mode. |
Yes, Quill was not really designed to handle concurrent editing from the app + Ghost. Question: is this a real use-case for you? I had decided to ignore it because it seemed overkill to handle such a rare scenario. |
I actually use Quill + the Ghost desktop app + the web interface. My use case is :
It happens pretty often that I will start a post on quill, continue on the computer and then finish it up later on quill before posting. All in all it's not worth doing a whole lot of code for. The only thing that should be needed is a diff check and then for ce to take action if a diff exists, whatever it is. |
Interesting. Let me get back to you on this. |
Yes please! Quill just over-wrote 2 days worth of a post. I started using the Ghost web editor, then added some content from quill (photos) then continued on the web editor and published from there. Next time I started Quill the post got marked as draft and the content was over-written. |
@stuartbfox so sorry to hear that! I made a fundamentally incorrect assumption here: that the user will always exit the post editor and go back to the post list when they're done editing a post (which, by the way, I recommend you to do until this is fixed). Now I realize that's just how I work and not reflective of others' behaviour. Clearly this needs fixing. Dev notes: All that's needed to prevent data loss is:
|
That all sounds reasonable. I dont suppose quill stores a copy of the downloaded post does it? |
No, it doesn't. |
@Windyo @stuartbfox I have some good news: Quill will be released with a simple conflict handling UI today! The way this works is: before uploading any edited post, Quill will first download the latest server copy and compare them. If the device's copy has a different Note that conflicts must be resolved immediately, there is no way (yet) to defer the decision. But you can force Quill to re-fetch the server copy once more after making some more edits from Ghost, by simply tapping the back button (this is a bit of a hack, but I figured most users who have conflicts won't need fine-grained control - this is open to discussion of course). Watch out for the v1.5.0 update from the Play Store :) |
FILL THESE DETAILS FIRST:
Clicking on a post in quill, swiping, making no edits and swiping again because you know the server version is more up to date, results in the server post being overwritten with the quill one.
Suggestion : de not trigger "edit" behavior if there was nothing typed during the session.
Other suggestion if online, do a version check before accepting edit mode.
The text was updated successfully, but these errors were encountered: