Skip to content

Commit 91e9b22

Browse files
fix(ui): show full labels, projects, clusters, and namespaces on hover in sidebar (#7520) (#24723)
Signed-off-by: Aditya Raj <[email protected]> Signed-off-by: Aditya Raj <[email protected]> Co-authored-by: jwinters01 <[email protected]>
1 parent 9a777c6 commit 91e9b22

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

ui/src/app/applications/components/filter/filter.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ $slate: #191826;
109109
font-weight: 500;
110110
}
111111
}
112+
113+
&__tooltip {
114+
max-width: 300px;
115+
word-wrap: break-word;
116+
overflow-wrap: break-word;
117+
white-space: normal;
118+
@media screen and (max-width: 590px) {
119+
max-width: 250px;
120+
}
121+
}
112122
}
113123

114124
.filters-group {

ui/src/app/applications/components/filter/filter.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {Autocomplete, Checkbox} from 'argo-ui/v2';
2+
import {Tooltip} from 'argo-ui';
23
import * as React from 'react';
34

45
import './filter.scss';
@@ -31,6 +32,17 @@ export const CheckboxRow = (props: {value: boolean; onChange?: (value: boolean)
3132
setValue(props.value);
3233
}, [props.value]);
3334

35+
const tooltipProps: Partial<React.ComponentProps<typeof Tooltip>> = {
36+
placement: 'top',
37+
popperOptions: {
38+
modifiers: {
39+
preventOverflow: {
40+
boundariesElement: 'window'
41+
}
42+
}
43+
}
44+
};
45+
3446
return (
3547
<div className={`filter__item ${value ? 'filter__item--selected' : ''}`} onClick={() => setValue(!value)}>
3648
<Checkbox
@@ -46,7 +58,9 @@ export const CheckboxRow = (props: {value: boolean; onChange?: (value: boolean)
4658
}}
4759
/>
4860
{props.option.icon && <div style={{marginRight: '5px'}}>{props.option.icon}</div>}
49-
<div className='filter__item__label'>{props.option.label}</div>
61+
<Tooltip content={<div className='filter__tooltip'>{props.option.label}</div>} {...tooltipProps}>
62+
<div className='filter__item__label'>{props.option.label}</div>
63+
</Tooltip>
5064
<div style={{marginLeft: 'auto'}}>{props.option.count}</div>
5165
</div>
5266
);

0 commit comments

Comments
 (0)