Skip to content

Commit c5eccdf

Browse files
committed
🐛 Truncate archatype description
Signed-off-by: ibolton336 <[email protected]>
1 parent 67ab924 commit c5eccdf

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

client/src/app/pages/archetypes/archetypes-page.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,10 @@ const Archetypes: React.FC = () => {
365365
<Td {...getTdProps({ columnKey: "name" })}>
366366
{archetype.name}
367367
</Td>
368-
<Td {...getTdProps({ columnKey: "description" })}>
368+
<Td
369+
{...getTdProps({ columnKey: "description" })}
370+
modifier="truncate"
371+
>
369372
<ArchetypeDescriptionColumn archetype={archetype} />
370373
</Td>
371374
<Td {...getTdProps({ columnKey: "tags" })}>
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import React from "react";
2-
import { Text } from "@patternfly/react-core";
3-
2+
import { Text, Tooltip } from "@patternfly/react-core";
43
import type { Archetype } from "@app/api/models";
54

6-
// TODO: Truncate length and add tooltip with full text
75
const ArchetypeDescriptionColumn: React.FC<{ archetype: Archetype }> = ({
86
archetype,
9-
}) => <Text>{archetype.description}</Text>;
7+
}) => {
8+
return (
9+
<Tooltip content={archetype.description}>
10+
<Text>{archetype.description}</Text>
11+
</Tooltip>
12+
);
13+
};
1014

1115
export default ArchetypeDescriptionColumn;

0 commit comments

Comments
 (0)