Skip to content
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 Monaco] Add theme for yaml and text mode in output #180080

Conversation

ElenaStoeva
Copy link
Contributor

@ElenaStoeva ElenaStoeva commented Apr 4, 2024

Addresses #179905

Summary

This PR adds themes for the Console output panel when it is in YAML or Text mode. The main theme features that are specified for these two main modes are colors (e.g. background color).

How to test:

  1. Create a config/kibana.dev.yml file (if one doesn't exist already) and add the line: console.dev.enableMonaco: true
  2. Change the condition in to !isMonacoEnabled to display the old Ace editor in the request panel for now so that we can test sending a request.
  3. Send a request and verify that the theme for json mode hasn't changed.
  4. Send a request with ?format=yaml parameter (e.g. GET _all?format=yaml) and verify that the theme (apart from the text colors) is the same as in json.
Screenshot 2024-04-05 at 10 24 47
  1. The output also supports text output data. To test this format, comment out line 30 and add the following code in line 34 in src/plugins/console/public/application/containers/editor/monaco/monaco_editor_output.tsx:
const data = [
      {
        response: { value: 'Hello World!' },
      },
    ];

Then reload the Console page and verify that the theme (apart from the text colors) is the same as in json:

Screenshot 2024-04-05 at 10 26 11

@ElenaStoeva ElenaStoeva added Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes labels Apr 4, 2024
@ElenaStoeva ElenaStoeva self-assigned this Apr 4, 2024
@ElenaStoeva
Copy link
Contributor Author

/ci

@ElenaStoeva ElenaStoeva marked this pull request as ready for review April 5, 2024 11:04
@ElenaStoeva ElenaStoeva requested review from a team as code owners April 5, 2024 11:04
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@ElenaStoeva ElenaStoeva requested a review from yuliacech April 5, 2024 11:04
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/monaco 107 109 +2

Async chunks

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

id before after diff
console 432.8KB 433.0KB +153.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
kbnUiSharedDeps-srcJs 2.9MB 2.9MB +284.0B
Unknown metric groups

API count

id before after diff
@kbn/monaco 107 109 +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @ElenaStoeva

@ElenaStoeva ElenaStoeva marked this pull request as draft April 8, 2024 18:30
@ElenaStoeva
Copy link
Contributor Author

Converting to draft as we might need to defer merging this until we resolve #180218 since this issue is related to assigning different themes in the output panel.

@ElenaStoeva
Copy link
Contributor Author

Closing as we will use a single theme for both the editor and the output panel (see #180321).

@ElenaStoeva ElenaStoeva deleted the console-monaco-output/theme-yaml-text branch June 24, 2024 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Console Dev Tools Console Feature release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants