Skip to content

Commit

Permalink
feat(MR detail): truncate description in header
Browse files Browse the repository at this point in the history
Signed-off-by: gitdallas <[email protected]>
  • Loading branch information
gitdallas committed Aug 29, 2024
1 parent 3174a74 commit 241863f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useNavigate, useParams } from 'react-router';
import { Breadcrumb, BreadcrumbItem, Flex, FlexItem } from '@patternfly/react-core';
import { Breadcrumb, BreadcrumbItem, Flex, FlexItem, Truncate } from '@patternfly/react-core';
import { Link } from 'react-router-dom';
import ApplicationsPage from '~/pages/ApplicationsPage';
import useModelVersionById from '~/concepts/modelRegistry/apiHooks/useModelVersionById';
Expand Down Expand Up @@ -90,7 +90,7 @@ const ModelVersionsDetails: React.FC<ModelVersionsDetailProps> = ({ tab, ...page
</Flex>
)
}
description={mv?.description}
description={<Truncate content={mv?.description || ''} />}
loadError={mvLoadError}
loaded={mvLoaded}
provideChildrenPadding
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useParams } from 'react-router';
import { Breadcrumb, BreadcrumbItem } from '@patternfly/react-core';
import { Breadcrumb, BreadcrumbItem, Truncate } from '@patternfly/react-core';
import { Link } from 'react-router-dom';
import ApplicationsPage from '~/pages/ApplicationsPage';
import useModelVersionsByRegisteredModel from '~/concepts/modelRegistry/apiHooks/useModelVersionsByRegisteredModel';
Expand Down Expand Up @@ -45,7 +45,7 @@ const ModelVersions: React.FC<ModelVersionsProps> = ({ tab, ...pageProps }) => {
}
title={rm?.name}
headerAction={rm && <ModelVersionsHeaderActions rm={rm} />}
description={rm?.description}
description={<Truncate content={rm?.description || ''} />}
loadError={loadError}
loaded={loaded}
provideChildrenPadding
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useNavigate, useParams } from 'react-router';
import { Button, Flex, FlexItem, Label, Text } from '@patternfly/react-core';
import { Button, Flex, FlexItem, Label, Text, Truncate } from '@patternfly/react-core';
import ApplicationsPage from '~/pages/ApplicationsPage';
import useModelVersionById from '~/concepts/modelRegistry/apiHooks/useModelVersionById';
import { ModelRegistrySelectorContext } from '~/concepts/modelRegistry/context/ModelRegistrySelectorContext';
Expand Down Expand Up @@ -69,7 +69,7 @@ const ModelVersionsArchiveDetails: React.FC<ModelVersionsArchiveDetailsProps> =
Restore version
</Button>
}
description={mv?.description}
description={<Truncate content={mv?.description || ''} />}
loadError={mvLoadError}
loaded={mvLoaded}
provideChildrenPadding
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useNavigate, useParams } from 'react-router';
import { Button, Flex, FlexItem, Label, Text } from '@patternfly/react-core';
import { Button, Flex, FlexItem, Label, Text, Truncate } from '@patternfly/react-core';
import ApplicationsPage from '~/pages/ApplicationsPage';
import { ModelRegistrySelectorContext } from '~/concepts/modelRegistry/context/ModelRegistrySelectorContext';
import { registeredModelUrl } from '~/pages/modelRegistry/screens/routeUtils';
Expand Down Expand Up @@ -61,7 +61,7 @@ const RegisteredModelsArchiveDetails: React.FC<RegisteredModelsArchiveDetailsPro
Restore model
</Button>
}
description={rm?.description}
description={<Truncate content={rm?.description || ''} />}
loadError={rmLoadError}
loaded={rmLoaded}
provideChildrenPadding
Expand Down

0 comments on commit 241863f

Please sign in to comment.