Skip to content

Commit 353b98d

Browse files
authored
Truncate truncated descriptions even more (#2404)
truncate truncated descriptions even more???
1 parent 49d6d7d commit 353b98d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

app/ui/lib/Truncate.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@ export const Truncate = ({
3232

3333
// Only use the tooltip if the text is longer than maxLength
3434
return (
35-
<div className="flex items-center space-x-2">
35+
// overflow-hidden required to make inner truncate work
36+
<div className="flex items-center space-x-2 overflow-hidden">
3637
<Tooltip content={text} delay={tooltipDelay}>
37-
<div aria-label={text}>{truncate(text, maxLength, position)}</div>
38+
<div aria-label={text} className="truncate">
39+
{truncate(text, maxLength, position)}
40+
</div>
3841
</Tooltip>
3942
{hasCopyButton && <CopyToClipboard text={text} />}
4043
</div>

mock-api/vpc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const vpcs: Json<Vpc[]> = [vpc, vpc2]
4848
export const defaultRouter: Json<VpcRouter> = {
4949
id: 'fc59fb4d-baad-44a8-b152-9a3c27ae8aa1',
5050
name: 'mock-system-router',
51-
description: 'a fake router',
51+
description: 'Routes are automatically added to this router as VPC subnets are created',
5252
time_created: new Date(2024, 0, 1).toISOString(),
5353
time_modified: new Date(2024, 0, 2).toISOString(),
5454
vpc_id: vpc.id,

0 commit comments

Comments
 (0)