[arvados] updated: 2.7.0-6578-g9ce49e908a

git repository hosting git at public.arvados.org
Thu May 16 18:10:14 UTC 2024


Summary of changes:
 .../context-menu/menu-item-sort.ts                 |  9 ++++++
 .../ms-user-details-action-set.ts                  | 36 +++++++---------------
 2 files changed, 20 insertions(+), 25 deletions(-)

       via  9ce49e908a4abdfb7f546181283b6a4a60f04a82 (commit)
      from  a8c7f2bcb14018d6f9239e600faf5cbb93758c78 (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 9ce49e908a4abdfb7f546181283b6a4a60f04a82
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Thu May 16 14:10:08 2024 -0400

    21224: changed user card toolbar item order
    
    Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/services/workbench2/src/views-components/context-menu/menu-item-sort.ts b/services/workbench2/src/views-components/context-menu/menu-item-sort.ts
index 0e06be1685..f60842c94e 100644
--- a/services/workbench2/src/views-components/context-menu/menu-item-sort.ts
+++ b/services/workbench2/src/views-components/context-menu/menu-item-sort.ts
@@ -121,6 +121,12 @@ const workflowOrder = [
     ContextMenuActionNames.DELETE_WORKFLOW,
 ]
 
+const rootProjectOrder = [
+    ContextMenuActionNames.VIEW_DETAILS,
+    ContextMenuActionNames.USER_ACCOUNT,
+    ContextMenuActionNames.API_DETAILS,
+];
+
 const defaultMultiOrder = [
     ContextMenuActionNames.MOVE_TO,
     ContextMenuActionNames.MAKE_A_COPY,
@@ -148,6 +154,9 @@ const kindToOrder: Record<string, ContextMenuActionNames[]> = {
 
     [ContextMenuKind.WORKFLOW]: workflowOrder,
     [ContextMenuKind.READONLY_WORKFLOW]: workflowOrder,
+
+    [ContextMenuKind.ROOT_PROJECT]: rootProjectOrder,
+    [ContextMenuKind.ROOT_PROJECT_ADMIN]: rootProjectOrder,
 };
 
 export const menuDirection = {
diff --git a/services/workbench2/src/views-components/multiselect-toolbar/ms-user-details-action-set.ts b/services/workbench2/src/views-components/multiselect-toolbar/ms-user-details-action-set.ts
index ff54d26dd2..8ed9b9df03 100644
--- a/services/workbench2/src/views-components/multiselect-toolbar/ms-user-details-action-set.ts
+++ b/services/workbench2/src/views-components/multiselect-toolbar/ms-user-details-action-set.ts
@@ -2,54 +2,40 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { AdvancedIcon, AttributesIcon, UserPanelIcon } from 'components/icon/icon';
+import { AdvancedIcon, DetailsIcon, UserPanelIcon } from 'components/icon/icon';
+import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
 import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
 import { navigateToUserProfile } from 'store/navigation/navigation-action';
 import { ContextMenuActionNames } from "views-components/context-menu/context-menu-action-set";
 import { MultiSelectMenuActionSet } from './ms-menu-actions';
-import { Dispatch } from 'redux';
-import { RootState } from 'store/store';
-import { ServiceRepository } from 'services/services';
-import { dialogActions } from 'store/dialog/dialog-actions';
-import { UserResource } from 'models/user';
-import { getResource } from 'store/resources/resources';
-
-const USER_ATTRIBUTES_DIALOG = 'userAttributesDialog';
-
-const msOpenUserAttributes = (uuid: string) =>
-    (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
-        const { resources } = getState();
-        const data = getResource<UserResource>(uuid)(resources);
-        dispatch(dialogActions.OPEN_DIALOG({ id: USER_ATTRIBUTES_DIALOG, data }));
-    };
 
 export const UserDetailsActionSet: MultiSelectMenuActionSet= [
     [
         {
-            name: ContextMenuActionNames.ATTRIBUTES,
-            icon: AttributesIcon,
+            name: ContextMenuActionNames.VIEW_DETAILS,
+            icon: DetailsIcon,
             hasAlts: false,
             isForMulti: false,
             execute: (dispatch, resources) => {
-                dispatch<any>(msOpenUserAttributes(resources[0].uuid));
+                dispatch<any>(toggleDetailsPanel(resources[0].uuid));
             },
         },
         {
-            name: ContextMenuActionNames.API_DETAILS,
-            icon: AdvancedIcon,
+            name: ContextMenuActionNames.USER_ACCOUNT,
+            icon: UserPanelIcon,
             hasAlts: false,
             isForMulti: false,
             execute: (dispatch, resources) => {
-                dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
+                dispatch<any>(navigateToUserProfile(resources[0].uuid));
             },
         },
         {
-            name: ContextMenuActionNames.USER_ACCOUNT,
-            icon: UserPanelIcon,
+            name: ContextMenuActionNames.API_DETAILS,
+            icon: AdvancedIcon,
             hasAlts: false,
             isForMulti: false,
             execute: (dispatch, resources) => {
-                dispatch<any>(navigateToUserProfile(resources[0].uuid));
+                dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
         },
     ],

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list