19690: fixed stray null description
authorLisa Knox <lisaknox83@gmail.com>
Thu, 24 Nov 2022 02:41:48 +0000 (21:41 -0500)
committerLisa Knox <lisaknox83@gmail.com>
Mon, 28 Nov 2022 16:44:04 +0000 (11:44 -0500)
Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox@curii.com>

src/components/column-selector/column-selector.tsx
src/views-components/data-explorer/renderers.tsx

index 63934ddbff54681c4b344e202a00ffc5654cd58f..3ab38d4d95feac18fd7d33e1b427c701c5a00670 100644 (file)
@@ -10,7 +10,6 @@ import { Popover } from "../popover/popover";
 import { IconButtonProps } from '@material-ui/core/IconButton';
 import { DataColumns } from '../data-table/data-table';
 import { ArvadosTheme } from "common/custom-theme";
-import { ResourceName } from 'views-components/data-explorer/renderers';
 
 interface ColumnSelectorDataProps {
     columns: DataColumns<any>;
index ea4b85124af21fff19a30abd4e9c8a4f1e6f4ff6..0e7c0cd56ecf2ddb345bba50ef542ebfa946b384 100644 (file)
@@ -725,14 +725,14 @@ export const ResourceOwnerName = connect(
 
     
 const renderDescription = (description: string)=>{
-    const truncatedDescription = description.slice(0, 18) + '...'
+    const truncatedDescription = description ? description.slice(0, 18) + '...' : '-'
     return <Typography title={description}>{truncatedDescription}</Typography>;
 }
     
 export const ResourceDescription = connect(
     (state: RootState, props: { uuid: string }) => {
         const resource = getResource<GroupContentsResource>(props.uuid)(state.resources);
-        //testing
+        //testing---------------
         const containerRequestDescription = "This is a description for a Container Request, also known as a 'Process'. I'm still not 100% sure why one term is used over the other in practice, but I'm new here so I expect it will become clear to me when it's appropriate. This long bit of text is for testing purposes. -LK"
         if (resource && !resource.description && resource.kind === ResourceKind.PROCESS) resource.description = containerRequestDescription
         return { description: resource ? resource.description : '' };