spacedrive icon indicating copy to clipboard operation
spacedrive copied to clipboard

[ENG-770 / ENG-773] Copy/paste / Explorer context menu duplicate

Open fogodev opened this issue 2 years ago • 5 comments

This PR fixes issues 770 and 773

fogodev avatar Jun 21 '23 18:06 fogodev

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
spacedrive-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 22, 2023 11:34pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
spacedrive-landing ⬜️ Ignored (Inspect) Visit Preview Jun 22, 2023 11:34pm

vercel[bot] avatar Jun 21 '23 18:06 vercel[bot]

Just tested this and everything seems to work. We do need to hide FS actions on Overview though.

utkubakir avatar Jun 21 '23 19:06 utkubakir

Just tested this and everything seems to work. We do need to hide FS actions on Overview though.

I am working on it, also fixing a small bug I found in this PR. Will commit all the changes here as they are related

HeavenVolkoff avatar Jun 22 '23 00:06 HeavenVolkoff

So, I added the checks for hiding the FS actions in the Overview and the MediaView. I also added error handling to all the actions in the context menus, so that the user has some feedback when things fail. The actions seem to be working as intended from what I could observe from my tests. However, there are 3 points we should look into (don't know if in this PR or another):

  1. Errors that occur in the paste action are not raised to the front. This happens due to the action running inside a job, which the API route does not wait for (which I think is on purpose). Maybe we should change this in the front to be some kind of subscription, so the user has some feedback if any error occurs when pasting files.

  2. ~Cutting files does not automatically update the file list in the destination. The file is removed from the origin, but only shows up in the destination after a re-scan~ (Fixed)

  3. Duplicate / Copying a file to the same folder, creates a suffixed copy of the file, however that only work once, as the suffix is hard-coded and it doesn't take into account other previous copies of the same file already present.

HeavenVolkoff avatar Jun 22 '23 02:06 HeavenVolkoff

I tried pretty hard to reproduce this faulty cut behavior but failed hard lol. Both on my Linux and Mac machines it works as expected.

Regarding the other points, they're more improvements than problems so we can address them later and we sholdn't postpone our alpha release anymore.

fogodev avatar Jun 22 '23 18:06 fogodev

Actually just found out, just happens on Linux if you cut and paste between different locations. It's a watcher bug

fogodev avatar Jun 22 '23 19:06 fogodev