[arvados] updated: 2.7.0-6045-g986d5166d6

git repository hosting git at public.arvados.org
Fri Mar 15 13:04:46 UTC 2024


Summary of changes:
 .../multiselect-toolbar/MultiselectToolbar.tsx     | 10 ++++----
 .../project-details-card/project-details-card.tsx  | 28 ++++++++++++----------
 2 files changed, 21 insertions(+), 17 deletions(-)

       via  986d5166d62e0f6d84a8b36634b34bf1f594b1bc (commit)
      from  ea5623cfdf69c6371e745e9df9ee7dfa005ffb7f (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 986d5166d62e0f6d84a8b36634b34bf1f594b1bc
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Fri Mar 15 09:04:39 2024 -0400

    21224: restored mstoolbar single input functionality Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/services/workbench2/src/components/multiselect-toolbar/MultiselectToolbar.tsx b/services/workbench2/src/components/multiselect-toolbar/MultiselectToolbar.tsx
index 34ebc54feb..36b8199f30 100644
--- a/services/workbench2/src/components/multiselect-toolbar/MultiselectToolbar.tsx
+++ b/services/workbench2/src/components/multiselect-toolbar/MultiselectToolbar.tsx
@@ -83,7 +83,7 @@ export type MultiselectToolbarProps = {
     user: User | null
     disabledButtons: Set<string>
     auth: AuthState;
-    executeMulti: (action: ContextMenuAction | MultiSelectMenuAction, inputSelectedUuid: string | undefined, checkedList: TCheckedList, resources: ResourcesState) => void;
+    executeMulti: (action: ContextMenuAction | MultiSelectMenuAction, inputSelectedUuid: string | null, checkedList: TCheckedList, resources: ResourcesState) => void;
 };
 
 type IconProps = {
@@ -150,7 +150,7 @@ export const MultiselectToolbar = connect(
                                         <IconButton
                                             data-cy='multiselect-button'
                                             disabled={disabledButtons.has(name)}
-                                            onClick={() => props.executeMulti(action, undefined, checkedList, iconProps.resources)}
+                                            onClick={() => props.executeMulti(action, singleSelectedUuid, checkedList, iconProps.resources)}
                                             className={classes.icon}
                                         >
                                             {currentPathIsTrash || (useAlts && useAlts(singleSelectedUuid, iconProps)) ? altIcon && altIcon({}) : icon({})}
@@ -168,7 +168,9 @@ export const MultiselectToolbar = connect(
                                     <span className={classes.iconContainer}>
                                         <IconButton
                                             data-cy='multiselect-button'
-                                            onClick={() => props.executeMulti(action, undefined, checkedList, iconProps.resources)}
+                                            onClick={() => {
+                                                console.log('executing action', action.name, 'with checkedList', checkedList, 'and iconProps', iconProps.resources)
+                                                props.executeMulti(action, singleSelectedUuid, checkedList, iconProps.resources)}}
                                             className={classes.icon}
                                         >
                                             {action.icon({})}
@@ -345,7 +347,7 @@ function mapStateToProps({auth, multiselect, resources, favorites, publicFavorit
 
 function mapDispatchToProps(dispatch: Dispatch) {
     return {
-        executeMulti: (selectedAction: ContextMenuAction, inputSelectedUuid: string | undefined, checkedList: TCheckedList, resources: ResourcesState): void => {
+        executeMulti: (selectedAction: ContextMenuAction, inputSelectedUuid: string | null, checkedList: TCheckedList, resources: ResourcesState): void => {
             const kindGroups = inputSelectedUuid ? groupByKind({[inputSelectedUuid]: true}, resources) : groupByKind(checkedList, resources);
             const currentList = inputSelectedUuid ? [inputSelectedUuid] : selectedToArray(checkedList)
             switch (selectedAction.name) {
diff --git a/services/workbench2/src/views-components/project-details-card/project-details-card.tsx b/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
index db8271acd2..063ea77cd9 100644
--- a/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
+++ b/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
@@ -25,6 +25,7 @@ import { Dispatch } from 'redux';
 import classNames from 'classnames';
 import { loadDetailsPanel } from 'store/details-panel/details-panel-action';
 import { ExpandChevronRight } from 'components/expand-chevron-right/expand-chevron-right';
+import { MultiselectToolbar } from 'components/multiselect-toolbar/MultiselectToolbar';
 
 type CssRules =
     | 'root'
@@ -337,19 +338,20 @@ const ProjectCard: React.FC<ProjectCardProps> = ({ classes, currentResource, fro
                     </section>
                 }
                 action={
-                    <section className={classes.contextMenuSection}>
-                        <Tooltip
-                            title='More options'
-                            disableFocusListener
-                        >
-                            <IconButton
-                                aria-label='More options'
-                                onClick={(ev) => handleContextMenu(ev, currentResource as any, isAdmin)}
-                            >
-                                <MoreVerticalIcon data-cy='kebab-icon' />
-                            </IconButton>
-                        </Tooltip>
-                    </section>
+                    <MultiselectToolbar inputSelectedUuid={currentResource.uuid} />
+                    // <section className={classes.contextMenuSection}>
+                    //     <Tooltip
+                    //         title='More options'
+                    //         disableFocusListener
+                    //     >
+                    //         <IconButton
+                    //             aria-label='More options'
+                    //             onClick={(ev) => handleContextMenu(ev, currentResource as any, isAdmin)}
+                    //         >
+                    //             <MoreVerticalIcon data-cy='kebab-icon' />
+                    //         </IconButton>
+                    //     </Tooltip>
+                    // </section>
                 }
             />
             <section onClick={(ev) => ev.stopPropagation()}>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list