nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
2.89k stars 771 forks source link

Please implement locking on macOS-vfs builds #6716

Open marcotrevisan opened 1 month ago

marcotrevisan commented 1 month ago

Please implement locking on macOS-vfs builds.

Client version 3.13.0-macOS-vfs is missing the lock and unlock behaviour. In my humble opinion this feature should be a top level item in the list of the next things to implement for Mac OS VFS.

My idea of the functionality, for it to be useful, would be:

  1. "lock on Office file open" and "unlock on Office file close". Feel free to remove the "Office" word from the previous sentences.
  2. Have a context menu item in Finder to manually lock and unlock.
  3. Show a lock icon on a locked file, along with the lock owner username (or maybe the first X characters of it...) decorating the file name in Finder, highlighted with some color if possible. If the username is not easy to show, a tooltip may do! Please don't underestimate this point: a clearly visible and highlighted lock information will be spotted by the user before opening the file, and there will be less need for a custom popup on file open, like other popular vendors do.
  4. Also show the locker username in the context menu as a first level citizen.
  5. (Perhaps unnecessary if point 3 is implemented) For Office files: have a custom popup on file open warning the user that the file is locked. A subsequent popup should then arise when the file is unlocked... this also implies making the file writable again and reopening it.

@claucambra it may seem much stuff but points 1..4 are very important in my humble opinion, and points 1-2 are essential.

Thanks!

claucambra commented 1 month ago

Hi @marcotrevisan this is indeed planned, just have not gotten round to this yet :)

marcotrevisan commented 1 month ago

Thank you very much for getting back to me @claucambra! I wanted to add my contribution to the project by trying to write some requirements that sounded good to me... I hope they're reasonable for you too ;-)

claucambra commented 3 days ago

Sync engine file locking mechanics are now done in https://github.com/claucambra/NextcloudFileProviderKit with https://github.com/claucambra/NextcloudFileProviderKit/pull/2

Now we need to hook this stuff up within the client and make the proper calls to the server via the File Provider module