-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Console] Add support to remotely open Embeddable Console #176017
[Console] Add support to remotely open Embeddable Console #176017
Conversation
Updated the console console plugin start and the embeddable console to allow it to be opened remote if it's currently rendered on the page. This is so that plugins using the embeddable console can trigger it open from within their components.
Updated the embeddable console to support pre-loading specific content when it opens. The legacy console already supported loading content from the load_from query parameter so we decided to re-use that to load desired content into the embeddable console as well.
Updated how we read the load_from parameter to fallback to checking the location.search key if there is not a location.hash. This is a fix for reading the load from with the embeddable console on pages that do not use a hash route.
6030f2f
to
8b9e4d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TattdCodeMonkey I tried testing locally on a serverless search project and the "Try in Console" button opens a new tab on the first click. Only after I interact with the code block does that embeddable console opens from the bottom panel. Attaching a video below to demonstrate
Screen.Recording.2024-02-06.at.17.29.00.mov
@yuliacech let me check this is serverless. I bet I missed passing a :( its a rendering race condition, not sure why it didn't happen when I was testing in stack. I'm going to have to refactor how I determine if the console is available in the try in console button to check when you click :/ |
@yuliacech thanks for testing, I fixed the race condition and the try in console button should work regardless of the render order now. |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TattdCodeMonkey Thanks, the fix worked! I re-tested locally and the button works as expected, changes in Console LGTM 👍
…6017) ## Summary Updated the embeddable console and console start to allow triggering the Console open from the ConsolePluginStart object with or without specific content to be pre-loaded. ### Checklist - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…6017) ## Summary Updated the embeddable console and console start to allow triggering the Console open from the ConsolePluginStart object with or without specific content to be pre-loaded. ### Checklist - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Summary
Updated the embeddable console and console start to allow triggering the Console open from the ConsolePluginStart object with or without specific content to be pre-loaded.
Checklist