diff --git a/public/app/core/components/NavBar/Next/NavBarMenu.tsx b/public/app/core/components/NavBar/Next/NavBarMenu.tsx
index 00e40a6e5f1..2a6cebd020e 100644
--- a/public/app/core/components/NavBar/Next/NavBarMenu.tsx
+++ b/public/app/core/components/NavBar/Next/NavBarMenu.tsx
@@ -391,7 +391,7 @@ const getCollapsibleStyles = (theme: GrafanaTheme2) => ({
position: 'relative',
display: 'grid',
gridAutoFlow: 'column',
- gridTemplateColumns: '56px auto',
+ gridTemplateColumns: `${theme.spacing(7)} auto`,
}),
collapsibleMenuItem: css({
height: theme.spacing(6),
diff --git a/public/app/core/components/NavBar/Next/NavBarNext.tsx b/public/app/core/components/NavBar/Next/NavBarNext.tsx
index 0612dc02d13..11961c6d8eb 100644
--- a/public/app/core/components/NavBar/Next/NavBarNext.tsx
+++ b/public/app/core/components/NavBar/Next/NavBarNext.tsx
@@ -3,7 +3,7 @@ import { useLocation } from 'react-router-dom';
import { css, cx } from '@emotion/css';
import { cloneDeep } from 'lodash';
import { GrafanaTheme2, NavModelItem, NavSection } from '@grafana/data';
-import { Icon, IconName, useTheme2 } from '@grafana/ui';
+import { CustomScrollbar, Icon, IconName, useTheme2 } from '@grafana/ui';
import { config, locationService } from '@grafana/runtime';
import { getKioskMode } from 'app/core/navigation/kiosk';
import { KioskMode, StoreState } from 'app/types';
@@ -13,10 +13,10 @@ import { NavBarMenu } from './NavBarMenu';
import NavBarItem from './NavBarItem';
import { useSelector } from 'react-redux';
import { NavBarItemWithoutMenu } from './NavBarItemWithoutMenu';
-import { FocusScope } from '@react-aria/focus';
import { NavBarContext } from '../context';
import { NavBarToggle } from './NavBarToggle';
import { NavBarMenuPortalContainer } from './NavBarMenuPortalContainer';
+import { FocusScope } from '@react-aria/focus';
const onOpenSearch = () => {
locationService.partial({ search: 'open' });
@@ -90,6 +90,7 @@ export const NavBarNext = React.memo(() => {
{
>
-
-
-
- {coreItems.map((link, index) => (
-
- {link.icon && }
- {link.img &&
}
+
+
+
- ))}
- {pluginItems.length > 0 &&
- pluginItems.map((link, index) => (
-
+ {coreItems.map((link, index) => (
+
{link.icon && }
{link.img &&
}
))}
+ {pluginItems.length > 0 &&
+ pluginItems.map((link, index) => (
+
+ {link.icon && }
+ {link.img &&
}
+
+ ))}
+
+
{configItems.map((link, index) => (
({
zIndex: theme.zIndex.sidemenu,
padding: `${theme.spacing(1)} 0`,
position: 'relative',
- width: theme.spacing(7),
+ width: `calc(${theme.spacing(7)} + 1px)`,
borderRight: `1px solid ${theme.colors.border.weak}`,
[theme.breakpoints.down('md')]: {
@@ -207,13 +215,22 @@ const getStyles = (theme: GrafanaTheme2) => ({
},
}),
grafanaLogo: css({
+ alignItems: 'stretch',
+ display: 'flex',
+ flexShrink: 0,
+ justifyContent: 'stretch',
+ }),
+ grafanaLogoInner: css({
alignItems: 'center',
display: 'flex',
- img: {
- height: theme.spacing(3),
- width: theme.spacing(3),
- },
+ height: '100%',
justifyContent: 'center',
+ width: '100%',
+
+ '> div': {
+ height: 'auto',
+ width: 'auto',
+ },
}),
search: css({
display: 'none',
@@ -244,4 +261,7 @@ const getStyles = (theme: GrafanaTheme2) => ({
right: '0px',
transform: `translateX(50%)`,
}),
+ menuPortalContainer: css({
+ zIndex: theme.zIndex.sidemenu,
+ }),
});
diff --git a/public/app/core/components/NavBar/utils.ts b/public/app/core/components/NavBar/utils.ts
index 80b8bca775f..21bc5add093 100644
--- a/public/app/core/components/NavBar/utils.ts
+++ b/public/app/core/components/NavBar/utils.ts
@@ -8,6 +8,9 @@ import { getFooterLinks } from '../Footer/Footer';
import { HelpModal } from '../help/HelpModal';
export const SEARCH_ITEM_ID = 'search';
+export const NAV_MENU_PORTAL_CONTAINER_ID = 'navbar-menu-portal-container';
+
+export const getNavMenuPortalContainer = () => document.getElementById(NAV_MENU_PORTAL_CONTAINER_ID) ?? document.body;
export const getForcedLoginUrl = (url: string) => {
const queryParams = new URLSearchParams(url.split('?')[1]);