kibana/packages/kbn-visualization-utils
Stratoula Kalafateli 25898e68bd
[Obs ai assistant][ESQL] Visualizes a query (#174677)
## Summary


This PR

1. Adds a new CTA (Visualize query) on the generated ES|QL queries
<img width="965" alt="image"
src="3ec3176a-23e1-4329-9d27-a01c6ff8aa92">

2. Clicking the CTA, requests from Lens to suggest a chart based on the
given query
<img width="955" alt="image"
src="466da7d8-f6c4-4c46-9b51-a7fad5e31e55">


3. The embeddable has 2 actions:
- Edit the embeddable
- Save the embeddable on a dashboard

4. Editing the embeddable opens a push flyout where the user can

- Change the query
- Change the chart configuration (colors, dimensions etc)
- Click one of the chart suggestions


![ai_assistant](11fb6a55-60a6-491c-9540-060bebdfaa4a)

5. With clicking the apply button, the new chart configuration is saved
to the conversation

6. User can save the ES|QL chart on a dashboard. From there they can
continue editing the chart (we also display the same inline editing
flyout giving a seamless experience)

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [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
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: Milton Hultgren <miltonhultgren@gmail.com>
Co-authored-by: Coen Warmer <coen.warmer@gmail.com>
2024-02-05 17:55:13 +02:00
..
__mocks__ [Obs ai assistant][ESQL] Visualizes a query (#174677) 2024-02-05 17:55:13 +02:00
src [Obs ai assistant][ESQL] Visualizes a query (#174677) 2024-02-05 17:55:13 +02:00
index.ts [Obs ai assistant][ESQL] Visualizes a query (#174677) 2024-02-05 17:55:13 +02:00
jest.config.js [Discover] Fix time zone for field popover histogram and remove getTimeZone duplicates (#172705) 2023-12-09 07:05:21 -07:00
kibana.jsonc [Discover] Fix time zone for field popover histogram and remove getTimeZone duplicates (#172705) 2023-12-09 07:05:21 -07:00
package.json [Discover] Fix time zone for field popover histogram and remove getTimeZone duplicates (#172705) 2023-12-09 07:05:21 -07:00
README.md [Discover] Fix time zone for field popover histogram and remove getTimeZone duplicates (#172705) 2023-12-09 07:05:21 -07:00
tsconfig.json [Obs ai assistant][ESQL] Visualizes a query (#174677) 2024-02-05 17:55:13 +02:00

@kbn/visualization-utils

Utils for visualizations.