Skip to content

[Search] Disable custom suggestion on embedded console#241516

Merged
wildemat merged 9 commits intoelastic:mainfrom
saarikabhasi:fix/embeddedConsole-code-editor
Nov 17, 2025
Merged

[Search] Disable custom suggestion on embedded console#241516
wildemat merged 9 commits intoelastic:mainfrom
saarikabhasi:fix/embeddedConsole-code-editor

Conversation

@saarikabhasi
Copy link
Copy Markdown
Member

@saarikabhasi saarikabhasi commented Oct 31, 2025

Summary

Problem: In the embedded console, the error & suggestion widget is misplaced. Currently fixedOverflowWidgets prop of monaco editor is set to true and the suggestion widget css is calculated to prevent widget being placed under header in Dashboard, ES|QL. In this PR, the customized css would be applied only if it's not a embeddable console.

Changes

  • create new prop within the UseBug223981FixRepositionSuggestWidget called enableSuggestWidgetRepositioning
  • default this prop to true except for within the embedded console

Screen recording

recording of error in embedded console vs standalone dev console

without.change-.Before.mov

fix in embedded console vs standalone dev console

After.removing.custom.css.calc.mov

Testing

open dev console and create a empty query to generate suggestion widget & error message.

@saarikabhasi saarikabhasi force-pushed the fix/embeddedConsole-code-editor branch from f6a52ac to 3f70a42 Compare October 31, 2025 20:34
@wildemat wildemat changed the title [Search] Prevent custom css from being calculated for embedded console [Search] Disable custom suggestion on embedded console Nov 8, 2025
@wildemat wildemat marked this pull request as ready for review November 8, 2025 04:42
@wildemat wildemat requested review from a team as code owners November 8, 2025 04:42
@wildemat wildemat requested a review from eokoneyo November 8, 2025 04:43
@wildemat
Copy link
Copy Markdown
Contributor

wildemat commented Nov 9, 2025

@elasticmachine merge upstream

@elasticmachine
Copy link
Copy Markdown
Contributor

There are no new commits on the base branch.

@wildemat wildemat enabled auto-merge (squash) November 12, 2025 15:29
Copy link
Copy Markdown
Contributor

@eokoneyo eokoneyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SharedUX changes LGTM

@eokoneyo
Copy link
Copy Markdown
Contributor

@elasticmachine merge upstream

@wildemat wildemat merged commit 9cd3222 into elastic:main Nov 17, 2025
13 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.2

https://github.com/elastic/kibana/actions/runs/19435729502

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
console 197.2KB 197.5KB +297.0B
Unknown metric groups

API count

id before after diff
@kbn/code-editor 57 58 +1

History

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
9.2 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 241516

Questions ?

Please refer to the Backport tool documentation

@spong
Copy link
Copy Markdown
Member

spong commented Nov 18, 2025

Hey there @wildemat, we're looking to backport #240921 (comment) to 9.2.x and noticed this backport has failed to merge.

Are you still intending for this to be backported to 9.2.x?

@wildemat
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.2

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@wildemat
Copy link
Copy Markdown
Contributor

@spong apologies for the delay. Created backport PR with conflict resolutions

wildemat pushed a commit to wildemat/kibana that referenced this pull request Nov 18, 2025
### Summary
**Problem**: In the embedded console, the error & suggestion widget is
misplaced. Currently `fixedOverflowWidgets` prop of monaco editor is set
to `true` and the suggestion widget css is calculated to prevent widget
being placed under header in Dashboard, ES|QL. In this PR, the
customized css would be applied only if it's not a embeddable console.

### Changes
- create new prop within the `UseBug223981FixRepositionSuggestWidget`
called `enableSuggestWidgetRepositioning`
- default this prop to `true` except for within the embedded console

### Screen recording
**recording of error in embedded console vs standalone dev  console**

https://github.com/user-attachments/assets/f88f0124-bdb2-4aaf-b66a-0c91ec1587dc

**fix in embedded console vs standalone dev  console**

https://github.com/user-attachments/assets/827a8ded-50cf-4f0b-b07a-3c2c2dd1741c

### Testing
open dev console and create a empty query to generate suggestion widget
& error message.

---------

Co-authored-by: Matt Wilde <matt.wilde@elastic.co>
(cherry picked from commit 9cd3222)

# Conflicts:
#	src/platform/plugins/shared/console/public/application/containers/editor/editor.tsx
#	src/platform/plugins/shared/console/public/application/containers/editor/monaco_editor.tsx
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 19, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @saarikabhasi

wildemat added a commit that referenced this pull request Nov 19, 2025
#243376)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[Search] Disable custom suggestion on embedded console
(#241516)](#241516)

<!--- Backport version: 10.2.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Saarika
Bhasi","email":"55930906+saarikabhasi@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-11-17T15:53:06Z","message":"[Search]
Disable custom suggestion on embedded console (#241516)\n\n###
Summary\n**Problem**: In the embedded console, the error & suggestion
widget is\nmisplaced. Currently `fixedOverflowWidgets` prop of monaco
editor is set\nto `true` and the suggestion widget css is calculated to
prevent widget\nbeing placed under header in Dashboard, ES|QL. In this
PR, the\ncustomized css would be applied only if it's not a embeddable
console.\n\n### Changes\n- create new prop within the
`UseBug223981FixRepositionSuggestWidget`\ncalled
`enableSuggestWidgetRepositioning`\n- default this prop to `true` except
for within the embedded console\n\n### Screen recording\n**recording of
error in embedded console vs standalone dev
console**\n\n\nhttps://github.com/user-attachments/assets/f88f0124-bdb2-4aaf-b66a-0c91ec1587dc\n\n**fix
in embedded console vs standalone dev
console**\n\n\nhttps://github.com/user-attachments/assets/827a8ded-50cf-4f0b-b07a-3c2c2dd1741c\n\n\n\n###
Testing\nopen dev console and create a empty query to generate
suggestion widget\n& error message.\n\n---------\n\nCo-authored-by: Matt
Wilde
<matt.wilde@elastic.co>","sha":"9cd32222f7a234704f229a039c33417d10281d79","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:version","v9.2.0","v9.3.0"],"title":"[Search]
Disable custom suggestion on embedded
console","number":241516,"url":"https://github.com/elastic/kibana/pull/241516","mergeCommit":{"message":"[Search]
Disable custom suggestion on embedded console (#241516)\n\n###
Summary\n**Problem**: In the embedded console, the error & suggestion
widget is\nmisplaced. Currently `fixedOverflowWidgets` prop of monaco
editor is set\nto `true` and the suggestion widget css is calculated to
prevent widget\nbeing placed under header in Dashboard, ES|QL. In this
PR, the\ncustomized css would be applied only if it's not a embeddable
console.\n\n### Changes\n- create new prop within the
`UseBug223981FixRepositionSuggestWidget`\ncalled
`enableSuggestWidgetRepositioning`\n- default this prop to `true` except
for within the embedded console\n\n### Screen recording\n**recording of
error in embedded console vs standalone dev
console**\n\n\nhttps://github.com/user-attachments/assets/f88f0124-bdb2-4aaf-b66a-0c91ec1587dc\n\n**fix
in embedded console vs standalone dev
console**\n\n\nhttps://github.com/user-attachments/assets/827a8ded-50cf-4f0b-b07a-3c2c2dd1741c\n\n\n\n###
Testing\nopen dev console and create a empty query to generate
suggestion widget\n& error message.\n\n---------\n\nCo-authored-by: Matt
Wilde
<matt.wilde@elastic.co>","sha":"9cd32222f7a234704f229a039c33417d10281d79"}},"sourceBranch":"main","suggestedTargetBranches":["9.2"],"targetPullRequestStates":[{"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/241516","number":241516,"mergeCommit":{"message":"[Search]
Disable custom suggestion on embedded console (#241516)\n\n###
Summary\n**Problem**: In the embedded console, the error & suggestion
widget is\nmisplaced. Currently `fixedOverflowWidgets` prop of monaco
editor is set\nto `true` and the suggestion widget css is calculated to
prevent widget\nbeing placed under header in Dashboard, ES|QL. In this
PR, the\ncustomized css would be applied only if it's not a embeddable
console.\n\n### Changes\n- create new prop within the
`UseBug223981FixRepositionSuggestWidget`\ncalled
`enableSuggestWidgetRepositioning`\n- default this prop to `true` except
for within the embedded console\n\n### Screen recording\n**recording of
error in embedded console vs standalone dev
console**\n\n\nhttps://github.com/user-attachments/assets/f88f0124-bdb2-4aaf-b66a-0c91ec1587dc\n\n**fix
in embedded console vs standalone dev
console**\n\n\nhttps://github.com/user-attachments/assets/827a8ded-50cf-4f0b-b07a-3c2c2dd1741c\n\n\n\n###
Testing\nopen dev console and create a empty query to generate
suggestion widget\n& error message.\n\n---------\n\nCo-authored-by: Matt
Wilde
<matt.wilde@elastic.co>","sha":"9cd32222f7a234704f229a039c33417d10281d79"}}]}]
BACKPORT-->

Co-authored-by: Saarika Bhasi <55930906+saarikabhasi@users.noreply.github.com>
@kibanamachine kibanamachine added v9.2.2 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Nov 19, 2025
@wildemat
Copy link
Copy Markdown
Contributor

Backport pr has been merged @spong

eokoneyo pushed a commit to eokoneyo/kibana that referenced this pull request Dec 2, 2025
### Summary
**Problem**: In the embedded console, the error & suggestion widget is
misplaced. Currently `fixedOverflowWidgets` prop of monaco editor is set
to `true` and the suggestion widget css is calculated to prevent widget
being placed under header in Dashboard, ES|QL. In this PR, the
customized css would be applied only if it's not a embeddable console.

### Changes
- create new prop within the `UseBug223981FixRepositionSuggestWidget`
called `enableSuggestWidgetRepositioning`
- default this prop to `true` except for within the embedded console

### Screen recording
**recording of error in embedded console vs standalone dev  console**


https://github.com/user-attachments/assets/f88f0124-bdb2-4aaf-b66a-0c91ec1587dc

**fix in embedded console vs standalone dev  console**


https://github.com/user-attachments/assets/827a8ded-50cf-4f0b-b07a-3c2c2dd1741c



### Testing
open dev console and create a empty query to generate suggestion widget
& error message.

---------

Co-authored-by: Matt Wilde <matt.wilde@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants