Skip to content

[9.2] [Search] Disable custom suggestion on embedded console (#241516)#243376

Merged
wildemat merged 1 commit intoelastic:9.2from
wildemat:backport/9.2/pr-241516
Nov 19, 2025
Merged

[9.2] [Search] Disable custom suggestion on embedded console (#241516)#243376
wildemat merged 1 commit intoelastic:9.2from
wildemat:backport/9.2/pr-241516

Conversation

@wildemat
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.2:

Questions ?

Please refer to the Backport tool documentation

### 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
@wildemat wildemat added the backport This PR is a backport of another PR label Nov 18, 2025
@wildemat wildemat enabled auto-merge (squash) November 18, 2025 15:27
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

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 182.1KB 182.3KB +178.0B
Unknown metric groups

API count

id before after diff
@kbn/code-editor 55 56 +1

@wildemat wildemat requested a review from a team November 19, 2025 19:14
@wildemat wildemat merged commit 0473cea into elastic:9.2 Nov 19, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants