diff --git a/src/common/constants.ts b/src/common/constants.ts index 26dd193f9..634a751fc 100644 --- a/src/common/constants.ts +++ b/src/common/constants.ts @@ -4,7 +4,6 @@ export const navBarContentId = 'nav-bar-content'; export const unknownValueString = '(unknown)'; export const dashedValueString = '----'; -export const noDescriptionString = '(No description)'; export const noneString = '(none)'; export const noExecutionsFoundString = 'No executions found.'; export const noWorkflowVersionsFoundString = 'No workflow versions found.'; diff --git a/src/components/Task/SearchableTaskNameList.tsx b/src/components/Task/SearchableTaskNameList.tsx index 7a68e2477..b123a5049 100644 --- a/src/components/Task/SearchableTaskNameList.tsx +++ b/src/components/Task/SearchableTaskNameList.tsx @@ -3,7 +3,6 @@ import { makeStyles, Theme } from '@material-ui/core/styles'; import ChevronRight from '@material-ui/icons/ChevronRight'; import ErrorOutline from '@material-ui/icons/ErrorOutline'; import classnames from 'classnames'; -import { noDescriptionString } from 'common/constants'; import { SearchResult } from 'components/common/SearchableList'; import { SearchableNamedEntity, @@ -79,15 +78,17 @@ const TaskNameRow: React.FC = ({ label, entityName }) => { const styles = useStyles(); const listStyles = useNamedEntityListStyles(); const [inViewRef, inView] = useInView(intersectionOptions); - const description = entityName.metadata.description || noDescriptionString; + const description = entityName?.metadata?.description; return (
{label}
- - {description} - + {description && ( + + {description} + + )} {!!inView && }
diff --git a/src/components/Workflow/SearchableWorkflowNameList.tsx b/src/components/Workflow/SearchableWorkflowNameList.tsx index cff53786d..4d4e6bc34 100644 --- a/src/components/Workflow/SearchableWorkflowNameList.tsx +++ b/src/components/Workflow/SearchableWorkflowNameList.tsx @@ -11,6 +11,7 @@ import { WorkflowExecutionPhase } from 'models/Execution/enums'; import { Shimmer } from 'components/common/Shimmer'; import { WorkflowExecutionIdentifier } from 'models/Execution/types'; import { debounce } from 'lodash'; +import { Typography } from '@material-ui/core'; import { WorkflowListStructureItem } from './types'; import ProjectStatusBar from '../Project/ProjectStatusBar'; import { workflowNoInputsString } from '../Launch/LaunchForm/constants'; @@ -120,9 +121,11 @@ const SearchableWorkflowNameItem: React.FC = Re
{id.name}
-
- {description?.length ? description : 'This workflow has no description.'} -
+ {description && ( + + {description} + + )}
Last execution time