-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Textbased languages] Render Lens suggestions in Discover (#151581)
## Summary Part of #147472 This PR adds the unified histogram on the text based mode in Discover and depicts Lens suggestions to the users. The users can navigate from it to Lens for further exploration and adding the viz into a dashboard. ![discover](https://user-images.githubusercontent.com/17003240/222077814-33422fe1-4dc1-4861-b9af-681062412b59.gif) Some notes: - Lens now exposes a new api to fetch the suggestions from a text based query. Later it can also be used to return suggestions for the dataview mode (the other part of the aforementioned issue) - Lens visualizations have been updated to return the correct previewIcon (the majority of them were using the empty icon and not the icon that represents them). This icon appears on the visualization selection dropdown - When Lens suggests a table, then the chart is not displayed (Discover already offers a table view) - The legacy metric is excluded from the suggestions as it is not compatible with the text based languages. - The text based languages are treated a bit differently on the unified histogram as they do not work with search sessions. - This feature is on technical preview, so we can iterate more on that on later esql milestones. This is the first iteration required for the milestone 1. - The ESQL search strategy has a default size of 1000 https://github.com/elastic/kibana/blob/main/src/plugins/data/common/search/expressions/essql.ts#L113 which means that this is the max rows that we retrieve. I am keeping the default as is irrelevant from the PR. In ESQL this limitation doesn't exist so I think we are fine. **Flaky test runner**: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1972 ### Checklist - [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] [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 - [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: Davis McPhee <davis.mcphee@elastic.co>
- Loading branch information
1 parent
a5bf13f
commit dec52ef
Showing
62 changed files
with
1,864 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.