mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -04:00
[Controls] Small visual fixes (#225430)
## Summary Fixes [#221140](https://github.com/elastic/kibana/issues/221140) Fixes [#223579](https://github.com/elastic/kibana/issues/223579) --- ### 🏷️ Long labels no longer truncated Label truncation was introduced sometime between versions 8.14 and 8.18: **8.14 (working):**  **8.18 (broken):**  ✅ **After the fix:**  --- ### 🎛️ [Controls] Options list hover background fix The original hover style comes from EUI. Removing it entirely made the interaction feel unclear, so I’ve reintroduced a lighter background to subtly indicate the hover state: **9.0 (broken):** <img width="648" alt="Screenshot 2025-06-26 at 14 05 51" src="https://github.com/user-attachments/assets/2eff832d-47bd-4664-84d3-62c88d013a89" /> ✅ **After the fix:** 
This commit is contained in:
parent
b0704474f0
commit
26d56b5060
2 changed files with 15 additions and 17 deletions
|
@ -162,12 +162,9 @@ export const ControlPanel = <ApiType extends DefaultControlApi = DefaultControlA
|
||||||
) : isTwoLine ? null : (
|
) : isTwoLine ? null : (
|
||||||
<EuiToolTip
|
<EuiToolTip
|
||||||
content={panelTitle || defaultPanelTitle}
|
content={panelTitle || defaultPanelTitle}
|
||||||
anchorProps={{ css: styles.tooltipAnchor }}
|
anchorProps={{ css: styles.tooltipAnchor, className: 'eui-textTruncate' }}
|
||||||
>
|
>
|
||||||
<EuiFormLabel
|
<EuiFormLabel className="controlPanel--label">
|
||||||
css={styles.formLabel}
|
|
||||||
className="eui-textTruncate controlPanel--label"
|
|
||||||
>
|
|
||||||
{panelTitle || defaultPanelTitle}
|
{panelTitle || defaultPanelTitle}
|
||||||
</EuiFormLabel>
|
</EuiFormLabel>
|
||||||
</EuiToolTip>
|
</EuiToolTip>
|
||||||
|
@ -213,14 +210,6 @@ const controlPanelStyles = {
|
||||||
containerHidden: css({
|
containerHidden: css({
|
||||||
display: 'none', // Don't unmount, just hide
|
display: 'none', // Don't unmount, just hide
|
||||||
}),
|
}),
|
||||||
formLabel: css({
|
|
||||||
padding: '0 !important',
|
|
||||||
height: '100%',
|
|
||||||
maxWidth: '100%',
|
|
||||||
overflow: 'hidden !important',
|
|
||||||
textOverflow: 'ellipsis !important',
|
|
||||||
whiteSpace: `nowrap !important` as 'nowrap',
|
|
||||||
}),
|
|
||||||
formControl: ({ euiTheme }: UseEuiTheme) =>
|
formControl: ({ euiTheme }: UseEuiTheme) =>
|
||||||
css({
|
css({
|
||||||
'.euiFormControlLayout__prepend': {
|
'.euiFormControlLayout__prepend': {
|
||||||
|
@ -277,6 +266,11 @@ const controlPanelStyles = {
|
||||||
right: `calc(-${euiTheme.size.xs} - 1px)`,
|
right: `calc(-${euiTheme.size.xs} - 1px)`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'.controlPanel--label': {
|
||||||
|
padding: '0 !important',
|
||||||
|
height: '100%',
|
||||||
|
maxWidth: '100%',
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
tooltipAnchor: css({
|
tooltipAnchor: css({
|
||||||
height: '100%',
|
height: '100%',
|
||||||
|
|
|
@ -55,10 +55,14 @@ const optionListControlStyles = {
|
||||||
font-weight: ${euiTheme.font.weight.medium};
|
font-weight: ${euiTheme.font.weight.medium};
|
||||||
`,
|
`,
|
||||||
invalidSelectionsToken: css({ verticalAlign: 'text-bottom' }),
|
invalidSelectionsToken: css({ verticalAlign: 'text-bottom' }),
|
||||||
filterButton: ({ euiTheme }: UseEuiTheme) => css`
|
filterButton: ({ euiTheme }: UseEuiTheme) =>
|
||||||
font-weight: ${euiTheme.font.weight.regular} !important;
|
css({
|
||||||
color: ${euiTheme.colors.subduedText} !important;
|
fontWeight: `${euiTheme.font.weight.regular} !important` as 'normal',
|
||||||
`,
|
color: `${euiTheme.colors.subduedText} !important`,
|
||||||
|
'&:hover::before': {
|
||||||
|
background: `${euiTheme.colors.backgroundBaseSubdued} !important`,
|
||||||
|
},
|
||||||
|
}),
|
||||||
filterButtonText: css({
|
filterButtonText: css({
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue