[ARVADOS-WORKBENCH2] updated: 2.1.0-118-g936570fa

Git user git at public.arvados.org
Tue Dec 1 21:27:04 UTC 2020


Summary of changes:
 cypress/integration/collection-panel.spec.js             | 10 +++++-----
 src/components/icon/icon.tsx                             |  2 +-
 .../collection-panel-files-actions.ts                    |  4 ++--
 src/store/collections/collection-version-actions.ts      | 16 ++++++++--------
 ...cover-version-dialog.ts => restore-version-dialog.ts} |  8 ++++----
 .../context-menu/action-sets/collection-action-set.ts    | 10 +++++-----
 src/views/workbench/workbench.tsx                        |  4 ++--
 7 files changed, 27 insertions(+), 27 deletions(-)
 rename src/views-components/collections-dialog/{recover-version-dialog.ts => restore-version-dialog.ts} (70%)

       via  936570facff4156f83d1b0fcbb0bedd1126efc03 (commit)
      from  0baba06bd4e871d95e5c8678df01d00f395c8feb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 936570facff4156f83d1b0fcbb0bedd1126efc03
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Tue Dec 1 18:26:32 2020 -0300

    17098: Improves wording on the "Restore version" action.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/cypress/integration/collection-panel.spec.js b/cypress/integration/collection-panel.spec.js
index 183a3636..980c5505 100644
--- a/cypress/integration/collection-panel.spec.js
+++ b/cypress/integration/collection-panel.spec.js
@@ -355,7 +355,7 @@ describe('Collection panel tests', function() {
             // Check that only old collection action are available on context menu
             cy.get('[data-cy=collection-panel-options-btn]').click();
             cy.get('[data-cy=context-menu]')
-                .should('contain', 'Recover version')
+                .should('contain', 'Restore version')
                 .and('not.contain', 'Add to favorites');
             cy.get('body').click(); // Collapse the menu avoiding details panel expansion
 
@@ -371,7 +371,7 @@ describe('Collection panel tests', function() {
 
             // Check that old collection action isn't available on context menu
             cy.get('[data-cy=collection-panel-options-btn]').click()
-            cy.get('[data-cy=context-menu]').should('not.contain', 'Recover version')
+            cy.get('[data-cy=context-menu]').should('not.contain', 'Restore version')
             cy.get('body').click(); // Collapse the menu avoiding details panel expansion
 
             // Make another change, confirm new version.
@@ -409,13 +409,13 @@ describe('Collection panel tests', function() {
                 .and('not.contain', 'Edit collection');
             cy.get('body').click();
 
-            // Recover first version
+            // Restore first version
             cy.get('[data-cy=collection-version-browser]').within(() => {
                 cy.get('[data-cy=collection-version-browser-select-1]').click();
             });
             cy.get('[data-cy=collection-panel-options-btn]').click()
-            cy.get('[data-cy=context-menu]').contains('Recover version').click();
-            cy.get('[data-cy=confirmation-dialog]').should('contain', 'Recover version');
+            cy.get('[data-cy=context-menu]').contains('Restore version').click();
+            cy.get('[data-cy=confirmation-dialog]').should('contain', 'Restore version');
             cy.get('[data-cy=confirmation-dialog-ok-btn]').click();
             cy.get('[data-cy=collection-info-panel]')
                 .should('not.contain', 'This is an old version');
diff --git a/src/components/icon/icon.tsx b/src/components/icon/icon.tsx
index dbb4ccec..ffba2876 100644
--- a/src/components/icon/icon.tsx
+++ b/src/components/icon/icon.tsx
@@ -130,7 +130,7 @@ export const RemoveIcon: IconType = (props) => <Delete {...props} />;
 export const RemoveFavoriteIcon: IconType = (props) => <Star {...props} />;
 export const PublicFavoriteIcon: IconType = (props) => <Public {...props} />;
 export const RenameIcon: IconType = (props) => <Edit {...props} />;
-export const RecoverVersionIcon: IconType = (props) => <FlipToFront {...props} />;
+export const RestoreVersionIcon: IconType = (props) => <FlipToFront {...props} />;
 export const RestoreFromTrashIcon: IconType = (props) => <RestoreFromTrash {...props} />;
 export const ReRunProcessIcon: IconType = (props) => <Cached {...props} />;
 export const SearchIcon: IconType = (props) => <Search {...props} />;
diff --git a/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts b/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
index 3f9948fc..80d61ea0 100644
--- a/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
+++ b/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
@@ -42,10 +42,10 @@ export const loadCollectionFiles = (uuid: string) =>
             const mapped = mapTreeValues(services.collectionService.extendFileURL)(sorted);
             dispatch(collectionPanelFilesAction.SET_COLLECTION_FILES(mapped));
             dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_PANEL_LOAD_FILES));
-        }).catch(e => {
+        }).catch(() => {
             dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_PANEL_LOAD_FILES));
             dispatch(snackbarActions.OPEN_SNACKBAR({
-                message: `Error getting file list: ${e.errors[0]}`,
+                message: `Error getting file list`,
                 hideDuration: 2000,
                 kind: SnackbarKind.ERROR }));
         });
diff --git a/src/store/collections/collection-version-actions.ts b/src/store/collections/collection-version-actions.ts
index fe8bd2d1..5bf47497 100644
--- a/src/store/collections/collection-version-actions.ts
+++ b/src/store/collections/collection-version-actions.ts
@@ -10,22 +10,22 @@ import { resourcesActions } from "../resources/resources-actions";
 import { navigateTo } from "../navigation/navigation-action";
 import { dialogActions } from "../dialog/dialog-actions";
 
-export const COLLECTION_RECOVER_VERSION_DIALOG = 'collectionRecoverVersionDialog';
+export const COLLECTION_RESTORE_VERSION_DIALOG = 'collectionRestoreVersionDialog';
 
-export const openRecoverCollectionVersionDialog = (uuid: string) =>
+export const openRestoreCollectionVersionDialog = (uuid: string) =>
     (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         dispatch(dialogActions.OPEN_DIALOG({
-            id: COLLECTION_RECOVER_VERSION_DIALOG,
+            id: COLLECTION_RESTORE_VERSION_DIALOG,
             data: {
-                title: 'Recover version',
-                text: "Do you want to make this the new collection's head version? If you don't want to modify the current head version, you can just make a copy.",
-                confirmButtonLabel: 'Recover',
+                title: 'Restore version',
+                text: "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.",
+                confirmButtonLabel: 'Restore',
                 uuid
             }
         }));
     };
 
-export const recoverVersion = (resourceUuid: string) =>
+export const restoreVersion = (resourceUuid: string) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         try {
             // Request que entire record because stored old versions usually
@@ -40,7 +40,7 @@ export const recoverVersion = (resourceUuid: string) =>
             dispatch<any>(navigateTo(headVersion.uuid));
         } catch (e) {
             dispatch(snackbarActions.OPEN_SNACKBAR({
-                message: `Couldn't recover version: ${e.errors[0]}`,
+                message: `Couldn't restore version: ${e.errors[0]}`,
                 hideDuration: 2000,
                 kind: SnackbarKind.ERROR
             }));
diff --git a/src/views-components/collections-dialog/recover-version-dialog.ts b/src/views-components/collections-dialog/restore-version-dialog.ts
similarity index 70%
rename from src/views-components/collections-dialog/recover-version-dialog.ts
rename to src/views-components/collections-dialog/restore-version-dialog.ts
index 0da9ed17..efd79895 100644
--- a/src/views-components/collections-dialog/recover-version-dialog.ts
+++ b/src/views-components/collections-dialog/restore-version-dialog.ts
@@ -6,16 +6,16 @@ import { Dispatch, compose } from 'redux';
 import { connect } from "react-redux";
 import { ConfirmationDialog } from "~/components/confirmation-dialog/confirmation-dialog";
 import { withDialog, WithDialogProps } from "~/store/dialog/with-dialog";
-import { COLLECTION_RECOVER_VERSION_DIALOG, recoverVersion } from '~/store/collections/collection-version-actions';
+import { COLLECTION_RESTORE_VERSION_DIALOG, restoreVersion } from '~/store/collections/collection-version-actions';
 
 const mapDispatchToProps = (dispatch: Dispatch, props: WithDialogProps<any>) => ({
     onConfirm: () => {
         props.closeDialog();
-        dispatch<any>(recoverVersion(props.data.uuid));
+        dispatch<any>(restoreVersion(props.data.uuid));
     }
 });
 
-export const RecoverCollectionVersionDialog = compose(
-    withDialog(COLLECTION_RECOVER_VERSION_DIALOG),
+export const RestoreCollectionVersionDialog = compose(
+    withDialog(COLLECTION_RESTORE_VERSION_DIALOG),
     connect(null, mapDispatchToProps)
 )(ConfirmationDialog);
\ No newline at end of file
diff --git a/src/views-components/context-menu/action-sets/collection-action-set.ts b/src/views-components/context-menu/action-sets/collection-action-set.ts
index d32eaa3f..4a6c910b 100644
--- a/src/views-components/context-menu/action-sets/collection-action-set.ts
+++ b/src/views-components/context-menu/action-sets/collection-action-set.ts
@@ -17,7 +17,7 @@ import {
     AdvancedIcon,
     OpenIcon,
     Link,
-    RecoverVersionIcon
+    RestoreVersionIcon
 } from "~/components/icon/icon";
 import { openCollectionUpdateDialog } from "~/store/collections/collection-update-actions";
 import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
@@ -29,7 +29,7 @@ import { openSharingDialog } from '~/store/sharing-dialog/sharing-dialog-actions
 import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
 import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action';
 import { copyToClipboardAction, openInNewTabAction } from "~/store/open-in-new-tab/open-in-new-tab.actions";
-import { openRecoverCollectionVersionDialog } from "~/store/collections/collection-version-actions";
+import { openRestoreCollectionVersionDialog } from "~/store/collections/collection-version-actions";
 import { TogglePublicFavoriteAction } from "../actions/public-favorite-action";
 import { togglePublicFavorite } from "~/store/public-favorites/public-favorites-actions";
 import { publicFavoritePanelActions } from "~/store/public-favorites-panel/public-favorites-action";
@@ -139,10 +139,10 @@ export const oldCollectionVersionActionSet: ContextMenuActionSet = [
     [
         ...commonActionSet.reduce((prev, next) => prev.concat(next), []),
         {
-            icon: RecoverVersionIcon,
-            name: 'Recover version',
+            icon: RestoreVersionIcon,
+            name: 'Restore version',
             execute: (dispatch, { uuid }) => {
-                dispatch<any>(openRecoverCollectionVersionDialog(uuid));
+                dispatch<any>(openRestoreCollectionVersionDialog(uuid));
             }
         },
     ]
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 8e47a739..9f4a5cb5 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -99,7 +99,7 @@ import { CollectionsContentAddressPanel } from '~/views/collection-content-addre
 import { AllProcessesPanel } from '../all-processes-panel/all-processes-panel';
 import { NotFoundPanel } from '../not-found-panel/not-found-panel';
 import { AutoLogout } from '~/views-components/auto-logout/auto-logout';
-import { RecoverCollectionVersionDialog } from '~/views-components/collections-dialog/recover-version-dialog';
+import { RestoreCollectionVersionDialog } from '~/views-components/collections-dialog/restore-version-dialog';
 
 type CssRules = 'root' | 'container' | 'splitter' | 'asidePanel' | 'contentWrapper' | 'content';
 
@@ -236,7 +236,7 @@ export const WorkbenchPanel =
             <ProcessCommandDialog />
             <ProcessInputDialog />
             <ProjectPropertiesDialog />
-            <RecoverCollectionVersionDialog />
+            <RestoreCollectionVersionDialog />
             <RemoveApiClientAuthorizationDialog />
             <RemoveComputeNodeDialog />
             <RemoveGroupDialog />

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list