-
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] Migrate output editor to Monaco #178696
[Console] Migrate output editor to Monaco #178696
Conversation
82786bb
to
511acce
Compare
511acce
to
9d19377
Compare
Hi @ElenaStoeva, thanks a lot for working on this!
|
Thank you for the feedback @yuliacech! I added a theme, made the editor readonly, and added support for the three different modes. I also added a follow-up task in #176723 for supporting multiple request responses. Regarding the highlighting, I only added a theme for when the output data is a json so that the highlighting is the same as in the existing Ace editor. However, when the output data is in yaml format, the highlighting is different from the one in the Ace editor since I haven't added a theme for yaml language. Given that output data in yaml format is probably not that common (I'm wondering in what situation we would get a yaml response?), do you think we should still add a theme for it so that it is highlighted exactly as in Ace? |
/ci |
Pinging @elastic/kibana-management (Team:Kibana Management) |
/ci |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @ElenaStoeva |
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.
Thanks a lot for addressing my feedback, @ElenaStoeva!
Tested locally and the output panel works as expected 👍
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.
LGTM 👍
Closes #178941
Summary
This PR migrates the output editor from Ace editor to Monaco editor.
How to test:
config/kibana.dev.yml
file (if one doesn't exist already) and add the line:console.dev.enableMonaco: true
kibana/src/plugins/console/public/application/containers/editor/editor.tsx
Line 76 in b8c13ba
!isMonacoEnabled
to display the old Ace editor in the request panel for now so that we can test sending a request.JSON output screenshots:
Ace editor:
Now:
When multiple requests are sent:
?format=yaml
parameter (e.g.GET _all?format=yaml
) and verify that the output panel displays the response correctly in yaml format.YAML output screenshot:
src/plugins/console/public/application/containers/editor/monaco/monaco_editor_output.tsx
:Then reload the Console page and verify the data is correctly displayed and highlighted.
TEXT output screenshot: