Project

General

Profile

Actions

Idea #11365

closed

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

Added by Tom Morris almost 7 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
-
Target version:
Story points:
1.0

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 1 (0 open1 closed)

Task #11384: Review branch 11365-collection-lock-buttonResolvedRadhika Chippada03/29/2017Actions
Actions #1

Updated by Radhika Chippada almost 7 years ago

  • Assigned To 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.

Actions #2

Updated by Radhika Chippada almost 7 years ago

  • Story points set to 1.0
Actions #3

Updated by Radhika Chippada almost 7 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Radhika Chippada almost 7 years 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/

Actions #5

Updated by Lucas Di Pentima almost 7 years 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?
Actions #7

Updated by Radhika Chippada almost 7 years ago

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

Applied in changeset arvados|commit:00573cf7d28472bf926e8f610a256cd991879c8b.

Actions

Also available in: Atom PDF