[arvados] created: 2.7.0-6181-g857b952917

git repository hosting git at public.arvados.org
Thu Mar 14 14:22:37 UTC 2024


        at  857b9529178950df565689d091704b8fc228f2c6 (commit)


commit 857b9529178950df565689d091704b8fc228f2c6
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Thu Mar 14 10:22:22 2024 -0400

    21507: removed word wrap on collection owner field Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/services/workbench2/src/views-components/data-explorer/renderers.tsx b/services/workbench2/src/views-components/data-explorer/renderers.tsx
index 4ecbc7e10b..478dd18601 100644
--- a/services/workbench2/src/views-components/data-explorer/renderers.tsx
+++ b/services/workbench2/src/views-components/data-explorer/renderers.tsx
@@ -921,6 +921,33 @@ const _resourceWithName = withStyles(
     );
 });
 
+const _resourceWithNameWrap = withStyles(
+    {},
+    { withTheme: true }
+)((props: { uuid: string; userFullname: string; dispatch: Dispatch; theme: ArvadosTheme }) => {
+    const { uuid, userFullname, dispatch, theme } = props;
+    if (userFullname === "") {
+        dispatch<any>(loadResource(uuid, false));
+        return (
+            <Typography
+                style={{ color: theme.palette.primary.main }}
+                inline
+            >
+                {uuid}
+            </Typography>
+        );
+    }
+
+    return (
+        <Typography
+            style={{ color: theme.palette.primary.main }}
+            inline
+        >
+            {userFullname} ({uuid})
+        </Typography>
+    );
+});
+
 const _resourceWithNameLink = withStyles(
     {},
     { withTheme: true }
@@ -949,6 +976,8 @@ export const ResourceOwnerWithName = ownerFromResourceId(_resourceWithName);
 
 export const ResourceWithName = userFromID(_resourceWithName);
 
+export const ResourceWithNameWrap = userFromID(_resourceWithNameWrap);
+
 export const UserNameFromID = compose(userFromID)((props: { uuid: string; displayAsText?: string; userFullname: string; dispatch: Dispatch }) => {
     const { uuid, userFullname, dispatch } = props;
 
diff --git a/services/workbench2/src/views/collection-panel/collection-panel.tsx b/services/workbench2/src/views/collection-panel/collection-panel.tsx
index 28983457e6..6a50442a34 100644
--- a/services/workbench2/src/views/collection-panel/collection-panel.tsx
+++ b/services/workbench2/src/views/collection-panel/collection-panel.tsx
@@ -34,7 +34,7 @@ import { UserResource } from 'models/user';
 import { getUserUuid } from 'common/getuser';
 import { Link } from 'react-router-dom';
 import { Link as ButtonLink } from '@material-ui/core';
-import { ResourceWithName, ResponsiblePerson } from 'views-components/data-explorer/renderers';
+import { ResourceWithNameWrap, ResponsiblePerson } from 'views-components/data-explorer/renderers';
 import { MPVContainer, MPVPanelContent, MPVPanelState } from 'components/multi-panel-view/multi-panel-view';
 import { resourceIsFrozen } from 'common/frozen-resources';
 import { NotFoundView } from 'views/not-found-panel/not-found-panel';
@@ -307,7 +307,7 @@ export const CollectionDetailsAttributes = (props: CollectionDetailsProps) => {
         <Grid item xs={12} md={mdSize}>
             <DetailsAttribute classLabel={classes.label} classValue={classes.value}
                 label='Owner' linkToUuid={item.ownerUuid}
-                uuidEnhancer={(uuid: string) => <ResourceWithName uuid={uuid} />} />
+                uuidEnhancer={(uuid: string) => <ResourceWithNameWrap uuid={uuid} />} />
         </Grid>
         <div data-cy="responsible-person-wrapper" ref={responsiblePersonRef}>
             <Grid item xs={12} md={12}>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list