feat: adds copy file support to file explorer and fixes rename bug#1491
feat: adds copy file support to file explorer and fixes rename bug#1491
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1491 +/- ##
==========================================
- Coverage 45.77% 45.76% -0.02%
==========================================
Files 517 517
Lines 35116 35159 +43
Branches 8792 8799 +7
==========================================
+ Hits 16076 16092 +16
- Misses 18989 19016 +27
Partials 51 51
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
mofojed
left a comment
There was a problem hiding this comment.
Still a case that fails:
- Right-click a file and select Copy File
- Right-click the new copy and select Delete
It'll try and delete the old file.
Or another case:
- Right-click file, click Delete
- Right-click the now focused file, click Delete
I think when the list updates, we need to update the focusedFilePath as well, since in the above cases the selection change isn't firing again.
Co-authored-by: Mike Bender <mikebender@deephaven.io>
I was firing the selection change again when the viewport updated, but re-using the handleSelectionChange wasn't re-fetching the items because the selected range didn't change. I added a force param, but open to better ways of doing it. |
mofojed
left a comment
There was a problem hiding this comment.
This is fine... I think technically we could just use memoization to do the selected items, but no need to change all that and possibly introduce other bugs.
Fixes #185, Fixes #1375, Fixes #1488 and other issues with File Explorer
Fixes issue where you couldn't rename a renamed item, and then can't use context menu at all on file explorer.
Fixes issue where triggering a tooltip while renaming would re-render and exit edit mode.
Wires up copy, new file, new folder in context menu.
Renames copy -> copy file