-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allows files/folders to be copied. #6014
Conversation
@tcitworld, thanks for your PR! By analyzing the history of the files in this pull request, we identified @noveens, @PVince81 and @butonic to be potential reviewers. |
apps/files/js/filelist.js
Outdated
@@ -2000,10 +2072,94 @@ | |||
self.showFileBusyState($tr, false); | |||
}); | |||
}); | |||
if (callback) { | |||
callback(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dirty.
cc @danxuliu @tcitworld Could I ask you to split the "add copy" and the "move for selected files" into two PRs? Then we could work on them in parallel and one does not block the other feature. |
Yup, will do that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! However I would really like an addition like that to only come in with the design as specified at #3206 (comment)
Could you adjust it to that? :)
8fb4750
to
b6b9244
Compare
Codecov Report
@@ Coverage Diff @@
## master #6014 +/- ##
===========================================
- Coverage 53.43% 53.4% -0.03%
Complexity 22545 22545
===========================================
Files 1408 1408
Lines 87210 87260 +50
Branches 1328 1340 +12
===========================================
+ Hits 46601 46604 +3
- Misses 40609 40656 +47
|
Looks like this @jancborchardt |
@tcitworld nice! :) Was just mentioning it in the design lightning talk today. ;) Is the menu also changed to say »Move or Copy«? (Will test the whole flow later) |
apps/files/js/fileactions.js
Outdated
name: 'Move', | ||
displayName: t('files', 'Move'), | ||
name: 'CopyMove', | ||
displayName: t('files', 'Copy or Move'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a tiny one: First move, then copy. So »Move or copy« :) (with small _c_opy)
apps/files/templates/list.php
Outdated
<span class="icon icon-external"></span> | ||
<span><?php p($l->t('Copy'))?></span> | ||
<span><?php p($l->t('Copy or Move'))?></span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, »Move or copy« :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good otherwise
core/js/oc-dialogs.js
Outdated
}; | ||
|
||
var copyCallback = function () { | ||
console.log('copy callback'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover debug statement
apps/files/templates/list.php
Outdated
@@ -47,6 +47,10 @@ | |||
</label> | |||
<a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a> | |||
<span id="selectedActionsList" class="selectedActions"> | |||
<a href="" class="copy-move"> | |||
<span class="icon icon-external"></span> | |||
<span><?php p($l->t('Copy or Move'))?></span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing here as @jancborchardt said
Changed move and copy
2684dc3
to
26a1120
Compare
Rebased now that #6273 is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works great 👍
👍 from my side. What about the failing tests @tcitworld @MorrisJobke? |
Those are timeouts, that are solved in current master/stable12 and this is simply from an older version of them. In the future they should not happen at all (or at least not that often anymore). |
What about those pending items? @tcitworld Could you add at least some tests for this? |
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
…older sizes Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
26a1120
to
8c576a8
Compare
I added tests and fixed a behaviour where failed copy actions were also counted as successful. Please review again. |
@tcitworld looks like the commits should be squashed into one? :) Also, there’s some Drone failures |
The failure was in an acceptance test... that should not have failed (I have run the test in local and it worked fine). Restarting the build will hopefully make the failure to go away (although I will have to study the failure in detail anyway; I hope it does not appear too frequently in Drone until then :-S ). |
Nice work @tcitworld. Thanks. |
Yup, great work @tcitworld :) |
Adds a Copy action in the file action menu.
This also enables copy
and moveactions on selected files.I know this is not how @jancborchardt designed it here, and that the files_clipboard app is being developed but hey, this works for me, so it might be worth a look. :)
Ref. #3206
Needs :
Copy action iconThe move feature has been moved at #6273