Skip to content

Commit d420161

Browse files
Dosantqn895
authored andcommitted
Fix timeline modal fullscreen (elastic#231937)
## Summary Fix the regression introduced in elastic#226995. The timeline modal with solution navigation height isn't covering the top menu bar like it did before. I tested the fix with all both: - classic nav old layout - solution nav old layout - classic nav new layout - solution nav new layout Issue: <img width="1040" height="767" alt="9 2 - security - flyout+timeline png" src="https://github.com/user-attachments/assets/9c38f5ae-e9cb-4d80-8931-93efc00ae261" /> Fixed: <img width="2399" height="1527" alt="Screenshot 2025-08-15 at 12 29 42" src="https://github.com/user-attachments/assets/32298356-76f4-4af9-92be-6f48a8e1aaa4" />
1 parent 7ac8a8c commit d420161

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const root: EmotionFn = ({ euiTheme }) => css`
1515
grid-area: header;
1616
height: var(--kbn-layout--header-height);
1717
max-width: var(--kbn-layout--header-width);
18-
z-index: var(--kbn-layout--aboveFlyoutLevel);
18+
z-index: 1; /* has to be just above main application content */
1919
`;
2020

2121
export const styles = {

src/core/packages/chrome/layout/core-chrome-layout/layouts/legacy-fixed/legacy_fixed_global_app_style.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,20 @@ const globalLayoutStyles = (euiTheme: UseEuiTheme['euiTheme']) => css`
7171
);
7272
7373
// for forward compatibility with grid layout,
74-
--kbn-application--content-height: calc(100vh - var(--kbnAppHeadersOffset, 0px));
75-
--kbn-application--content-top: var(--kbnAppHeadersOffset, var(--euiFixedHeadersOffset, 0));
74+
// --kbn-layout--application includes everything except chrome's fixed headers
75+
// for solution navigation, it also includes the top bar height (action menu)
76+
--kbn-layout--application-top: var(--euiFixedHeadersOffset, 0px);
77+
--kbn-layout--application-left: 0px;
78+
--kbn-layout--application-bottom: 0px;
79+
--kbn-layout--application-right: 0px;
80+
--kbn-layout--application-height: calc(100vh - var(--kbn-layout--application-top, 0px));
81+
82+
// --kbn-application--content also excludes the top bar height (action menu)
83+
--kbn-application--content-top: var(--kbnAppHeadersOffset, var(--euiFixedHeadersOffset, 0px));
7684
--kbn-application--content-left: 0px;
7785
--kbn-application--content-bottom: 0px;
7886
--kbn-application--content-right: 0px;
87+
--kbn-application--content-height: calc(100vh - var(--kbn-application--content-top, 0px));
7988
}
8089
8190
// Conditionally override :root CSS fixed header variable. Updating \`--euiFixedHeadersOffset\`

x-pack/solutions/security/plugins/security_solution/public/timelines/components/modal/index.styles.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ export const usePaneStyles = () => {
2323
return css`
2424
// euiOverlayMask styles
2525
position: fixed;
26-
top: var(--kbn-application--content-top, 0px);
27-
left: var(--kbn-application--content-left, 0px);
28-
right: var(--kbn-application--content-right, 0px);
29-
bottom: var(--kbn-application--content-bottom, 0px);
26+
top: var(--kbn-layout--application-top, 0px);
27+
left: var(--kbn-layout--application-left, 0px);
28+
right: var(--kbn-layout--application-right, 0px);
29+
bottom: var(--kbn-layout--application-bottom, 0px);
3030
// TODO EUI: add color with transparency
3131
background: ${transparentize(euiTheme.colors.ink, 0.5)};
3232
z-index: ${(euiTheme.levels.flyout as number) +
@@ -43,10 +43,10 @@ export const usePaneStyles = () => {
4343
.timeline-container {
4444
min-width: 150px;
4545
position: fixed;
46-
top: var(--kbn-application--content-top, 0px);
47-
left: var(--kbn-application--content-left, 0px);
48-
right: var(--kbn-application--content-right, 0px);
49-
bottom: var(--kbn-application--content-bottom, 0px);
46+
top: var(--kbn-layout--application-top, 0px);
47+
left: var(--kbn-layout--application-left, 0px);
48+
right: var(--kbn-layout--application-right, 0px);
49+
bottom: var(--kbn-layout--application-bottom, 0px);
5050
background: ${euiBackgroundColor(EuiTheme, 'plain')};
5151
${euiCanAnimate} {
5252
animation: ${euiAnimSlideInUp(euiTheme.size.xxl)} ${euiTheme.animation.normal}

0 commit comments

Comments
 (0)