Story #11365

[Workbench] Add lock button for collection display to enable rename & delete

Added by Tom Morris about 1 month ago. Updated 16 days ago.

Status:ResolvedStart date:03/29/2017
Priority:NormalDue date:
Assignee:Radhika Chippada% Done:

100%

Category:-
Target version:2017-04-12 sprint
Story points1.0Remaining (hours)0.00 hour
Velocity based estimate-

Description

Because renaming or deleting a file changes the portable data hash of a collection, we want to warn the user of the consequences before allowing them to do that.

The proposed mechanism is a lock icon which defaults to locked and when clicked to unlock pops up a warning dialog that the user needs to dismiss.

Text of warning dialog - "Changing the contents of the collection, including renaming files, will change its Portable Data Hash (PDH)"
OK = unlock and enable file delete & rename
Cancel = collection remains locked


Subtasks

Task #11384: Review branch 11365-collection-lock-buttonResolvedRadhika Chippada

Associated revisions

Revision 00573cf7
Added by Radhika Chippada 16 days ago

closes #11365
Merge branch '11365-collection-lock-button'

History

#1 Updated by Radhika Chippada about 1 month ago

  • Assignee set to Radhika Chippada

The lock / unlock is at UI level only. For ex: if I unlock, and close the browser and reopen in a new browser, the collection will be in "locked" state again.

When the collection is "locked", the file trash and pencil icons, and Upload tab should be either hidden or disabled.

#2 Updated by Radhika Chippada about 1 month ago

  • Story points set to 1.0

#3 Updated by Radhika Chippada 18 days ago

  • Status changed from New to In Progress

#4 Updated by Radhika Chippada 17 days ago

Branch 11365-collection-lock-button implements:

  • Add a "lock" button for collection#show page with confirmation dialog
  • On collection page load, (since the collection is in locked state on page load), disable the Upload tab, the pencil icons on files (rename option) and trash icon on files
  • On unlock, they are enabled and accessible
  • When the collection is locked, the drop down button "Selection... "-> "Remove selected files" is disabled even when one or more files are selected using the checkbox(es). Only when the collection is "unlocked" this selection option is enabled (if one or more files are selected)
    • One caveat here is that if the user clicks on the checkboxes and clicks on Selection... and then goes and unlocks the collection, this button event will not be fired and will need the user to toggle one or more checkboxes to re-fire the event
    • Another caveat is with the Upload tab. If a user clicks on lock and unlocks the collection, transitions into the Upload tab and then goes and locks the collection again, the user can still work in the Upload tab (since he was already here). It doesn't seem like putting in effort to prevent this edge case is worth the while

Test run @ https://ci.curoverse.com/job/developer-run-tests/230/

#5 Updated by Lucas Di Pentima 17 days ago

Some cosmetic questions:

  • Seems to me that the lock/unlock icon is too small in comparison to the buttons on its side. It may be difficult to spot by the users, if we don’t have any bigger icon, maybe we can place it on the left side so it’s more visible?
  • Can the lock icon have a tooltip explaining its purpose? Or maybe the disabled buttons to have an alternate tooltip to explain why they’re disabled?
  • Typo on the user warning: ‘portalble'
  • apps/workbench/test/integration/collections_test.rb:377 - Typo on the test name
  • Can the unlock code on the tests be moved somewhere to be reused as a func?

#6 Updated by Lucas Di Pentima 16 days ago

#7 Updated by Radhika Chippada 16 days ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:00573cf7d28472bf926e8f610a256cd991879c8b.

Also available in: Atom PDF