[arvados] updated: 2.7.0-5864-g9efef17b6a

git repository hosting git at public.arvados.org
Thu Feb 8 19:30:05 UTC 2024


Summary of changes:
 .../main-content-bar/main-content-bar.tsx          |  2 +-
 .../project-details-card/project-details-card.tsx  | 23 +++++++++++++++++-----
 2 files changed, 19 insertions(+), 6 deletions(-)

       via  9efef17b6a074a82bb7e5a37eecda76ca6ff1fc6 (commit)
      from  0b569ee693ece680309ac9c114e975c9cb3e7f64 (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 9efef17b6a074a82bb7e5a37eecda76ca6ff1fc6
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Thu Feb 8 14:29:57 2024 -0500

    21224: details card now shows when it is selected Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/services/workbench2/src/views-components/main-content-bar/main-content-bar.tsx b/services/workbench2/src/views-components/main-content-bar/main-content-bar.tsx
index 98d16c81d4..5999b4855a 100644
--- a/services/workbench2/src/views-components/main-content-bar/main-content-bar.tsx
+++ b/services/workbench2/src/views-components/main-content-bar/main-content-bar.tsx
@@ -83,7 +83,7 @@ export const MainContentBar = connect(mapStateToProps, mapDispatchToProps)(withS
                 }} />
             </Grid>
             <Grid item>
-                {props.buttonVisible && <Tooltip title="Additional Info">
+                {props.buttonVisible && <Tooltip title="Additional Info" disableFocusListener>
                     <IconButton data-cy="additional-info-icon"
                         color="inherit"
                         className={props.classes.infoTooltip}
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 a850046a11..b636b4558d 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
@@ -22,9 +22,11 @@ import { openContextMenu, resourceUuidToContextMenuKind } from 'store/context-me
 import { CollectionResource } from 'models/collection';
 import { ContextMenuKind } from 'views-components/context-menu/context-menu';
 import { Dispatch } from 'redux';
+import classNames from 'classnames';
 
 type CssRules =
     | 'root'
+    | 'selected'
     | 'cardHeader'
     | 'descriptionLabel'
     | 'showMore'
@@ -46,6 +48,10 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
         marginBottom: '1rem',
         flex: '0 0 auto',
         paddingTop: '0.2rem',
+        border: '2px solid transparent',
+    },
+    selected: {
+        border: '2px solid #ccc',
     },
     showMore: {
         color: theme.palette.primary.main,
@@ -119,11 +125,13 @@ const mapStateToProps = (state: RootState) => {
     const currentResource = getResource(currentItemUuid)(state.resources);
     const frozenByUser = currentResource && getResource((currentResource as ProjectResource).frozenByUuid as string)(state.resources);
     const frozenByFullName = frozenByUser && (frozenByUser as Resource & { fullName: string }).fullName;
+    const isSelected = currentItemUuid === state.detailsPanel.resourceUuid && state.detailsPanel.isOpened === true && !!state.multiselect.selectedUuid;
 
     return {
         isAdmin: state.auth.user?.isAdmin,
         currentResource,
         frozenByFullName,
+        isSelected,
     };
 };
 
@@ -162,12 +170,14 @@ type DetailsCardProps = WithStyles<CssRules> & {
     currentResource: ProjectResource | UserResource;
     frozenByFullName?: string;
     isAdmin: boolean;
+    isSelected: boolean;
     handleContextMenu: (event: React.MouseEvent<HTMLElement>, resource: ContextMenuResource, isAdmin: boolean) => void;
 };
 
 type UserCardProps = WithStyles<CssRules> & {
     currentResource: UserResource;
     isAdmin: boolean;
+    isSelected: boolean;
     handleContextMenu: (event: React.MouseEvent<HTMLElement>, resource: ContextMenuResource, isAdmin: boolean) => void;
 };
 
@@ -175,6 +185,7 @@ type ProjectCardProps = WithStyles<CssRules> & {
     currentResource: ProjectResource;
     frozenByFullName: string | undefined;
     isAdmin: boolean;
+    isSelected: boolean;
     handleContextMenu: (event: React.MouseEvent<HTMLElement>, resource: ContextMenuResource, isAdmin: boolean) => void;
 };
 
@@ -183,7 +194,7 @@ export const ProjectDetailsCard = connect(
     mapDispatchToProps
 )(
     withStyles(styles)((props: DetailsCardProps) => {
-        const { classes, currentResource, frozenByFullName, handleContextMenu, isAdmin } = props;
+        const { classes, currentResource, frozenByFullName, handleContextMenu, isAdmin, isSelected } = props;
         switch (currentResource.kind as string) {
             case ResourceKind.USER:
                 return (
@@ -191,6 +202,7 @@ export const ProjectDetailsCard = connect(
                         classes={classes}
                         currentResource={currentResource as UserResource}
                         isAdmin={isAdmin}
+                        isSelected={isSelected}
                         handleContextMenu={(ev) => handleContextMenu(ev, currentResource as any, isAdmin)}
                     />
                 );
@@ -201,6 +213,7 @@ export const ProjectDetailsCard = connect(
                         currentResource={currentResource as ProjectResource}
                         frozenByFullName={frozenByFullName}
                         isAdmin={isAdmin}
+                        isSelected={isSelected}
                         handleContextMenu={(ev) => handleContextMenu(ev, currentResource as any, isAdmin)}
                     />
                 );
@@ -210,11 +223,11 @@ export const ProjectDetailsCard = connect(
     })
 );
 
-const UserCard: React.FC<UserCardProps> = ({ classes, currentResource, handleContextMenu, isAdmin }) => {
+const UserCard: React.FC<UserCardProps> = ({ classes, currentResource, handleContextMenu, isAdmin, isSelected }) => {
     const { fullName, uuid } = currentResource as UserResource & { fullName: string };
 
     return (
-        <Card className={classes.root}>
+        <Card className={classNames(classes.root, isSelected ? classes.selected : '')}>
             <CardHeader
                 className={classes.cardHeader}
                 title={
@@ -252,7 +265,7 @@ const UserCard: React.FC<UserCardProps> = ({ classes, currentResource, handleCon
     );
 };
 
-const ProjectCard: React.FC<ProjectCardProps> = ({ classes, currentResource, frozenByFullName, handleContextMenu, isAdmin }) => {
+const ProjectCard: React.FC<ProjectCardProps> = ({ classes, currentResource, frozenByFullName, handleContextMenu, isAdmin, isSelected }) => {
     const { name, description } = currentResource as ProjectResource;
     const [showDescription, setShowDescription] = React.useState(false);
 
@@ -261,7 +274,7 @@ const ProjectCard: React.FC<ProjectCardProps> = ({ classes, currentResource, fro
     };
 
     return (
-        <Card className={classes.root}>
+        <Card className={classNames(classes.root, isSelected ? classes.selected : '')}>
             <CardHeader
                 className={classes.cardHeader}
                 title={

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list