Skip to content

Commit 4e67e5c

Browse files
committed
fix(platform,ui): limit tag badge lenght to 100px
1 parent 8e70d34 commit 4e67e5c

2 files changed

Lines changed: 14 additions & 27 deletions

File tree

components/secutils-webui/src/pages/workspace/components/entity_name.tsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { EuiBadge, EuiLink, EuiText, useEuiTheme } from '@elastic/eui';
1+
import { EuiBadge, EuiLink, EuiText, EuiToolTip, useEuiTheme } from '@elastic/eui';
22
import type { ReactNode } from 'react';
33

44
import type { EntityTag } from '../../../model';
@@ -51,9 +51,19 @@ export function EntityName({ name, href, disabled, icons, tags }: EntityNameProp
5151
) : null}
5252
</span>
5353
{tags?.map((tag) => (
54-
<EuiBadge key={tag.id} color={tag.color} style={{ opacity: disabled ? 0.5 : undefined }}>
55-
{tag.name}
56-
</EuiBadge>
54+
<EuiToolTip key={tag.id} content={tag.name}>
55+
<EuiBadge
56+
color={tag.color}
57+
isDisabled={disabled}
58+
style={{
59+
maxWidth: 120,
60+
overflow: 'hidden',
61+
textOverflow: 'ellipsis',
62+
}}
63+
>
64+
{tag.name}
65+
</EuiBadge>
66+
</EuiToolTip>
5767
))}
5868
</div>
5969
);

components/secutils-webui/src/pages/workspace/components/entity_tags_column.tsx

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)