Popup window text confusing when editing same document
Hi all, When a user is editing a document and a second user opens the same document, you get a popup with a warning.
This is the view for the user opening the document while somebody else is already editing the document. Sometimes the user that first opened and edited the document get the same popup at the same time. Guessing that it has to do with sessions...
This text is quite confusing and our users get unsure what to do. “I have just opened the document and have not done any changes, what is this?”
After some testing we realize that this must be due to some type of caching on the server side. Would it be possible to change the wording or behavior of this functionality? One way would be to change the wording to something like:
Other users are editing this document. Multiple sessions may overwrite some data.
Do you want to proceed?
Button: "No" "Yes"
Or just inform the user and do not warn at all:
Other users are editing this document.
Do you want to proceed?
Button: "No" "Yes"
The behavior becomes the same as pressing “Overwrite” button in both suggestions above. The "Discard" button is kind of dangerous as if the second user opening the document click "Discard" all changes that the first user have changed will disappear.
The wanted behavior is the same as clicking "Overwrite" for the second user opening the document, changes that the first user have made in the document is still there after the second user has loaded the document.
Thanks for a great system!!
Thanks @xmarcux for the report and insight.
I think there is room for improvement. I have added a code pointer bellow but before that I think it's good to clarify the purpose of this dialog before someone starts to work on that: That dialog servers the purpose of avoiding document conflicts. Example: User A was editing it online in the web browser while user B has edited a previous version locally and that has already arrived to the storage server via integrators sync client, another quit common case is when multiple users were editing at the same time (possibly with different internet connections) the document until they have reach a conflict. There are other examples but generally speaking that's the main idea. For that we need to offer the user to either discard his version of the document or overwrite the version that is already in storage.
Dialog:
- Buttons:
- dialog's Close (x)
- Cancel: @Darshan-upadhyay1110 can you check if this does the same as the 'dialog' close (x)`? If so I would propose it to remove it (similar as the @xmarcux suggested)
- Discard: 'Discard unsaved changes`
- Overwrite: This button's label is bogus because it means something different than what it really does:
Document has been changed in storage. What would you like to do with your unsaved changes?ifOverwriteis an answer than it would be overwrite unsaved changes which is doesn't make sense and it's not what that button does. Proposal to rename it toOverwrite storage - Save to new file: This appears when
!this._map['wopi'].UserCanNotWriteRelative
- Message:
Document has been changed in storage. What would you like to do with your unsaved changes?seems also a bit confusing I propose to change that toDocument has been changed in storage. Saving your version of the document will overwrite changes made by others.
Here is what those changes would look like:
Here is the code pointer: showDocumentConflictPopUp
buttonList.push({ id: 'cancel-conflict-popup', text: _('Cancel') });
callbackList.push({ id: 'cancel-conflict-popup', func_: null });
buttonList.push({ id: 'discard-button', text: _('Discard') });
buttonList.push({ id: 'overwrite-button', text: _('Overwrite') });
callbackList.push({id: 'discard-button', func_: function() {
this.sendMessage('closedocument');
}.bind(this) });
callbackList.push({id: 'overwrite-button', func_: function() {
this.sendMessage('savetostorage force=1'); }.bind(this)
});
if (!this._map['wopi'].UserCanNotWriteRelative) {
buttonList.push({ id: 'save-to-new-file', text: _('Save to new file') });
callbackList.push({ id: 'save-to-new-file', func_: function() {
var filename = this._map['wopi'].BaseFileName;
if (filename) {
filename = L.LOUtil.generateNewFileName(filename, '_new');
this._map.saveAs(filename);
}
}.bind(this)});
}
var title = _('Document has been changed');
var message = _('Document has been changed in storage. What would you like to do with your unsaved changes?');
this._map.uiManager.showModalWithCustomButtons('document-conflict-popup', title, message, false, buttonList, callbackList);
}
</details>
Cancel: @Darshan-upadhyay1110 can you check if this does the same as the 'dialog' close (x)`? If so I would propose it to remove it (similar as the @xmarcux suggested)
I have just tested this and @xmarcux you are right this is duplication of functionality here. We can remove cancel button from this Dialog.
CC: @pedropintosilva
I have revisited this topic yesterday. There were some inputs from @juliusknorr and @jancborchardt.
1st Step
Also WRT the following suggestion:
I think we could for the left button lead with the word Save so: Save and overwrite because it's more simple to understand since it avoids leading with Overwrite (and even worst paired with over the top "Storage" jargon)
So, that ^ could be a nice 1st step.
2nd Step
For the 2nd step, it would be nice to show to the user a thumbnail for each version (storage and user's version) accompanied with the date,time. Similar as it happens in Nextcloud:
3rd Step
For the 3rd step to actually display the 2 documents side by side as it happens on Nextcloud text:
Or even how it happens already with Nextcloud Office when the user presses the comparing feature: