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

ES|QL highlighting #8317

Merged
merged 12 commits into from
Feb 13, 2025
Merged

Conversation

vadimkibana
Copy link
Contributor

@vadimkibana vadimkibana commented Feb 11, 2025

Summary

This change installs and registers ES|QL language syntax for Refractor/Prism.js. To see ES|QL highlighting in action use "esql" as the language in React prop or Markdown fenced code block language.

This makes (1) inline code block, (2) code block and (3) markdown components support ES|QL highlighting:

Screenshot 2025-02-06 at 13 38 50 Screenshot 2025-02-06 at 13 31 47 Screenshot 2025-02-06 at 14 03 23

This change also changes color of "keyword" tokens in inline code block, otherwise they have the same color as any regular text.

QA

  • Browser QA
    • Checked in both light and dark modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox

Comment on lines +33 to +36
.token.atrule .token.rule,
.token.keyword {
color: ${codeSyntaxVariables.inlineCodeKeywordColor};
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently keyword color is the same as plain inline text color: ${codeSyntaxVariables.inlineCodeColor};.

This change makes the keywords pop out.

@vadimkibana vadimkibana marked this pull request as ready for review February 12, 2025 17:46
@vadimkibana vadimkibana requested a review from a team as a code owner February 12, 2025 17:46
Copy link
Contributor

@weronikaolejniczak weronikaolejniczak left a comment

Choose a reason for hiding this comment

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

Overall looks good, thank you so much for contributing! 😄 I have 2 small comments.

@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

Copy link
Contributor

@weronikaolejniczak weronikaolejniczak left a comment

Choose a reason for hiding this comment

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

LGTM! 👍🏻 Thanks for the awesome job! 💚

@weronikaolejniczak weronikaolejniczak merged commit 656ae53 into elastic:main Feb 13, 2025
5 checks passed
@JasonStoltz
Copy link
Member

@weronikaolejniczak @vadimkibana Did we update our docs accordingly?

@weronikaolejniczak
Copy link
Contributor

@JasonStoltz are you aware of any doc pages that have to be updated accordingly?

@JasonStoltz
Copy link
Member

@weronikaolejniczak

At a glance, this seems relevant.

https://eui.elastic.co/#/editors-syntax/code

Screenshot 2025-02-25 at 7 25 34 AM Screenshot 2025-02-25 at 7 26 39 AM

mgadewoll added a commit to elastic/kibana that referenced this pull request Feb 26, 2025
`99.2.0-borealis.0` ⏩ `99.3.0-borealis.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

---

## [`v99.3.0`](https://github.com/elastic/eui/releases/v99.3.0)

- Updated table components to support adding tooltips to header cells
([#8273](elastic/eui#8273))
  - Added `columns.nameTooltip` on `EuiBasicTable`
  - Added `tooltipProps` prop on `EuiTableHeaderCell`
- Added `accent` color option to `EuiCallOut`
([#8303](elastic/eui#8303))
- Updated `EuiInlineEditForm`'s `onCancel` prop type to allow
uncontrolled mode usage
([#8307](elastic/eui#8307))
- Added ES|QL syntax highlighting for `EuiCode`, `EuiCodeBlock`,
`EuiMarkdownFormat`, and `EuiMarkdownEditor` components.
([#8317](elastic/eui#8317))
- Updated `EuiAccordion` to prevent content from being transitioned on
initial render when `initialIsOpen=true`
([#8327](elastic/eui#8327))

**Bug fixes**

- Fixed a bug on `EuiSuperDatePicker` where pasting an absolute date
would append the date instead of replace it
([#8311](elastic/eui#8311))

---------

Co-authored-by: Elastic Machine <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 26, 2025
`99.2.0-borealis.0` ⏩ `99.3.0-borealis.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

---

## [`v99.3.0`](https://github.com/elastic/eui/releases/v99.3.0)

- Updated table components to support adding tooltips to header cells
([elastic#8273](elastic/eui#8273))
  - Added `columns.nameTooltip` on `EuiBasicTable`
  - Added `tooltipProps` prop on `EuiTableHeaderCell`
- Added `accent` color option to `EuiCallOut`
([elastic#8303](elastic/eui#8303))
- Updated `EuiInlineEditForm`'s `onCancel` prop type to allow
uncontrolled mode usage
([elastic#8307](elastic/eui#8307))
- Added ES|QL syntax highlighting for `EuiCode`, `EuiCodeBlock`,
`EuiMarkdownFormat`, and `EuiMarkdownEditor` components.
([elastic#8317](elastic/eui#8317))
- Updated `EuiAccordion` to prevent content from being transitioned on
initial render when `initialIsOpen=true`
([elastic#8327](elastic/eui#8327))

**Bug fixes**

- Fixed a bug on `EuiSuperDatePicker` where pasting an absolute date
would append the date instead of replace it
([elastic#8311](elastic/eui#8311))

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit ac01a0c)
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Feb 27, 2025
`99.2.0-borealis.0` ⏩ `99.3.0-borealis.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

---

## [`v99.3.0`](https://github.com/elastic/eui/releases/v99.3.0)

- Updated table components to support adding tooltips to header cells
([elastic#8273](elastic/eui#8273))
  - Added `columns.nameTooltip` on `EuiBasicTable`
  - Added `tooltipProps` prop on `EuiTableHeaderCell`
- Added `accent` color option to `EuiCallOut`
([elastic#8303](elastic/eui#8303))
- Updated `EuiInlineEditForm`'s `onCancel` prop type to allow
uncontrolled mode usage
([elastic#8307](elastic/eui#8307))
- Added ES|QL syntax highlighting for `EuiCode`, `EuiCodeBlock`,
`EuiMarkdownFormat`, and `EuiMarkdownEditor` components.
([elastic#8317](elastic/eui#8317))
- Updated `EuiAccordion` to prevent content from being transitioned on
initial render when `initialIsOpen=true`
([elastic#8327](elastic/eui#8327))

**Bug fixes**

- Fixed a bug on `EuiSuperDatePicker` where pasting an absolute date
would append the date instead of replace it
([elastic#8311](elastic/eui#8311))

---------

Co-authored-by: Elastic Machine <[email protected]>
mgadewoll added a commit to elastic/kibana that referenced this pull request Feb 27, 2025
`98.2.2-borealis.0` ⏩ `99.3.0-classic.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

---

## [`v99.3.0`](https://github.com/elastic/eui/releases/v99.3.0)

- Updated table components to support adding tooltips to header cells
([#8273](elastic/eui#8273))
  - Added `columns.nameTooltip` on `EuiBasicTable`
  - Added `tooltipProps` prop on `EuiTableHeaderCell`
- Added `accent` color option to `EuiCallOut`
([#8303](elastic/eui#8303))
- Updated `EuiInlineEditForm`'s `onCancel` prop type to allow
uncontrolled mode usage
([#8307](elastic/eui#8307))
- Added ES|QL syntax highlighting for `EuiCode`, `EuiCodeBlock`,
`EuiMarkdownFormat`, and `EuiMarkdownEditor` components.
([#8317](elastic/eui#8317))
- Updated `EuiAccordion` to prevent content from being transitioned on
initial render when `initialIsOpen=true`
([#8327](elastic/eui#8327))

**Bug fixes**

- Fixed a bug on `EuiSuperDatePicker` where pasting an absolute date
would append the date instead of replace it
([#8311](elastic/eui#8311))

## [`v99.2.0`](https://github.com/elastic/eui/releases/v99.2.0)

- Changed `EuiFieldText` styles to prioritize `disabled` styling over
`readonly`. ([#8271](elastic/eui#8271))
- Added `plugs` and `web` glyphs to `EuiIcon`
([#8285](elastic/eui#8285))
- Update `title` on `EuiColorPalettePickerPaletteProps` to be optional
([#8289](elastic/eui#8289))

**Bug fixes**

- Fixed an issue with EuiDataGrid with auto row height resulting in a
table of 0 height ([#8251](elastic/eui#8251))
- Fixed `disabled` behavior of `EuiFieldText` to prevent input changes.
([#8271](elastic/eui#8271))

## [`v99.1.0`](https://github.com/elastic/eui/releases/v99.1.0)

- Updated `EuiColorPalettePicker` - adds `append` to
`EuiColorPalettePickerPaletteProps` to support appending custom content
to the title ([#8208](elastic/eui#8208))
- Updated font-weight and font-size of `EuiBetaBadge`s to improve
legibility ([#8255](elastic/eui#8255))
- Added support for `titleColor` variant `warning` on `EuiStat`
([#8278](elastic/eui#8278))

## [`v99.0.0`](https://github.com/elastic/eui/releases/v99.0.0)

- Added two new icons: `createGenericJob` and `createGeoJob`
([#8248](elastic/eui#8248))
- Added new icon `section`
([#8261](elastic/eui#8261))

**Bug fixes**

- Ensures that the `values` of `EuiI18n` used in `EuiPagination` use
`key` attributes to prevent potential ["unique key"
warnings](https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key).
([#8243](elastic/eui#8243))

**Breaking changes**

- Removed `EuiPopover`'s deprecated `hasDragDrop` prop. Use `usePortal`
on any child `EuiDraggable` instead
([#8256](elastic/eui#8256))

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Arturo Castillo Delgado <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Lene Gadewoll <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 28, 2025
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 28, 2025
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 28, 2025
kibanamachine added a commit to elastic/kibana that referenced this pull request Feb 28, 2025
#212708)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Security Assistant] Fix markdown syntax highlighting
(#212333)](#212333)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Patryk
Kopyciński","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-28T01:05:34Z","message":"[Security
Assistant] Fix markdown syntax highlighting (#212333)\n\n##
Summary\nImplements elastic/eui#8317 \n\nBefore:
\n<img width=\"1007\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/649a075a-7338-434b-9e2e-4c4fd0d6ca6f\"\n/>\n\nAfter:\n<img
width=\"1484\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/cdb27885-e009-49aa-9b1a-381e12c33727\"\n/>","sha":"f8ba3721061de8fe5789eaeb59fcf94b99f0fc05","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Security
Assistant] Fix markdown syntax
highlighting","number":212333,"url":"https://github.com/elastic/kibana/pull/212333","mergeCommit":{"message":"[Security
Assistant] Fix markdown syntax highlighting (#212333)\n\n##
Summary\nImplements elastic/eui#8317 \n\nBefore:
\n<img width=\"1007\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/649a075a-7338-434b-9e2e-4c4fd0d6ca6f\"\n/>\n\nAfter:\n<img
width=\"1484\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/cdb27885-e009-49aa-9b1a-381e12c33727\"\n/>","sha":"f8ba3721061de8fe5789eaeb59fcf94b99f0fc05"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212333","number":212333,"mergeCommit":{"message":"[Security
Assistant] Fix markdown syntax highlighting (#212333)\n\n##
Summary\nImplements elastic/eui#8317 \n\nBefore:
\n<img width=\"1007\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/649a075a-7338-434b-9e2e-4c4fd0d6ca6f\"\n/>\n\nAfter:\n<img
width=\"1484\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/cdb27885-e009-49aa-9b1a-381e12c33727\"\n/>","sha":"f8ba3721061de8fe5789eaeb59fcf94b99f0fc05"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Patryk Kopyciński <[email protected]>
kibanamachine added a commit to elastic/kibana that referenced this pull request Feb 28, 2025
…#212709)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Assistant] Fix markdown syntax highlighting
(#212333)](#212333)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Patryk
Kopyciński","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-28T01:05:34Z","message":"[Security
Assistant] Fix markdown syntax highlighting (#212333)\n\n##
Summary\nImplements elastic/eui#8317 \n\nBefore:
\n<img width=\"1007\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/649a075a-7338-434b-9e2e-4c4fd0d6ca6f\"\n/>\n\nAfter:\n<img
width=\"1484\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/cdb27885-e009-49aa-9b1a-381e12c33727\"\n/>","sha":"f8ba3721061de8fe5789eaeb59fcf94b99f0fc05","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Security
Assistant] Fix markdown syntax
highlighting","number":212333,"url":"https://github.com/elastic/kibana/pull/212333","mergeCommit":{"message":"[Security
Assistant] Fix markdown syntax highlighting (#212333)\n\n##
Summary\nImplements elastic/eui#8317 \n\nBefore:
\n<img width=\"1007\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/649a075a-7338-434b-9e2e-4c4fd0d6ca6f\"\n/>\n\nAfter:\n<img
width=\"1484\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/cdb27885-e009-49aa-9b1a-381e12c33727\"\n/>","sha":"f8ba3721061de8fe5789eaeb59fcf94b99f0fc05"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212333","number":212333,"mergeCommit":{"message":"[Security
Assistant] Fix markdown syntax highlighting (#212333)\n\n##
Summary\nImplements elastic/eui#8317 \n\nBefore:
\n<img width=\"1007\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/649a075a-7338-434b-9e2e-4c4fd0d6ca6f\"\n/>\n\nAfter:\n<img
width=\"1484\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/cdb27885-e009-49aa-9b1a-381e12c33727\"\n/>","sha":"f8ba3721061de8fe5789eaeb59fcf94b99f0fc05"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Patryk Kopyciński <[email protected]>
kibanamachine added a commit to elastic/kibana that referenced this pull request Feb 28, 2025
…#212710)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Security Assistant] Fix markdown syntax highlighting
(#212333)](#212333)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Patryk
Kopyciński","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-28T01:05:34Z","message":"[Security
Assistant] Fix markdown syntax highlighting (#212333)\n\n##
Summary\nImplements elastic/eui#8317 \n\nBefore:
\n<img width=\"1007\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/649a075a-7338-434b-9e2e-4c4fd0d6ca6f\"\n/>\n\nAfter:\n<img
width=\"1484\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/cdb27885-e009-49aa-9b1a-381e12c33727\"\n/>","sha":"f8ba3721061de8fe5789eaeb59fcf94b99f0fc05","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Security
Assistant] Fix markdown syntax
highlighting","number":212333,"url":"https://github.com/elastic/kibana/pull/212333","mergeCommit":{"message":"[Security
Assistant] Fix markdown syntax highlighting (#212333)\n\n##
Summary\nImplements elastic/eui#8317 \n\nBefore:
\n<img width=\"1007\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/649a075a-7338-434b-9e2e-4c4fd0d6ca6f\"\n/>\n\nAfter:\n<img
width=\"1484\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/cdb27885-e009-49aa-9b1a-381e12c33727\"\n/>","sha":"f8ba3721061de8fe5789eaeb59fcf94b99f0fc05"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212333","number":212333,"mergeCommit":{"message":"[Security
Assistant] Fix markdown syntax highlighting (#212333)\n\n##
Summary\nImplements elastic/eui#8317 \n\nBefore:
\n<img width=\"1007\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/649a075a-7338-434b-9e2e-4c4fd0d6ca6f\"\n/>\n\nAfter:\n<img
width=\"1484\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/cdb27885-e009-49aa-9b1a-381e12c33727\"\n/>","sha":"f8ba3721061de8fe5789eaeb59fcf94b99f0fc05"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Patryk Kopyciński <[email protected]>
viduni94 added a commit to elastic/kibana that referenced this pull request Feb 28, 2025
Closes #212384

## Summary

With elastic/eui#8317, `EuiCodeBlock` supports
syntax highlighting for ES|QL.
This PR enables it for Obs AI Assistant

### Screenshots

Before:
![Screenshot 2025-02-27 at 11 00
39 AM](https://github.com/user-attachments/assets/ec9c6da9-c945-4a6b-b3aa-ece17533e877)

After:

![image](https://github.com/user-attachments/assets/7ed5232f-9b4c-45a3-a55f-22c2b6f56a98)

### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 28, 2025
Closes elastic#212384

## Summary

With elastic/eui#8317, `EuiCodeBlock` supports
syntax highlighting for ES|QL.
This PR enables it for Obs AI Assistant

### Screenshots

Before:
![Screenshot 2025-02-27 at 11 00
39 AM](https://github.com/user-attachments/assets/ec9c6da9-c945-4a6b-b3aa-ece17533e877)

After:

![image](https://github.com/user-attachments/assets/7ed5232f-9b4c-45a3-a55f-22c2b6f56a98)

### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit 6d862d7)
kibanamachine added a commit to elastic/kibana that referenced this pull request Feb 28, 2025
… (#212765)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Obs AI Assistant] Enable syntax highlighting for ES|QL
(#212669)](#212669)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Viduni
Wickramarachchi","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-28T12:56:18Z","message":"[Obs
AI Assistant] Enable syntax highlighting for ES|QL (#212669)\n\nCloses
https://github.com/elastic/kibana/issues/212384\n\n## Summary\n\nWith
elastic/eui#8317, `EuiCodeBlock`
supports\nsyntax highlighting for ES|QL.\nThis PR enables it for Obs AI
Assistant\n\n### Screenshots\n\nBefore:\n![Screenshot 2025-02-27 at 11
00\n39 AM](https://github.com/user-attachments/assets/ec9c6da9-c945-4a6b-b3aa-ece17533e877)\n\nAfter:\n\n![image](https://github.com/user-attachments/assets/7ed5232f-9b4c-45a3-a55f-22c2b6f56a98)\n\n###
Checklist\n\n- [x] The PR description includes the appropriate Release
Notes section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"6d862d72a2358438c5e1295ca004f59cc7115170","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:Obs
AI Assistant","backport:version","v9.1.0","v8.19.0"],"title":"[Obs AI
Assistant] Enable syntax highlighting for
ES|QL","number":212669,"url":"https://github.com/elastic/kibana/pull/212669","mergeCommit":{"message":"[Obs
AI Assistant] Enable syntax highlighting for ES|QL (#212669)\n\nCloses
https://github.com/elastic/kibana/issues/212384\n\n## Summary\n\nWith
elastic/eui#8317, `EuiCodeBlock`
supports\nsyntax highlighting for ES|QL.\nThis PR enables it for Obs AI
Assistant\n\n### Screenshots\n\nBefore:\n![Screenshot 2025-02-27 at 11
00\n39 AM](https://github.com/user-attachments/assets/ec9c6da9-c945-4a6b-b3aa-ece17533e877)\n\nAfter:\n\n![image](https://github.com/user-attachments/assets/7ed5232f-9b4c-45a3-a55f-22c2b6f56a98)\n\n###
Checklist\n\n- [x] The PR description includes the appropriate Release
Notes section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"6d862d72a2358438c5e1295ca004f59cc7115170"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212669","number":212669,"mergeCommit":{"message":"[Obs
AI Assistant] Enable syntax highlighting for ES|QL (#212669)\n\nCloses
https://github.com/elastic/kibana/issues/212384\n\n## Summary\n\nWith
elastic/eui#8317, `EuiCodeBlock`
supports\nsyntax highlighting for ES|QL.\nThis PR enables it for Obs AI
Assistant\n\n### Screenshots\n\nBefore:\n![Screenshot 2025-02-27 at 11
00\n39 AM](https://github.com/user-attachments/assets/ec9c6da9-c945-4a6b-b3aa-ece17533e877)\n\nAfter:\n\n![image](https://github.com/user-attachments/assets/7ed5232f-9b4c-45a3-a55f-22c2b6f56a98)\n\n###
Checklist\n\n- [x] The PR description includes the appropriate Release
Notes section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"6d862d72a2358438c5e1295ca004f59cc7115170"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Viduni Wickramarachchi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants