[arvados-workbench2] updated: 2.7.0-201-g1e9f0183

git repository hosting git at public.arvados.org
Wed Nov 15 14:48:18 UTC 2023


Summary of changes:
 src/components/multiselect-toolbar/MultiselectToolbar.tsx          | 6 +++---
 .../multiselect-toolbar/ms-kind-action-differentiator.ts           | 2 +-
 .../multiselect-toolbar/ms-collection-action-set.ts                | 7 +++++--
 src/views-components/multiselect-toolbar/ms-menu-action-set.ts     | 1 +
 src/views-components/multiselect-toolbar/ms-process-action-set.ts  | 7 +++++--
 src/views-components/multiselect-toolbar/ms-project-action-set.ts  | 4 ++++
 6 files changed, 19 insertions(+), 8 deletions(-)

       via  1e9f0183c391aa5c33a827a0429da60bc97b0905 (commit)
      from  a3e219187463e72f0023873cf86150117da779c7 (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 1e9f0183c391aa5c33a827a0429da60bc97b0905
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Wed Nov 15 09:48:14 2023 -0500

    21128: added isForMulti flag Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/src/components/multiselect-toolbar/MultiselectToolbar.tsx b/src/components/multiselect-toolbar/MultiselectToolbar.tsx
index a3b4f725..73454689 100644
--- a/src/components/multiselect-toolbar/MultiselectToolbar.tsx
+++ b/src/components/multiselect-toolbar/MultiselectToolbar.tsx
@@ -13,8 +13,8 @@ import { ContextMenuResource } from "store/context-menu/context-menu-actions";
 import { Resource, extractUuidKind } from "models/resource";
 import { getResource } from "store/resources/resources";
 import { ResourcesState } from "store/resources/resources";
-import { MultiSelectMenuAction, MultiSelectMenuActionNames } from "views-components/multiselect-toolbar/ms-menu-action-set";
-import { ContextMenuAction, ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
+import { MultiSelectMenuAction, MultiSelectMenuActionSet, MultiSelectMenuActionNames } from "views-components/multiselect-toolbar/ms-menu-action-set";
+import { ContextMenuAction } from "views-components/context-menu/context-menu-action-set";
 import { multiselectActionsFilters, TMultiselectActionsFilters } from "./ms-toolbar-action-filters";
 import { kindToActionSet, findActionByName } from "./ms-kind-action-differentiator";
 import { msToggleTrashAction } from "views-components/multiselect-toolbar/ms-project-action-set";
@@ -131,7 +131,7 @@ function groupByKind(checkedList: TCheckedList, resources: ResourcesState): Reco
     return result;
 }
 
-function filterActions(actionArray: ContextMenuActionSet, filters: Set<string>): Array<ContextMenuAction> {
+function filterActions(actionArray: MultiSelectMenuActionSet, filters: Set<string>): Array<MultiSelectMenuAction> {
     return actionArray[0].filter(action => filters.has(action.name as string));
 }
 
diff --git a/src/components/multiselect-toolbar/ms-kind-action-differentiator.ts b/src/components/multiselect-toolbar/ms-kind-action-differentiator.ts
index f514a078..74593ac7 100644
--- a/src/components/multiselect-toolbar/ms-kind-action-differentiator.ts
+++ b/src/components/multiselect-toolbar/ms-kind-action-differentiator.ts
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { ResourceKind } from "models/resource";
-import { MultiSelectMenuAction , MultiSelectMenuActionSet} from "views-components/multiselect-toolbar/ms-menu-action-set";
+import { MultiSelectMenuActionSet} from "views-components/multiselect-toolbar/ms-menu-action-set";
 import { msCollectionActionSet } from "views-components/multiselect-toolbar/ms-collection-action-set";
 import { msProjectActionSet } from "views-components/multiselect-toolbar/ms-project-action-set";
 import { msProcessActionSet } from "views-components/multiselect-toolbar/ms-process-action-set";
diff --git a/src/views-components/multiselect-toolbar/ms-collection-action-set.ts b/src/views-components/multiselect-toolbar/ms-collection-action-set.ts
index b0a2a1b0..51e21592 100644
--- a/src/views-components/multiselect-toolbar/ms-collection-action-set.ts
+++ b/src/views-components/multiselect-toolbar/ms-collection-action-set.ts
@@ -2,19 +2,20 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
 import { MoveToIcon, CopyIcon } from "components/icon/icon";
 import { openMoveCollectionDialog } from "store/collections/collection-move-actions";
 import { openCollectionCopyDialog, openMultiCollectionCopyDialog } from "store/collections/collection-copy-actions";
 import { ToggleTrashAction } from "views-components/context-menu/actions/trash-action";
 import { toggleCollectionTrashed } from "store/trash/trash-actions";
 import { ContextMenuResource } from "store/context-menu/context-menu-actions";
+import { MultiSelectMenuActionSet } from "./ms-menu-action-set";
 
-export const msCollectionActionSet: ContextMenuActionSet = [
+export const msCollectionActionSet: MultiSelectMenuActionSet = [
     [
         {
             icon: CopyIcon,
             name: "Make a copy",
+            isForMulti: true,
             execute: (dispatch, [...resources]) => {
                 if (resources[0].fromContextMenu || resources.length === 1) dispatch<any>(openCollectionCopyDialog(resources[0]));
                 else dispatch<any>(openMultiCollectionCopyDialog(resources[0]));
@@ -23,11 +24,13 @@ export const msCollectionActionSet: ContextMenuActionSet = [
         {
             icon: MoveToIcon,
             name: "Move to",
+            isForMulti: true,
             execute: (dispatch, resources) => dispatch<any>(openMoveCollectionDialog(resources[0])),
         },
         {
             component: ToggleTrashAction,
             name: "ToggleTrashAction",
+            isForMulti: true,
             execute: (dispatch, resources: ContextMenuResource[]) => {
                 for (const resource of [...resources]) {
                     dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!));
diff --git a/src/views-components/multiselect-toolbar/ms-menu-action-set.ts b/src/views-components/multiselect-toolbar/ms-menu-action-set.ts
index 1cc3c12e..db184d26 100644
--- a/src/views-components/multiselect-toolbar/ms-menu-action-set.ts
+++ b/src/views-components/multiselect-toolbar/ms-menu-action-set.ts
@@ -21,6 +21,7 @@ export interface MultiSelectMenuAction extends ContextMenuAction {
     altText?: string;
     altIcon?: IconType;
     isDefault?: (uuid: string | null, resources: ResourcesState, favorites) => boolean;
+    isForMulti: boolean;
 }
 
 export type MultiSelectMenuActionSet = Array<Array<MultiSelectMenuAction>>;
diff --git a/src/views-components/multiselect-toolbar/ms-process-action-set.ts b/src/views-components/multiselect-toolbar/ms-process-action-set.ts
index 820fc799..28f97c42 100644
--- a/src/views-components/multiselect-toolbar/ms-process-action-set.ts
+++ b/src/views-components/multiselect-toolbar/ms-process-action-set.ts
@@ -2,17 +2,18 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
 import { MoveToIcon, RemoveIcon, ReRunProcessIcon } from "components/icon/icon";
 import { openMoveProcessDialog } from "store/processes/process-move-actions";
 import { openCopyProcessDialog } from "store/processes/process-copy-actions";
 import { openRemoveProcessDialog } from "store/processes/processes-actions";
+import { MultiSelectMenuActionSet } from "./ms-menu-action-set";
 
-export const msProcessActionSet: ContextMenuActionSet = [
+export const msProcessActionSet: MultiSelectMenuActionSet = [
     [
         {
             icon: ReRunProcessIcon,
             name: "Copy and re-run process",
+            isForMulti: true,
             execute: (dispatch, resources) => {
                 for (const resource of [...resources]) {
                     dispatch<any>(openCopyProcessDialog(resource));
@@ -22,6 +23,7 @@ export const msProcessActionSet: ContextMenuActionSet = [
         {
             icon: MoveToIcon,
             name: "Move to",
+            isForMulti: true,
             execute: (dispatch, resources) => {
                 dispatch<any>(openMoveProcessDialog(resources[0]));
             },
@@ -29,6 +31,7 @@ export const msProcessActionSet: ContextMenuActionSet = [
         {
             name: "Remove",
             icon: RemoveIcon,
+            isForMulti: true,
             execute: (dispatch, resources) => {
                 dispatch<any>(openRemoveProcessDialog(resources[0], resources.length));
             },
diff --git a/src/views-components/multiselect-toolbar/ms-project-action-set.ts b/src/views-components/multiselect-toolbar/ms-project-action-set.ts
index 0a1b1c5d..d3579e55 100644
--- a/src/views-components/multiselect-toolbar/ms-project-action-set.ts
+++ b/src/views-components/multiselect-toolbar/ms-project-action-set.ts
@@ -20,6 +20,7 @@ export const msToggleFavoriteAction = {
     altText: 'Remove from Favorites',
     icon: AddFavoriteIcon,
     altIcon: RemoveFavoriteIcon,
+    isForMulti: false,
     isDefault: (uuid, resources, favorites)=>{
         return !checkFavorite(uuid, favorites);
     },
@@ -33,6 +34,7 @@ export const msToggleFavoriteAction = {
 export const msCopyToClipboardMenuAction = {
     icon: Link,
     name: MultiSelectMenuActionNames.COPY_TO_CLIPBOARD,
+    isForMulti: false,
     execute: (dispatch, resources) => {
         dispatch(copyToClipboardAction(resources));
     },
@@ -41,6 +43,7 @@ export const msCopyToClipboardMenuAction = {
 export const msMoveToAction = {
     icon: MoveToIcon,
     name: MultiSelectMenuActionNames.MOVE_TO,
+    isForMulti: true,
     execute: (dispatch, resource) => {
         dispatch(openMoveProjectDialog(resource[0]));
     },
@@ -52,6 +55,7 @@ export const msToggleTrashAction = {
     altText: 'Restore from Trash',
     icon: TrashIcon,
     altIcon: RestoreFromTrashIcon,
+    isForMulti: true,
     isDefault: (uuid, resources, favorites = []) => {
         return uuid ? !(getResource(uuid)(resources) as any).isTrashed : true;
     },

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list