Skip to content

Commit 4591535

Browse files
committed
chore(ui): Remove unused code
1 parent f9fb714 commit 4591535

File tree

3 files changed

+0
-48
lines changed

3 files changed

+0
-48
lines changed

weave-js/src/components/Tag/TagTooltip.tsx

-34
This file was deleted.

weave-js/src/components/Tag/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ export * from './Alias';
22
export * from './Pill';
33
export * from './RemoveAction';
44
export * from './Tag';
5-
export * from './TagTooltip';
65
export * from './utils';

weave-js/src/components/Tag/utils.ts

-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {cyrb53} from '@wandb/weave/core';
2-
import {RefObject} from 'react';
32

43
export const TAG_DEFAULT_MAX_CHARS = 24;
54

@@ -93,15 +92,3 @@ export function getTagContrastColor(index?: number): TagColorName {
9392
}
9493
return TAG_COLOR_CONTRAST_WHEEL[index % TAG_COLOR_CONTRAST_WHEEL.length];
9594
}
96-
97-
/**
98-
* Determines if a label's text exceeds the specified width
99-
*/
100-
const MAX_TAG_LABEL_WIDTH_PX = 168;
101-
export function isTagLabelTruncated(
102-
labelRef: RefObject<HTMLElement>,
103-
maxWidth: number = MAX_TAG_LABEL_WIDTH_PX
104-
) {
105-
const labelLen = labelRef?.current?.clientWidth ?? 0;
106-
return labelLen >= maxWidth;
107-
}

0 commit comments

Comments
 (0)