Skip to content

Commit

Permalink
🐛 Truncate archatype description (#1634)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibolton336 authored Dec 18, 2023
1 parent e4233f4 commit d615512
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
5 changes: 4 additions & 1 deletion client/src/app/pages/archetypes/archetypes-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,10 @@ const Archetypes: React.FC = () => {
<Td {...getTdProps({ columnKey: "name" })}>
{archetype.name}
</Td>
<Td {...getTdProps({ columnKey: "description" })}>
<Td
{...getTdProps({ columnKey: "description" })}
modifier="truncate"
>
<ArchetypeDescriptionColumn archetype={archetype} />
</Td>
<Td {...getTdProps({ columnKey: "tags" })}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import React from "react";
import { Text } from "@patternfly/react-core";

import { Text, Tooltip } from "@patternfly/react-core";
import type { Archetype } from "@app/api/models";

// TODO: Truncate length and add tooltip with full text
const ArchetypeDescriptionColumn: React.FC<{ archetype: Archetype }> = ({
archetype,
}) => <Text>{archetype.description}</Text>;
}) => {
return (
<Tooltip content={archetype.description}>
<Text>{archetype.description}</Text>
</Tooltip>
);
};

export default ArchetypeDescriptionColumn;

0 comments on commit d615512

Please sign in to comment.