Skip to content

Commit 4fc8027

Browse files
authored
[Chrome Grid] Revert the header displayed next to the sidenav (#244628)
## Summary One user-facing change we made with [the grid layout](#243181) is that we started displaying the Kibana header next to the sidenav instead of above it. **Before grid layout** <img width="630" height="409" alt="Screenshot 2025-10-31 at 11 22 32" src="https://github.com/user-attachments/assets/f04eaf6a-9605-4346-b105-e172b5f990f2" /> **With grid layout** <img width="591" height="290" alt="Screenshot 2025-10-31 at 11 25 24" src="https://github.com/user-attachments/assets/6e34f379-d979-4c82-a6fc-1c94811f17b6" /> ----- With this PR, we revert this user-facing change and return the header to the top of the nav. <img width="1624" height="1056" alt="Screenshot 2025-11-28 at 12 54 38" src="https://github.com/user-attachments/assets/b8bb6a56-4983-4341-9ae6-e52ac46b5636" />
1 parent cb8e763 commit 4fc8027

File tree

5 files changed

+11
-15
lines changed

5 files changed

+11
-15
lines changed

src/core/packages/chrome/layout/core-chrome-layout-components/layout.styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const cssProp = css`
2525
2626
grid-template-areas:
2727
'banner banner banner'
28-
'navigation header sidebar'
28+
'header header header'
2929
'navigation application sidebar'
3030
'footer footer footer';
3131
`;

src/core/packages/chrome/layout/core-chrome-layout-components/layout_global_css.tsx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,11 @@ export const LayoutGlobalCSS = () => {
3838
`;
3939

4040
const header = css`
41-
${layoutVarName('header.top')}: ${layoutVar('banner.height')};
42-
${layoutVarName('header.left')}: ${navigationWidth}px;
43-
${layoutVarName('header.right')}: ${sidebarWidth}px;
41+
${layoutVarName('header.top')}: ${bannerHeight}px;
42+
${layoutVarName('header.left')}: 0;
43+
${layoutVarName('header.right')}: 0;
4444
${layoutVarName('header.height')}: ${headerHeight}px;
45-
${layoutVarName('header.width')}: calc(
46-
100vw - ${layoutVar('header.left')} - ${layoutVar('header.right')}
47-
);
45+
${layoutVarName('header.width')}: 100vw;
4846
${layoutVarName('header.bottom')}: calc(
4947
100vh - ${layoutVar('banner.height')} + ${layoutVar('header.height')}
5048
);
@@ -60,7 +58,7 @@ export const LayoutGlobalCSS = () => {
6058
`;
6159

6260
const navigation = css`
63-
${layoutVarName('navigation.top')}: ${layoutVar('banner.height')};
61+
${layoutVarName('navigation.top')}: ${bannerHeight + headerHeight}px;
6462
${layoutVarName('navigation.bottom')}: ${layoutVar('footer.height')};
6563
${layoutVarName('navigation.left')}: 0;
6664
${layoutVarName('navigation.right')}: calc(100vw - ${navigationWidth}px);
@@ -71,7 +69,7 @@ export const LayoutGlobalCSS = () => {
7169
`;
7270

7371
const sidebar = css`
74-
${layoutVarName('sidebar.top')}: ${layoutVar('banner.height')};
72+
${layoutVarName('sidebar.top')}: ${bannerHeight + headerHeight}px;
7573
${layoutVarName('sidebar.bottom')}: ${layoutVar('footer.height')};
7674
${layoutVarName('sidebar.right')}: 0;
7775
${layoutVarName('sidebar.left')}: calc(100vw - ${sidebarWidth}px);
@@ -82,9 +80,7 @@ export const LayoutGlobalCSS = () => {
8280
`;
8381

8482
const application = css`
85-
${layoutVarName('application.top')}: calc(
86-
${layoutVar('banner.height')} + ${layoutVar('header.height')}
87-
);
83+
${layoutVarName('application.top')}: ${bannerHeight + headerHeight}px;
8884
${layoutVarName('application.bottom')}: ${layoutVar('footer.height')};
8985
${layoutVarName('application.left')}: ${navigationWidth}px;
9086
${layoutVarName('application.right')}: ${sidebarWidth}px;

src/core/packages/chrome/layout/core-chrome-layout-components/navigation/layout_navigation.styles.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ import { layoutVar, layoutLevels } from '@kbn/core-chrome-layout-constants';
1313
import type { EmotionFn } from '../types';
1414

1515
const root: EmotionFn = ({ euiTheme }) => css`
16-
position: sticky;
1716
grid-area: navigation;
18-
align-self: start;
19-
height: 100%;
17+
height: ${layoutVar('navigation.height')};
2018
width: ${layoutVar('navigation.width')};
2119
z-index: ${layoutLevels.navigation};
2220
display: flex;

x-pack/solutions/observability/test/functional_solution_sidenav/tests/observability_sidenav.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
5757
}
5858

5959
// open Infrastructure popover and navigate to some link inside the panel
60+
await solutionNavigation.sidenav.expandMore();
6061
await solutionNavigation.sidenav.clickLink({ navId: 'metrics' });
6162
// open first link in popover to open a panel
6263
await solutionNavigation.sidenav.clickLink({ navId: 'metrics:inventory' });

x-pack/solutions/observability/test/serverless/functional/test_suites/infra/navigation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
1212
const pageObjects = getPageObjects(['svlCommonPage', 'svlCommonNavigation', 'header']);
1313

1414
const openInfraSection = async () => {
15+
await pageObjects.svlCommonNavigation.sidenav.expandMore();
1516
await pageObjects.svlCommonNavigation.sidenav.openPanel('metrics');
1617
};
1718

0 commit comments

Comments
 (0)