Project

General

Profile

Actions

Bug #17098

closed

Collection "restore from previous version" button

Added by Peter Amstutz over 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench2
Target version:
Story points:
-
Release relationship:
Auto

Subtasks 1 (0 open1 closed)

Task #17140: Review 17098-old-version-as-headResolvedPeter Amstutz11/25/2020Actions

Related issues

Related to Arvados - Idea #13494: Browse previous versions of a collectionResolvedLucas Di Pentima02/19/2020Actions
Actions #1

Updated by Peter Amstutz over 3 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Lucas Di Pentima over 3 years ago

  • Related to Idea #13494: Browse previous versions of a collection added
Actions #3

Updated by Lucas Di Pentima over 3 years ago

  • Target version set to 2020-11-18
  • Assigned To set to Lucas Di Pentima
Actions #4

Updated by Lucas Di Pentima over 3 years ago

  • Target version changed from 2020-11-18 to 2020-12-02 Sprint
Actions #5

Updated by Lucas Di Pentima over 3 years ago

As commented on https://dev.arvados.org/issues/13494#note-59, We'll be avoiding offering the "add to favorites" action on past versions as it isn't supported by the API server.

Actions #6

Updated by Lucas Di Pentima over 3 years ago

Updates at arvados-workbench2|673bf2ac - branch 17098-old-version-as-head
Test run: developer-tests-workbench2: #193

  • Refactored a function that is used to decide which kind of context menu to show. Its was being called differently from several places, sometimes returning inconsistent values.
  • Added 'Recover version' action for old collection versions.
  • Avoid offering the 'Add to favorites' action on old collection versions.
  • Updated tests.
Actions #7

Updated by Lucas Di Pentima over 3 years ago

Updates at arvados-workbench2|adc0008e
Test run: developer-tests-workbench2: #196

  • Merged latest master
  • Adjusted latest's master code on the refactored function.
Actions #8

Updated by Peter Amstutz over 3 years ago

How hard would it be to add a confirmation dialog? Someone might select the action not knowing what it does. The confirmation dialog could also explain that this command makes it the new "head" version, but if they want a copy to work on without modifying "head", they should use "make a copy".

Actions #9

Updated by Peter Amstutz over 3 years ago

Also, I don't want to get sidetracked on this, but the menu item ordering is odd.

I know that Danny changed it so the menu items are sorted alphabetically. This isn't optimal but at least it is consistent. However, the actions on the "current" version "Advanced"..."Share" sorted and then starts over with "Add to favorites"..."View details".

The whole thing should be sorted together.

Although, a better way to do this would be to create a master ordered list of actions (with similar actions grouped together intentionally) and adjust the ordering the items in each specific action menu from the position in the master list. Then we would get both consistent ordering and the ability to manually specify ordering to reflect categories or frequency of use.

Actions #10

Updated by Lucas Di Pentima over 3 years ago

Peter Amstutz wrote:

How hard would it be to add a confirmation dialog? Someone might select the action not knowing what it does. The confirmation dialog could also explain that this command makes it the new "head" version, but if they want a copy to work on without modifying "head", they should use "make a copy".

Confirmation dialog added at arvados-workbench2|b115fc74
Test run: developer-tests-workbench2: #198

Actions #11

Updated by Lucas Di Pentima over 3 years ago

Peter Amstutz wrote:

Also, I don't want to get sidetracked on this, but the menu item ordering is odd.

I know that Danny changed it so the menu items are sorted alphabetically. This isn't optimal but at least it is consistent. However, the actions on the "current" version "Advanced"..."Share" sorted and then starts over with "Add to favorites"..."View details".

The whole thing should be sorted together.

Although, a better way to do this would be to create a master ordered list of actions (with similar actions grouped together intentionally) and adjust the ordering the items in each specific action menu from the position in the master list. Then we would get both consistent ordering and the ability to manually specify ordering to reflect categories or frequency of use.

I've checked the code that does the sorting and it's correct in the sense that the sorting is done by action's names. Usually action's names are the same as the text being displayed on the context menu, but sometimes (on "toggle" type actions) the displayed text changes (example: Add/Remove to/from favorites) so in those cases the action's name is usually "ToggleActionType" and gets ordered by that.

Actions #12

Updated by Peter Amstutz over 3 years ago

Lucas Di Pentima wrote:

Peter Amstutz wrote:

How hard would it be to add a confirmation dialog? Someone might select the action not knowing what it does. The confirmation dialog could also explain that this command makes it the new "head" version, but if they want a copy to work on without modifying "head", they should use "make a copy".

Confirmation dialog added at arvados-workbench2|b115fc74
Test run: developer-tests-workbench2: #198

  1. I prefer the word "Restore" (which means to put something back) instead of "Recover" (which means to get something that was lost). So the menu item would be "Restore version".
  2. Change the dialog text a little bit:
    "This will copy the content of the selected version to the head. To make a new collection with the content of the selected version, use 'Make a copy' instead."
Actions #13

Updated by Lucas Di Pentima over 3 years ago

Updates at arvados-workbench2|936570fa
Test run: developer-tests-workbench2: #199

  • Renamed "recover version" to "restore version".
  • Changed the dialog's text.
  • Updated the integration test.
Actions #14

Updated by Peter Amstutz over 3 years ago

Lucas Di Pentima wrote:

Updates at arvados-workbench2|936570fa
Test run: developer-tests-workbench2: #199

  • Renamed "recover version" to "restore version".
  • Changed the dialog's text.
  • Updated the integration test.

Seem to be having a tough run of failing tests on jenkins, but otherwise this LGTM.

Actions #15

Updated by Lucas Di Pentima over 3 years ago

Successful test re-run: developer-tests-workbench2: #205

Merging, thanks!

Actions #16

Updated by Anonymous over 3 years ago

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

Updated by Peter Amstutz about 3 years ago

  • Release changed from 31 to 37
Actions

Also available in: Atom PDF