mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboard: Overflow and z-index adjustments (#75597)
This commit is contained in:
parent
df9e7671d9
commit
e2dcd5184a
@ -1,6 +1,7 @@
|
|||||||
// We need to centralize the zIndex definitions as they work
|
// We need to centralize the zIndex definitions as they work
|
||||||
// like global values in the browser.
|
// like global values in the browser.
|
||||||
export const zIndex = {
|
export const zIndex = {
|
||||||
|
activePanel: 999,
|
||||||
navbarFixed: 1000,
|
navbarFixed: 1000,
|
||||||
sidemenu: 1020,
|
sidemenu: 1020,
|
||||||
dropdown: 1030,
|
dropdown: 1030,
|
||||||
|
@ -358,6 +358,15 @@ const getStyles = (theme: GrafanaTheme2) => {
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
|
|
||||||
|
'> *': {
|
||||||
|
zIndex: 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
// matches .react-grid-item styles in _dashboard_grid.scss to ensure any contained tooltips occlude adjacent panels
|
||||||
|
'&:hover, &:active, &:focus': {
|
||||||
|
zIndex: theme.zIndex.activePanel,
|
||||||
|
},
|
||||||
|
|
||||||
'.show-on-hover': {
|
'.show-on-hover': {
|
||||||
opacity: '0',
|
opacity: '0',
|
||||||
visibility: 'hidden',
|
visibility: 'hidden',
|
||||||
|
@ -161,6 +161,7 @@ $form-icon-danger: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www
|
|||||||
// -------------------------
|
// -------------------------
|
||||||
// Used for a bird's eye view of components dependent on the z-axis
|
// Used for a bird's eye view of components dependent on the z-axis
|
||||||
// Try to avoid customizing these :)
|
// Try to avoid customizing these :)
|
||||||
|
$zindex-active-panel: ${theme.zIndex.activePanel};
|
||||||
$zindex-dropdown: ${theme.zIndex.dropdown};
|
$zindex-dropdown: ${theme.zIndex.dropdown};
|
||||||
$zindex-navbar-fixed: ${theme.zIndex.navbarFixed};
|
$zindex-navbar-fixed: ${theme.zIndex.navbarFixed};
|
||||||
$zindex-sidemenu: ${theme.zIndex.sidemenu};
|
$zindex-sidemenu: ${theme.zIndex.sidemenu};
|
||||||
|
@ -89,6 +89,7 @@ export class SplitPaneWrapper extends PureComponent<React.PropsWithChildren<Prop
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<SplitPane
|
<SplitPane
|
||||||
|
className={styles.splitPane}
|
||||||
split={splitOrientation}
|
split={splitOrientation}
|
||||||
minSize={minSize}
|
minSize={minSize}
|
||||||
maxSize={maxSize}
|
maxSize={maxSize}
|
||||||
@ -144,6 +145,9 @@ const getStyles = (theme: GrafanaTheme2, hasSplit: boolean) => {
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
splitPane: css({
|
||||||
|
overflow: 'visible !important',
|
||||||
|
}),
|
||||||
resizerV: cx(
|
resizerV: cx(
|
||||||
resizer,
|
resizer,
|
||||||
css`
|
css`
|
||||||
|
@ -163,6 +163,7 @@ $form-icon-danger: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www
|
|||||||
// -------------------------
|
// -------------------------
|
||||||
// Used for a bird's eye view of components dependent on the z-axis
|
// Used for a bird's eye view of components dependent on the z-axis
|
||||||
// Try to avoid customizing these :)
|
// Try to avoid customizing these :)
|
||||||
|
$zindex-active-panel: 999;
|
||||||
$zindex-dropdown: 1030;
|
$zindex-dropdown: 1030;
|
||||||
$zindex-navbar-fixed: 1000;
|
$zindex-navbar-fixed: 1000;
|
||||||
$zindex-sidemenu: 1020;
|
$zindex-sidemenu: 1020;
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
&:hover {
|
&:hover {
|
||||||
.react-resizable-handle {
|
.react-resizable-handle {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
|
z-index: $zindex-active-panel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -90,8 +91,7 @@
|
|||||||
&:hover,
|
&:hover,
|
||||||
&:active,
|
&:active,
|
||||||
&:focus {
|
&:focus {
|
||||||
// above other panels, but below lowest pre-defined index in zIndex.ts
|
z-index: $zindex-active-panel !important;
|
||||||
z-index: 999 !important;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user