mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DockedMenu: only set the menu state to be docked
if the window size is big enough (#80379)
* only set the menu docked in state if the window size is big enough * adjust sizes * remove top border on dockedMegaMenu * another css tweak * use xxl consistently * CONSISTENTLY * ok maybe not
This commit is contained in:
parent
f862bcb509
commit
083605c17f
@ -131,7 +131,6 @@ const getStyles = (theme: GrafanaTheme2) => {
|
||||
dockedMegaMenu: css({
|
||||
background: theme.colors.background.primary,
|
||||
borderRight: `1px solid ${theme.colors.border.weak}`,
|
||||
borderTop: `1px solid ${theme.colors.border.weak}`,
|
||||
display: 'none',
|
||||
zIndex: theme.zIndex.navbarFixed,
|
||||
|
||||
|
@ -76,7 +76,7 @@ export function AppChromeMenu({}: Props) {
|
||||
}
|
||||
|
||||
const getStyles = (theme: GrafanaTheme2, searchBarHidden?: boolean) => {
|
||||
const topPosition = (searchBarHidden ? TOP_BAR_LEVEL_HEIGHT : TOP_BAR_LEVEL_HEIGHT * 2) + 1;
|
||||
const topPosition = searchBarHidden ? TOP_BAR_LEVEL_HEIGHT : TOP_BAR_LEVEL_HEIGHT * 2;
|
||||
|
||||
return {
|
||||
backdrop: css({
|
||||
|
@ -33,6 +33,7 @@ export class AppChromeService {
|
||||
|
||||
private megaMenuDocked = Boolean(
|
||||
config.featureToggles.dockedMegaMenu &&
|
||||
window.innerWidth >= config.theme2.breakpoints.values.xl &&
|
||||
store.getBool(
|
||||
DOCKED_LOCAL_STORAGE_KEY,
|
||||
Boolean(config.featureToggles.dockedMegaMenu && window.innerWidth >= config.theme2.breakpoints.values.xxl)
|
||||
|
Loading…
Reference in New Issue
Block a user