Idea #3821
closed[Workbench] Delete and rename files in collections
Description
The "show collection" page (for a collection that is writable by the current user) should have the following features:
Copy files from another collectionsee #3177- Delete files
- Rename files
Move files to a different collection (maybe?)
Implemented in workbench using the existing Ruby SDK support. Trash can icons for delete & pencil icons for rename.
Updated by Peter Amstutz over 10 years ago
- Description updated (diff)
- Category set to Workbench
Updated by Peter Amstutz over 10 years ago
- Target version set to Arvados Future Sprints
Updated by Tom Clegg about 10 years ago
- Subject changed from [Workbench] Editing collections to [Workbench] Edit collections
Updated by Tom Clegg almost 10 years ago
- Target version changed from Arvados Future Sprints to 2015-02-18 sprint
Updated by Radhika Chippada almost 10 years ago
- Assigned To set to Radhika Chippada
Updated by Tom Clegg almost 10 years ago
- Target version changed from 2015-02-18 sprint to Arvados Future Sprints
Updated by Tom Clegg over 9 years ago
- Subject changed from [Workbench] Edit collections to [Workbench] Delete and rename files in collections
- Description updated (diff)
Updated by Tom Morris almost 8 years ago
- Target version changed from Arvados Future Sprints to 2017-04-12 sprint
Updated by Tom Morris almost 8 years ago
- Target version changed from 2017-04-12 sprint to 2017-03-29 sprint
Updated by Radhika Chippada almost 8 years ago
- Assigned To set to Radhika Chippada
Updated by Radhika Chippada over 7 years ago
- Status changed from New to In Progress
Updated by Radhika Chippada over 7 years ago
Branch 3821-collection-file-manage @ 07e060d
- Added a "Remove selected files" option to the Selection dropdown collection#show page. This allows multiple files to be selected and removed from a collection per request
- Added trash icon(s) to collection file row(s) in collection#show page. This allows removal of that particular file (row) from collection
- Added pencil icon(s) to collection file row(s) in collection#show page. This allows renaming of that particular file in the collection. This is implemented using the current "render_editable_attribute" with appropriate enhancements made to this method. The editable input box displays the full path of the file. The user is allowed to: just change the file name or move it to a different existing subdirectory or even to an entirely new subdirectory
- Added controller tests as well as (minimal required) integration tests
Test run @ https://ci.curoverse.com/job/developer-run-tests/215/
Updated by Lucas Di Pentima over 7 years ago
Some comments:
- File
apps/workbench/config/routes.rb
:- Related detail: Could you update the rest of the routes so that instead of using the “:on => :member” style, use the newer “on: :member” for consistency?
- File
apps/workbench/test/controllers/collections_controller_test.rb
:- Lines 644, 669, 693: Instead of asserting against a previously created string variable, wouldn’t be better to prove that the newly created collection’s manifest includes
0:0:file1
? - Line 683: I think that
assert_match
is proving that./file1
&./file2
exist, but doesn’t prove that./dir1/
is missing, maybe a$
is missing at the end of the regexp?
- Lines 644, 669, 693: Instead of asserting against a previously created string variable, wouldn’t be better to prove that the newly created collection’s manifest includes
- The pencil icon’s tooltip says “edit”, do you think it would be better to say “rename”?
- Renaming a file the same as another file, makes that other file to be deleted. Is that on purpose? If so, maybe we can ask the user for confirmation.
Updated by Radhika Chippada over 7 years ago
Could you update the rest of the routes so that instead of using the “:on => :member” style, use the newer “on: :member” for consistency?
It would be desirable that "all" references are updated and thoroughly tested. So, didn't want to go there at this time. Will note it for next time around.
File apps/workbench/test/controllers/collections_controller_test.rb: Lines 644, 669, 693: Instead of asserting against a previously created string variable, wouldn’t be better to prove that the newly created collection’s manifest includes 0:0:file1?
Good catch. Updated the assertions
Line 683: I think that assert_match is proving that ./file1 & ./file2 exist, but doesn’t prove that ./dir1/ is missing, maybe a $ is missing at the end of the regexp?
Added the missing $ and also added another assertion fir "dir1".
The pencil icon’s tooltip says “edit”, do you think it would be better to say “rename”?
Renaming a file the same as another file, makes that other file to be deleted. Is that on purpose? If so, maybe we can ask the user for confirmation.
I improved the tooltip on the pencil icon in detailed now. It now says the user can change the file path (name or dir or both) and may not use duplicate names.
Thanks.
Updated by Radhika Chippada over 7 years ago
- Status changed from In Progress to Resolved
- % Done changed from 33 to 100
Applied in changeset arvados|commit:2b27132d13fd72f29dbab2297f0d2dc1c110eed1.