Skip to content

Commit 8eb809e

Browse files
Fix registry description overflow with TruncatedText component (#6866)
Replace raw <p> tag with existing TruncatedText component to properly handle long description text in the model registries settings table. The description is now truncated to 2 lines with a tooltip showing the full text on hover. Signed-off-by: Philip Colares Carneiro <philip.colares@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7a7e3b0 commit 8eb809e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

frontend/src/pages/modelRegistrySettings/ModelRegistriesTableRow.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { BellIcon, InfoCircleIcon } from '@patternfly/react-icons';
66
import { ModelRegistryKind, RoleBindingKind } from '#~/k8sTypes';
77
import { FetchStateObject } from '#~/utilities/useFetch';
88
import ResourceNameTooltip from '#~/components/ResourceNameTooltip';
9+
import TruncatedText from '#~/components/TruncatedText';
910
import { filterRoleBindingSubjects } from '#~/concepts/roleBinding/utils';
1011
import { RoleBindingPermissionsRBType } from '#~/concepts/roleBinding/types';
1112
import { ModelRegistryTableRowStatus } from './ModelRegistryTableRowStatus';
@@ -85,7 +86,10 @@ const ModelRegistriesTableRow: React.FC<ModelRegistriesTableRowProps> = ({
8586
)}
8687
</Flex>
8788
{mr.metadata.annotations?.['openshift.io/description'] && (
88-
<p>{mr.metadata.annotations['openshift.io/description']}</p>
89+
<TruncatedText
90+
maxLines={2}
91+
content={mr.metadata.annotations['openshift.io/description']}
92+
/>
8993
)}
9094
</Td>
9195
<Td dataLabel="Status">

0 commit comments

Comments
 (0)