Skip to content

Commit 92c499c

Browse files
[9.1] [Lens] Increase z-index for formula widget (#244850) (#245284)
# Backport This will backport the following commits from `main` to `9.1`: - [[Lens] Increase z-index for formula widget (#244850)](#244850) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Maria Iriarte","email":"106958839+mariairiartef@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-12-04T17:28:08Z","message":"[Lens] Increase z-index for formula widget (#244850)\n\n## Summary\n\nFix https://github.com/elastic/kibana/issues/244283\n\nMakes the Lens formula auto suggestions visible during inline Lens\nediting in dashboards.\n\n<img width=\"1724\" height=\"1279\" alt=\"Screenshot 2025-12-02 at 08 54 48\"\nsrc=\"https://github.com/user-attachments/assets/a3b84e47-2188-45cf-930d-e7cbb923db3d\"\n/>\n\n### Checklist\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"1cdb12ccd2b2b40b4ba28af7afe1c1f3f7a99672","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Visualizations","release_note:skip","Feature:Lens","backport:version","v9.1.0","v9.2.0","v9.3.0","v9.2.3","v9.1.9"],"title":"[Lens] Increase z-index for formula widget","number":244850,"url":"https://github.com/elastic/kibana/pull/244850","mergeCommit":{"message":"[Lens] Increase z-index for formula widget (#244850)\n\n## Summary\n\nFix https://github.com/elastic/kibana/issues/244283\n\nMakes the Lens formula auto suggestions visible during inline Lens\nediting in dashboards.\n\n<img width=\"1724\" height=\"1279\" alt=\"Screenshot 2025-12-02 at 08 54 48\"\nsrc=\"https://github.com/user-attachments/assets/a3b84e47-2188-45cf-930d-e7cbb923db3d\"\n/>\n\n### Checklist\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"1cdb12ccd2b2b40b4ba28af7afe1c1f3f7a99672"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","9.2"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/244850","number":244850,"mergeCommit":{"message":"[Lens] Increase z-index for formula widget (#244850)\n\n## Summary\n\nFix https://github.com/elastic/kibana/issues/244283\n\nMakes the Lens formula auto suggestions visible during inline Lens\nediting in dashboards.\n\n<img width=\"1724\" height=\"1279\" alt=\"Screenshot 2025-12-02 at 08 54 48\"\nsrc=\"https://github.com/user-attachments/assets/a3b84e47-2188-45cf-930d-e7cbb923db3d\"\n/>\n\n### Checklist\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"1cdb12ccd2b2b40b4ba28af7afe1c1f3f7a99672"}}]}] BACKPORT--> Co-authored-by: Maria Iriarte <106958839+mariairiartef@users.noreply.github.com>
1 parent 992bf65 commit 92c499c

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

  • x-pack/platform/plugins/shared/lens/public/datasources/form_based/operations/definitions/formula/editor

x-pack/platform/plugins/shared/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_editor.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
LanguageDocumentationPopoverContent,
1313
} from '@kbn/language-documentation';
1414
import { css } from '@emotion/react';
15+
import { css as cssClassName } from '@emotion/css';
1516
import {
1617
EuiButtonIcon,
1718
EuiButtonEmpty,
@@ -156,7 +157,11 @@ export function FormulaEditor({
156157
const node1 = (overflowDiv1.current = document.createElement('div'));
157158
node1.setAttribute('data-test-subj', 'lnsFormulaWidget');
158159
// Monaco CSS is targeted on the monaco-editor class
159-
node1.classList.add('lnsFormulaOverflow', 'monaco-editor');
160+
node1.classList.add(
161+
'lnsFormulaOverflow',
162+
'monaco-editor',
163+
cssClassName(sharedEditorStyles.overflowWidget(euiThemeContext))
164+
);
160165
document.body.appendChild(node1);
161166
}
162167

@@ -981,18 +986,17 @@ const sharedEditorStyles = {
981986
}
982987
}
983988
984-
.lnsFormulaOverflow {
985-
// Needs to be higher than the modal and all flyouts
986-
z-index: ${euiTheme.levels.toast} + 1;
987-
}
988-
989989
.lnsFormula__editorContent {
990990
background-color: ${euiTheme.colors.backgroundBasePlain};
991991
min-height: 0;
992992
position: relative;
993993
}
994994
`;
995995
},
996+
overflowWidget: ({ euiTheme }: UseEuiTheme) => `
997+
// Needs to be higher than the modal and all flyouts
998+
z-index: ${Number(euiTheme.levels.toast) + 1};
999+
`,
9961000
formulaDocs: ({ euiTheme }: UseEuiTheme) => css`
9971001
display: flex;
9981002
flex-direction: column;

0 commit comments

Comments
 (0)