Skip to content

Commit

Permalink
Truncate truncated descriptions even more (#2404)
Browse files Browse the repository at this point in the history
truncate truncated descriptions even more???
  • Loading branch information
david-crespo authored Sep 11, 2024
1 parent 49d6d7d commit 353b98d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions app/ui/lib/Truncate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ export const Truncate = ({

// Only use the tooltip if the text is longer than maxLength
return (
<div className="flex items-center space-x-2">
// overflow-hidden required to make inner truncate work
<div className="flex items-center space-x-2 overflow-hidden">
<Tooltip content={text} delay={tooltipDelay}>
<div aria-label={text}>{truncate(text, maxLength, position)}</div>
<div aria-label={text} className="truncate">
{truncate(text, maxLength, position)}
</div>
</Tooltip>
{hasCopyButton && <CopyToClipboard text={text} />}
</div>
Expand Down
2 changes: 1 addition & 1 deletion mock-api/vpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const vpcs: Json<Vpc[]> = [vpc, vpc2]
export const defaultRouter: Json<VpcRouter> = {
id: 'fc59fb4d-baad-44a8-b152-9a3c27ae8aa1',
name: 'mock-system-router',
description: 'a fake router',
description: 'Routes are automatically added to this router as VPC subnets are created',
time_created: new Date(2024, 0, 1).toISOString(),
time_modified: new Date(2024, 0, 2).toISOString(),
vpc_id: vpc.id,
Expand Down

0 comments on commit 353b98d

Please sign in to comment.