Vscode-extension-for-zowe: FR: Make Safe Save as the Default

Created on 23 Jul 2019  路  7Comments  路  Source: zowe/vscode-extension-for-zowe

I recommend that we make Safe Save the default when saving files in the VS Code plugin. This would simplify the interaction so that we wouldn't need a second option in the context menu. Safe Save ensures there are merges whereas the default save (ctrl+s) will overwrite a changed file. IMHO, it is better to merge than not.

image

In the short term, sticking with what we have, I recommend changing the text in the context menu by replacing the dash with a comma. With the comma, users are likely to read the two words as one, for example safe SaveMerge if necessary. A comma is read as a pause to separate phrases.

  • Safe Save - Merge if necessary
  • Safe Save, Merge if necessary

Here is an humorous example where a dash can be mis-read.
image

All 7 comments

@Colin-Stone - does "safe save" use Etag?

No it's a little peculiar. Just looking at the code it pulls the file back down again and VSCode appears to take over and realizes that the files are different. It the lets you decide if you want to open the compare editor which is neat.

done

We now have a single save. The user can press ctrl+S to save.

FWIW, this is what the user sees when trying to save and the system detects a merge conflict wherein a change was made to the MF in the meantime. This gives them a avenue to resolve the conflicts. I'm a little uncertain about the message "The content of the file is newer" because it sounds like the local file is newer but I'm guessing it is the remote file.

image

It looks like the warning and error message should be combined... perhaps change the text of the error message to:
Failed to save 'DUMAL01.TEST1' because the remote file has been modified. Please compare your changes with the current remote version.

I only added the warning message. The error message is generated automatically by VS Code. Need to look into that if we want to change the wording 馃槃

I like Mike's suggestion for the warning.

Was this page helpful?
0 / 5 - 0 ratings