Commit graph

1120 commits

Author SHA1 Message Date
Dmitry Tomashevich
66d0f5590d
[8.6] [Discover] Fix Discover navigation from Lens embeddable (#147000) (#147608)
# Backport

This will backport the following commits from `main` to `8.6`:
- [[Discover] Fix Discover navigation from Lens embeddable
(#147000)](https://github.com/elastic/kibana/pull/147000)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Dmitry
Tomashevich","email":"39378793+dimaanj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2022-12-14T13:17:17Z","message":"[Discover]
Fix Discover navigation from Lens embeddable (#147000)\n\n##
Summary\r\n\r\nFixes #146761\r\n\r\nThis PR fixes navigation to Discover
from Lens embeddable.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\nCo-authored-by: Marco Liberati
<dej611@users.noreply.github.com>","sha":"1f04bf89a3df377c79dba225dd47c9a96dc3e395","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Discover","release_note:fix","auto-backport","Team:DataDiscovery","v8.7.0","v8.6.1"],"number":147000,"url":"https://github.com/elastic/kibana/pull/147000","mergeCommit":{"message":"[Discover]
Fix Discover navigation from Lens embeddable (#147000)\n\n##
Summary\r\n\r\nFixes #146761\r\n\r\nThis PR fixes navigation to Discover
from Lens embeddable.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\nCo-authored-by: Marco Liberati
<dej611@users.noreply.github.com>","sha":"1f04bf89a3df377c79dba225dd47c9a96dc3e395"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/147000","number":147000,"mergeCommit":{"message":"[Discover]
Fix Discover navigation from Lens embeddable (#147000)\n\n##
Summary\r\n\r\nFixes #146761\r\n\r\nThis PR fixes navigation to Discover
from Lens embeddable.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\nCo-authored-by: Marco Liberati
<dej611@users.noreply.github.com>","sha":"1f04bf89a3df377c79dba225dd47c9a96dc3e395"}},{"branch":"8.6","label":"v8.6.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-15 06:52:57 -07:00
Kibana Machine
346a7a0c78
[8.6] [Discover] Fixes the transition from Discover to Lens for the Visualize button (#147502) (#147559)
# Backport

This will backport the following commits from `main` to `8.6`:
- [[Discover] Fixes the transition from Discover to Lens for the
Visualize button
(#147502)](https://github.com/elastic/kibana/pull/147502)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2022-12-14T17:24:11Z","message":"[Discover]
Fixes the transition from Discover to Lens for the Visualize button
(#147502)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/147479\r\n\r\nThis is a
regression that exists on 8.6.0 when the users are trying
to\r\nVisualize a field and have selected columns in
Discover.\r\n\r\nThe problem is that the text based datasource is also
providing some\r\nsuggestions while it shouldn't. This PR adds 2 extra
checks:\r\n\r\n- if the context has the fieldname it returns empty
suggestions (in the\r\ntext based mode we suggest based on the query and
not the field\r\n- If there is no aggregate query we also return empty
suggestions\r\n\r\n\r\n![discover](https://user-images.githubusercontent.com/17003240/207583040-fb58d5d8-bb26-48bb-b809-fe8091b93619.gif)\r\n\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"1382f48c604f56b15a2a1c587bc7044aef6c51a4","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Discover","release_note:fix","Team:Visualizations","Feature:Lens","backport:prev-minor","v8.7.0","v8.6.1"],"number":147502,"url":"https://github.com/elastic/kibana/pull/147502","mergeCommit":{"message":"[Discover]
Fixes the transition from Discover to Lens for the Visualize button
(#147502)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/147479\r\n\r\nThis is a
regression that exists on 8.6.0 when the users are trying
to\r\nVisualize a field and have selected columns in
Discover.\r\n\r\nThe problem is that the text based datasource is also
providing some\r\nsuggestions while it shouldn't. This PR adds 2 extra
checks:\r\n\r\n- if the context has the fieldname it returns empty
suggestions (in the\r\ntext based mode we suggest based on the query and
not the field\r\n- If there is no aggregate query we also return empty
suggestions\r\n\r\n\r\n![discover](https://user-images.githubusercontent.com/17003240/207583040-fb58d5d8-bb26-48bb-b809-fe8091b93619.gif)\r\n\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"1382f48c604f56b15a2a1c587bc7044aef6c51a4"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/147502","number":147502,"mergeCommit":{"message":"[Discover]
Fixes the transition from Discover to Lens for the Visualize button
(#147502)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/147479\r\n\r\nThis is a
regression that exists on 8.6.0 when the users are trying
to\r\nVisualize a field and have selected columns in
Discover.\r\n\r\nThe problem is that the text based datasource is also
providing some\r\nsuggestions while it shouldn't. This PR adds 2 extra
checks:\r\n\r\n- if the context has the fieldname it returns empty
suggestions (in the\r\ntext based mode we suggest based on the query and
not the field\r\n- If there is no aggregate query we also return empty
suggestions\r\n\r\n\r\n![discover](https://user-images.githubusercontent.com/17003240/207583040-fb58d5d8-bb26-48bb-b809-fe8091b93619.gif)\r\n\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"1382f48c604f56b15a2a1c587bc7044aef6c51a4"}},{"branch":"8.6","label":"v8.6.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2022-12-14 11:51:48 -07:00
Kibana Machine
399d39e60e
[8.6] [Lens] fix lucene object query bug (#146846) (#146914)
# Backport

This will backport the following commits from `main` to `8.6`:
- [[Lens] fix lucene object query bug
(#146846)](https://github.com/elastic/kibana/pull/146846)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Andrew
Tate","email":"andrew.tate@elastic.co"},"sourceCommit":{"committedDate":"2022-12-02T19:05:53Z","message":"[Lens]
fix lucene object query bug (#146846)\n\n## Summary\r\n\r\nfix
https://github.com/elastic/kibana/issues/146819","sha":"3c351fffc184d23eafd98a0c61d6c3e28840a59d","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:prev-minor","v8.7.0"],"number":146846,"url":"https://github.com/elastic/kibana/pull/146846","mergeCommit":{"message":"[Lens]
fix lucene object query bug (#146846)\n\n## Summary\r\n\r\nfix
https://github.com/elastic/kibana/issues/146819","sha":"3c351fffc184d23eafd98a0c61d6c3e28840a59d"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/146846","number":146846,"mergeCommit":{"message":"[Lens]
fix lucene object query bug (#146846)\n\n## Summary\r\n\r\nfix
https://github.com/elastic/kibana/issues/146819","sha":"3c351fffc184d23eafd98a0c61d6c3e28840a59d"}}]}]
BACKPORT-->

Co-authored-by: Andrew Tate <andrew.tate@elastic.co>
2022-12-02 13:11:45 -07:00
Kibana Machine
b1406b8c35
[8.6] [Lens] Enables the tooltip on partition charts (#146620) (#146654)
# Backport

This will backport the following commits from `main` to `8.6`:
- [[Lens] Enables the tooltip on partition charts
(#146620)](https://github.com/elastic/kibana/pull/146620)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2022-11-30T06:52:10Z","message":"[Lens]
Enables the tooltip on partition charts (#146620)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/146574\r\n\r\n<img
width=\"1059\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/17003240/204623693-a2d17c66-cd86-450b-b50f-e2ced880e46f.png\">","sha":"1c076ee8fcbe2e7b85131945d6f43d844307575a","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","backport:prev-minor","v8.6.0","v8.7.0"],"number":146620,"url":"https://github.com/elastic/kibana/pull/146620","mergeCommit":{"message":"[Lens]
Enables the tooltip on partition charts (#146620)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/146574\r\n\r\n<img
width=\"1059\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/17003240/204623693-a2d17c66-cd86-450b-b50f-e2ced880e46f.png\">","sha":"1c076ee8fcbe2e7b85131945d6f43d844307575a"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/146620","number":146620,"mergeCommit":{"message":"[Lens]
Enables the tooltip on partition charts (#146620)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/146574\r\n\r\n<img
width=\"1059\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/17003240/204623693-a2d17c66-cd86-450b-b50f-e2ced880e46f.png\">","sha":"1c076ee8fcbe2e7b85131945d6f43d844307575a"}}]}]
BACKPORT-->

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2022-11-30 00:55:31 -07:00
Kibana Machine
d378339e07
[8.6] [Lens] Assign initial focus on annotation query popover open (#145972) (#146179)
# Backport

This will backport the following commits from `main` to `8.6`:
- [[Lens] Assign initial focus on annotation query popover open
(#145972)](https://github.com/elastic/kibana/pull/145972)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Marco
Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2022-11-23T16:07:27Z","message":"[Lens]
Assign initial focus on annotation query popover open (#145972)\n\n##
Summary\r\n\r\nFixes #144717 \r\n\r\nAssign focus to query input on
popover open for the query annotation\r\npanel.\r\nI think it should be
extended also to the Filters popover case, but\r\nperhaps it's worth
consider it as separate
case.\r\n\r\n\r\n![query_annotation_focus](https://user-images.githubusercontent.com/924948/203303631-5170b1ec-9009-4d9b-84f7-297273328278.gif)\r\n\r\n##
Notes\r\n\r\n#### Why using a CSS selector with the `data-test-subj`
rather than\r\nusing a ref or an Id?\r\nBoth ref and id are controlled
internally by the `QueryStringInputUI`\r\ncomponent and perhaps it would
require some more work to either accept a\r\nref/id from the wrapper
component, or having a callback system to get\r\nthese internal refs
upstream.\r\nI thought using an unique identifier like the
`data-test-subj` would\r\nsuffice in this specific context, but open to
discuss alternatives.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items
that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows
[EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[ ] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d01dd6d8dccd60c36296401e2d22a70f6285b131","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","v8.6.0","v8.7.0"],"number":145972,"url":"https://github.com/elastic/kibana/pull/145972","mergeCommit":{"message":"[Lens]
Assign initial focus on annotation query popover open (#145972)\n\n##
Summary\r\n\r\nFixes #144717 \r\n\r\nAssign focus to query input on
popover open for the query annotation\r\npanel.\r\nI think it should be
extended also to the Filters popover case, but\r\nperhaps it's worth
consider it as separate
case.\r\n\r\n\r\n![query_annotation_focus](https://user-images.githubusercontent.com/924948/203303631-5170b1ec-9009-4d9b-84f7-297273328278.gif)\r\n\r\n##
Notes\r\n\r\n#### Why using a CSS selector with the `data-test-subj`
rather than\r\nusing a ref or an Id?\r\nBoth ref and id are controlled
internally by the `QueryStringInputUI`\r\ncomponent and perhaps it would
require some more work to either accept a\r\nref/id from the wrapper
component, or having a callback system to get\r\nthese internal refs
upstream.\r\nI thought using an unique identifier like the
`data-test-subj` would\r\nsuffice in this specific context, but open to
discuss alternatives.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items
that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows
[EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[ ] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d01dd6d8dccd60c36296401e2d22a70f6285b131"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145972","number":145972,"mergeCommit":{"message":"[Lens]
Assign initial focus on annotation query popover open (#145972)\n\n##
Summary\r\n\r\nFixes #144717 \r\n\r\nAssign focus to query input on
popover open for the query annotation\r\npanel.\r\nI think it should be
extended also to the Filters popover case, but\r\nperhaps it's worth
consider it as separate
case.\r\n\r\n\r\n![query_annotation_focus](https://user-images.githubusercontent.com/924948/203303631-5170b1ec-9009-4d9b-84f7-297273328278.gif)\r\n\r\n##
Notes\r\n\r\n#### Why using a CSS selector with the `data-test-subj`
rather than\r\nusing a ref or an Id?\r\nBoth ref and id are controlled
internally by the `QueryStringInputUI`\r\ncomponent and perhaps it would
require some more work to either accept a\r\nref/id from the wrapper
component, or having a callback system to get\r\nthese internal refs
upstream.\r\nI thought using an unique identifier like the
`data-test-subj` would\r\nsuffice in this specific context, but open to
discuss alternatives.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items
that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows
[EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[ ] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d01dd6d8dccd60c36296401e2d22a70f6285b131"}}]}]
BACKPORT-->

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2022-11-23 11:46:00 -07:00
Kibana Machine
70b026910a
[8.6] [Lens] [Annotation] Update ignoreGlobalFilters icon for annotation layers (#145975) (#146023)
# Backport

This will backport the following commits from `main` to `8.6`:
- [[Lens] [Annotation] Update ignoreGlobalFilters icon for annotation
layers (#145975)](https://github.com/elastic/kibana/pull/145975)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Marco
Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2022-11-22T16:39:29Z","message":"[Lens]
[Annotation] Update ignoreGlobalFilters icon for annotation layers
(#145975)\n\n## Summary\r\n\r\nFixes #142382 \r\n\r\nUpdated icon after
latest EUI upgrade.\r\n\r\n<img width=\"332\" alt=\"Screenshot
2022-11-22 at 12 55
03\"\r\nsrc=\"https://user-images.githubusercontent.com/924948/203308138-b9de86a6-8c30-49a2-98c7-ae417227bbda.png\">\r\n<img
width=\"332\" alt=\"Screenshot 2022-11-22 at 12 55
16\"\r\nsrc=\"https://user-images.githubusercontent.com/924948/203308147-9af11383-e65f-4f57-b49c-a588b74cc22f.png\">\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[ ] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"2fce9d6514546290ca64b41c6b60703617f3e060","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","v8.6.0","v8.7.0"],"number":145975,"url":"https://github.com/elastic/kibana/pull/145975","mergeCommit":{"message":"[Lens]
[Annotation] Update ignoreGlobalFilters icon for annotation layers
(#145975)\n\n## Summary\r\n\r\nFixes #142382 \r\n\r\nUpdated icon after
latest EUI upgrade.\r\n\r\n<img width=\"332\" alt=\"Screenshot
2022-11-22 at 12 55
03\"\r\nsrc=\"https://user-images.githubusercontent.com/924948/203308138-b9de86a6-8c30-49a2-98c7-ae417227bbda.png\">\r\n<img
width=\"332\" alt=\"Screenshot 2022-11-22 at 12 55
16\"\r\nsrc=\"https://user-images.githubusercontent.com/924948/203308147-9af11383-e65f-4f57-b49c-a588b74cc22f.png\">\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[ ] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"2fce9d6514546290ca64b41c6b60703617f3e060"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145975","number":145975,"mergeCommit":{"message":"[Lens]
[Annotation] Update ignoreGlobalFilters icon for annotation layers
(#145975)\n\n## Summary\r\n\r\nFixes #142382 \r\n\r\nUpdated icon after
latest EUI upgrade.\r\n\r\n<img width=\"332\" alt=\"Screenshot
2022-11-22 at 12 55
03\"\r\nsrc=\"https://user-images.githubusercontent.com/924948/203308138-b9de86a6-8c30-49a2-98c7-ae417227bbda.png\">\r\n<img
width=\"332\" alt=\"Screenshot 2022-11-22 at 12 55
16\"\r\nsrc=\"https://user-images.githubusercontent.com/924948/203308147-9af11383-e65f-4f57-b49c-a588b74cc22f.png\">\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[ ] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"2fce9d6514546290ca64b41c6b60703617f3e060"}}]}]
BACKPORT-->

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2022-11-22 11:20:05 -07:00
Kibana Machine
423d5a58ed
[8.6] [Lens][Visualize][Embeddable] Optimize Lens embeddables on error (#144015) (#145695)
# Backport

This will backport the following commits from `main` to `8.6`:
- [[Lens][Visualize][Embeddable] Optimize Lens embeddables on error
(#144015)](https://github.com/elastic/kibana/pull/144015)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Marco
Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2022-11-18T08:55:45Z","message":"[Lens][Visualize][Embeddable]
Optimize Lens embeddables on error (#144015)\n\n## Summary\r\n\r\nFixes
#143552\r\n\r\nIn this PR there are some embeddable rendering
optimizations for the\r\nerror case.\r\nLens handles error states
internally without passing to default\r\n`EmbeddablePanel` flows - this
has been made explicit in the Lens\r\n`Embeddable` component. The
embeddable was triggering multiple time the\r\n`render` method in both
successful and failure case: while the\r\nexpression component renderer
had some debouncing/memoize optimization\r\nto reduce the effective
rerenders, the error route had none leading to a\r\ntotal of 3
rerenderings (loading + some changes detected).\r\n\r\nIn this PR I've
managed to reduce the rerenders to 2 (loading + final\r\nstate) with
some gatekeeping on the internal state reporting.\r\nAs for the
`data-rendering-complete` the logic has changed to set it to\r\n`true`
also in Error state, but I would collect some feedback
from\r\n@elastic/kibana-app-services on this side to better understand
the\r\nimpact. Before this change the `data-error` attribute could be
checked\r\nto detect the final state of the panel, but that introduces
some\r\nproblems for Lens panels for the error reporting, hence the need
to have\r\nthe `complete` flag changed.\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[ ] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\nCo-authored-by:
Uladzislau Lasitsa <vlad.lasitsa@gmail.com>\r\nCo-authored-by: Kibana
Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"87c7b3940b2774c36b94243e325a8f49a2094329","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","Team:AppServicesSv","release_note:skip","Feature:Lens","backport:prev-minor","v8.6.0","v8.7.0"],"number":144015,"url":"https://github.com/elastic/kibana/pull/144015","mergeCommit":{"message":"[Lens][Visualize][Embeddable]
Optimize Lens embeddables on error (#144015)\n\n## Summary\r\n\r\nFixes
#143552\r\n\r\nIn this PR there are some embeddable rendering
optimizations for the\r\nerror case.\r\nLens handles error states
internally without passing to default\r\n`EmbeddablePanel` flows - this
has been made explicit in the Lens\r\n`Embeddable` component. The
embeddable was triggering multiple time the\r\n`render` method in both
successful and failure case: while the\r\nexpression component renderer
had some debouncing/memoize optimization\r\nto reduce the effective
rerenders, the error route had none leading to a\r\ntotal of 3
rerenderings (loading + some changes detected).\r\n\r\nIn this PR I've
managed to reduce the rerenders to 2 (loading + final\r\nstate) with
some gatekeeping on the internal state reporting.\r\nAs for the
`data-rendering-complete` the logic has changed to set it to\r\n`true`
also in Error state, but I would collect some feedback
from\r\n@elastic/kibana-app-services on this side to better understand
the\r\nimpact. Before this change the `data-error` attribute could be
checked\r\nto detect the final state of the panel, but that introduces
some\r\nproblems for Lens panels for the error reporting, hence the need
to have\r\nthe `complete` flag changed.\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[ ] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\nCo-authored-by:
Uladzislau Lasitsa <vlad.lasitsa@gmail.com>\r\nCo-authored-by: Kibana
Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"87c7b3940b2774c36b94243e325a8f49a2094329"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/144015","number":144015,"mergeCommit":{"message":"[Lens][Visualize][Embeddable]
Optimize Lens embeddables on error (#144015)\n\n## Summary\r\n\r\nFixes
#143552\r\n\r\nIn this PR there are some embeddable rendering
optimizations for the\r\nerror case.\r\nLens handles error states
internally without passing to default\r\n`EmbeddablePanel` flows - this
has been made explicit in the Lens\r\n`Embeddable` component. The
embeddable was triggering multiple time the\r\n`render` method in both
successful and failure case: while the\r\nexpression component renderer
had some debouncing/memoize optimization\r\nto reduce the effective
rerenders, the error route had none leading to a\r\ntotal of 3
rerenderings (loading + some changes detected).\r\n\r\nIn this PR I've
managed to reduce the rerenders to 2 (loading + final\r\nstate) with
some gatekeeping on the internal state reporting.\r\nAs for the
`data-rendering-complete` the logic has changed to set it to\r\n`true`
also in Error state, but I would collect some feedback
from\r\n@elastic/kibana-app-services on this side to better understand
the\r\nimpact. Before this change the `data-error` attribute could be
checked\r\nto detect the final state of the panel, but that introduces
some\r\nproblems for Lens panels for the error reporting, hence the need
to have\r\nthe `complete` flag changed.\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[ ] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\nCo-authored-by:
Uladzislau Lasitsa <vlad.lasitsa@gmail.com>\r\nCo-authored-by: Kibana
Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"87c7b3940b2774c36b94243e325a8f49a2094329"}}]}]
BACKPORT-->

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2022-11-18 02:58:59 -07:00
Andrew Tate
e2d3bb9dec
[Lens] Multi metric partition charts (#143966) 2022-11-14 16:49:39 -07:00
Stratoula Kalafateli
a5cfe8ec0d
[Lens] Hide the random sampling settings from the UI (#145071)
## Summary

Hides the random sampling layer settings from the UI until we decide how
we want to introduce it to our users.
2022-11-14 16:14:21 +02:00
Joe Reuter
2dce056bd8
[Lens] Change semantic elements (#144828)
Fixes https://github.com/elastic/kibana/issues/143547

To make sure the correct semantic elements are used, you can pass the
`component` prop to the page template components. As the eui components
`EuiPageTemplate`, `EuiPageTemplate.Section` and so bring styling with
them there's not much value in trying to put them into the places of
manual `section`s used in Lens today because we would end up overruling
all of these default styles anyway as Lens is pretty special in terms of
page layout to make best use of the existing screen real estate.

Because of this this PR is simply turning the `EuiPageTemplate` into a
div and putting the main role to the top level of the Lens app.

The way how to do this is a bit funky right now, but that's an EUI bug
that will be fixed upstream: https://github.com/elastic/eui/issues/6351

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2022-11-10 09:51:05 +01:00
Uladzislau Lasitsa
545ebb012d
[Lens] Expose helpers to capture meta information from Lens state (#144546)
## Summary

Closes: #131710

In order to add complimentary features to Lens embeddables via actions,
it's important to be able to capture the relevant information from the
state which is currently loaded.

E.g. https://github.com/elastic/kibana/pull/129762 is pulling out the
used field names from the Lens state. While the state interface is
considered a public interface (as it's also used to configure Lens
embeddables), it would be beneficial to provide use case specific
helpers to extract this information to make this logic easier to
maintain.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-10 10:05:41 +02:00
Kaarina Tungseth
64c3c63e21
[Lens] Updates the UI copy for Random sampling (#144265)
## Summary

Updates the Random sampling copy. 

Original PR: #143929

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-09 12:00:25 -06:00
Kaarina Tungseth
1a660f027f
[Lens] Updates Series color tooltip (#144846)
## Summary

Updates the Series color tooltip to:

`You are unable to apply custom colors to individual series when the
layer includes a "Break down by" field.`
2022-11-09 10:59:41 -06:00
Yaroslav Kuznietsov
3d7b01e28b
[Lens][TSVB] Ad-hoc dataViews for index pattern string mode in TSVB. (#143500)
## Summary
Completes part of https://github.com/elastic/kibana/issues/138236.
Added support of ad-hoc dataViews while converting TSVB visualizations,
when index pattern string mode is turned on.

Co-authored-by: Uladzislau Lasitsa <vlad.lasitsa@gmail.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-09 17:41:36 +02:00
Joe Reuter
452b81f0e7
[Lens] Rearrange options (#144891)
Fixes https://github.com/elastic/kibana/issues/138075

## Group by this field

This PR moves the "Group by this field" below the field selector. I
renamed it to "Aggregate by this dimension first" (instead of field)
because it's more accurate - this isn't really about the field and also
a thing for the "Filters" function which doesn't have a field:
<img width="355" alt="Screenshot 2022-11-09 at 12 29 29"
src="https://user-images.githubusercontent.com/1508364/200818974-f5dc304f-2457-4604-8a0a-c94ed1d50b83.png">
<img width="355" alt="Screenshot 2022-11-09 at 12 29 33"
src="https://user-images.githubusercontent.com/1508364/200818978-f48e42e8-f2df-43c8-8479-d6cac205fafa.png">
<img width="353" alt="Screenshot 2022-11-09 at 12 29 38"
src="https://user-images.githubusercontent.com/1508364/200818983-2c00f8de-06ee-4d9a-82d6-14c161e0b91f.png">
<img width="353" alt="Screenshot 2022-11-09 at 12 29 44"
src="https://user-images.githubusercontent.com/1508364/200818986-e76a6d88-a6a1-4897-8fad-f0d56027c1d1.png">

Drive-by change: Move the "Include empty rows" up above the granularity
slider for intervals to match the date histogram order

## Collapse by

It also moves "Collapse by" into the data section (relevant for xy
breakdown, table rows and partition slices)
<img width="357" alt="Screenshot 2022-11-09 at 12 36 53"
src="https://user-images.githubusercontent.com/1508364/200820679-afb8e08b-a91b-46ef-8111-c09cfdb51865.png">
<img width="353" alt="Screenshot 2022-11-09 at 12 36 59"
src="https://user-images.githubusercontent.com/1508364/200820682-4f416404-4693-46cd-80df-7c868deadc44.png">
<img width="355" alt="Screenshot 2022-11-09 at 12 36 40"
src="https://user-images.githubusercontent.com/1508364/200820669-0fab52da-7fa1-4fff-b183-8d5c7e4695b9.png">
<img width="360" alt="Screenshot 2022-11-09 at 12 36 46"
src="https://user-images.githubusercontent.com/1508364/200820675-837e3736-9519-42a6-98ca-9a9bae9840f1.png">

Also works for text based:
<img width="360" alt="Screenshot 2022-11-09 at 12 47 08"
src="https://user-images.githubusercontent.com/1508364/200822518-e76dd9b5-df9f-4289-a468-0b63bfa1988c.png">


## Technical details

For the collapse by part I had to add another form render hook to the
visualization `renderDimensionEditorDataExtra` which is passed to the
datasource dimension editor so it can be rendered in the right place. On
the datasource side the integration for text based is very straight
forward, for form based there are two flavors - just render below the
operation edit options or pass to the operation editor (used for terms)
2022-11-09 16:22:52 +01:00
Alexey Antonov
8c29a47101
[Lens] embeddable warnings placement looks pretty bad with a metric. (#144368)
* [Lens] embeddable warnings placement looks pretty bad with a metric.

* Update warnings.tsx

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-08 07:57:15 -07:00
Alexey Antonov
544c1ffe08
[Lens] unify UI styles for warning messages (#144800)
* [Lens] update warning messages styles

* update jest
2022-11-08 17:30:06 +03:00
Stratoula Kalafateli
298abadf7c
[Lens] Errors out used columns that don't exist on the index pattern used (#144781) 2022-11-08 14:55:06 +02:00
Joe Reuter
a897698860
fix bug (#144716)
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2022-11-08 02:22:08 -07:00
Joe Reuter
f436d936e3
[Lens] Fix suggestion bug (#144708)
* fix suggestion bug

* [CI] Auto-commit changed files from 'node scripts/generate codeowners'

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2022-11-08 02:04:00 -07:00
Yaroslav Kuznietsov
3aa0228573
[Lens] XY expression types improvement. (#144327)
* referenceLineDecorationConfig type safety added.

* dataDecorationConfigFn type safety added.

* Added extendedDataLayerFn type safety.

* Added extendedAnnotationLayerFn type safety.

* Added referenceLineLayerFn type safety.

* Added yAxisConfigsToExpression type safety.

* Added more function builders.

* Added layeredXyVisFn type safety.

* Fixed tests.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-08 10:15:37 +02:00
Bree Hall
4e9f1c0d04
Bumping EUI to version 67.1.8 (#141279)
* Updated EUI to version 67.1.2. Updated instaces of ButtonColor from EUI to EuiButtonColor.

* Updated to EuiCard instances that utilize the betaBadgeProps object to return an empty string instead of undefined when the label is unavailable

* Removed two instances of the deprecated internetExplorerOnly() mixin

* Updated two instances of the ButtonColor import to EuiButtonColor as is was renamed in PR #6150

* Updated snapshots in Jest Test Suite #1 to account for EuiButton and EuiCard Emotion conversions. Updated snapshots for EuiTooltip as it now contains the new EuiToolTipAnchor component that replaced the tooltip anchor styles

* Updated snapshots in Jest Test Suite #2 to account forEuiButton, EuiDescriptionList, EuiButtonIcon, and EuiBadge Emotion conversions.

* Updated snapshots in Jest Test Suite #3 to account for EuiDescriptionList, EuiButton, and EuiBadge Emotion conversions. Updated snapshots for EuiTooltip as if now contains the new EuiTooltipAnchor component that replaced the tooltop anchor styles

* Updated snapshots in Jest Test Suite #4 to account for EuiButton Emotion conversion.

* Updated snapshots in Jest Test Suite #5 to account for EuiButton Emotion conversion.

* Updated snapshots in Jest Test Suite #8 to account for EuiButtonIcon and EuiButton Emotion conversions. Updated snapshots for EuiTooltip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles.

* Updated snapshots in Jest Test Suite #9 to account for EuiFlyout and EuiButton Emotion conversions.

* Updated snapshots in Jest Test Suite #10 to account for EuiButton, EuiBadge, EuiButtonIcon, and EuiCard Emotion conversions. Updated snapshots for EuiToolTtip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles

* Updated instances of EuiButtonIconColor to use EuiButtonIconProps['color'] as it was removed in PR #6150

* Updated tests that target EuiButton to simulate click events to target a generic button to prevent undefined click event errors

* Updated snapshots in Jest Test Suite #1 to account for EuiButton and EuiCard Emotion conversions

* Added the EuiFlyout mixins and variables to Lens Sass file as EuiFlyout has been converted to Emotion and the Sass styles are no longer available in EUI

* Added the EuiCallOutTypes variable to Step Progress Sass file as EuiCallOut has been converted to Emotion and the Sass styles are no longer available in EUI

* Updated snapshots in Jest Test Suite #2 to account for recent Emotion conversions.
Updated snapshots in server_status.test.tsx to render EuiBadge before checking the snapshots to reduce the snapshot churn caused by Emotion.
Updated tests that target EuiButton to simulate click events to target a generic button to prevent undefined click event errors

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Added imports for the added flyout mixin. Removed references to EuiCallOut mixin as the component has been converted to Emotion and is no longer available for use.

* Updated unit tests and snapshots in Jest Test Suite #10.
Updated snaphshots to account for EuiBadge, EuiDescriptionList, EuiFlyout, and EuiCard Emotion conversions. Updated snapshots for EuiTooltip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles.
Updated tests that target EuiButton to simulate click events to target a generic button element to prevent undefined click event errors

* Updated unit tests in Jest Test Suite #11 that target EuiButton to simulate click events to target a generic button to prevent undefined click event errors

* Updated unit tests in Jest Test Suite #12 by updating tests that target EuiButton to simulate click events. Instead, these tests now target a generic button element to prevent undefined click event errors

* Updated unit tests in Jest Test Suite #1 by updating tests that target EuiButton to simulate click events. Instead, these tests now target a generic button element to prevent undefined click event errors

* Updated unit tests in Jest Test Suite #2 by updating tests that use EuiButton to simulate click events. Instead, these test have been updated to target a button element to prevent undefined click event errors.

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Updated reference to mixins Sass file.
Updated snapshots for Jest Test Suite #5 to account for EuiButton Emotion conversion. Updated unit tests that target EuiButton to simulate click events. These tests have been updated to target a button element to prevent undefined click event errors

* Updated unit tests in Jest Test Suites 3, 7, 8, 13, and 14.
Updated snapshot to account for EuiButton Emotion conversion.
Updated tests that target EuiButton to simulate click events. These tests now target a generic button element to prevent undefined click event errors.
Updated a few snapshots by adding .render() before checking the snapshot. This will prevent large snapshots coming from recent Emotion conversions

* Updated snapshots in Jest Test Suite #10 to account for the recent EuiButton Emotion conversion

* Updated unit tests in Jest Test Suite #2 by editing tests that target EuiButton to simulate click events. These tests now target a button element in order to prevent undefinde click event errors

* Updated snapshots in Jest Test Suite #10 to account for EuiButton and EuiDescriptionList Emotion conversions

* Updated test cases in Jest Test Suites 3, 7, and 8. Updated snapshots to account for EuiButton and EuiPagination Emotion conversions.
Updated tests that target EuiButton to simulate click events. These tests now target a button element to prevent undefined click errors

* Updated test cases in Jest Test Suite 14. Updated snapshots to account for EuiButton Emotion conversion. Opted to use .render() when updating a few snapshots to reduce the large length of snapshots caused by Emotion

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Revised a change to betaBadgeProps to ensure that the label is available. If not, the value for the badge with be set to undefined.

* Resolved two linting errors

* Resolved two linting errors

* Updated Jest unit tests in various suites.
Updated snapshots to account for EuiButton Emotion conversion. Updated snapshots for EuiTooltip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles.

* Updated EuiFlyout in query_flyout.tsx to remove the onClick function from maskProps as it is no longer available. Updated this flyout to use ownFocus and not to close when the overlay mask is clicked.

* Removed the use of EuiButtonIconColor in favor of EuiButtonIconProps['color']

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Updated Cypress test looking for strict equality on EuiPaginationButton class names to match a substring of the Emotion generated class name

* Removed unneeded debugging code. Updated snapshots for various test suites to account for the recent EuiButton Emotion conversion

* Updated a few EuiButton, EuiButtonEmpty, and EuiText components that set the color as ghost. The ghost color mode has been deprecated as of PR #6150. These components now are wrapped in EuiThemeProvider with a dark colorMode to create the previous ghost color.

* Resolved  TS error with EuiCard betaBadgeProps

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Remove references to now-removed EuiFlyout CSS classes/vars

* Remove now-removed euiBadge className references

- Convert directly to EuiBadge instead of using CSS

- Remove confusing and now-possibly-irrelevant CSS badge overrides - left/right icons are now set via JSX and not via flex-direction

* Pre-emptively fix various euiOverlayMask CSS overrides

- this data attr isn't technically in yet but will be once https://github.com/elastic/eui/pull/6289 merges

- at the very least this isn't breaking any more than it currently already is!

* Update to v67.1.3

* v67.1.4

* Resolved test failing test case in Security/Manage/Blocklist. The test did not remove focus from the last combo box in the form, which didn't allow the disbaled attribute to be removed from the flyout submit button. I've updated the mock file for Blocklist to return focus to the first form element in the flyout to allow the disabled attribute to be removed.

* Updated snapshots to account for the recent EuiText Emotion conversion

* Fix Log's custom tooltips relying on EuiTooltip classNames that no longer exist

* Fix Vega vis custom tooltips relying on EuiTooltip classNames that no longer exist

- this one is trickier than Log's as it's not using React, so we need to use Emotion's Global to set a static className

* Convert remaining vega_vis.scss to Emotion

- as an example of how other global + non global styles could be handled in the future

* Fix references to removed `euiPaginationButton-isActive` className

- use aria-current attribute instead

* Added missing EuiFlyoutAnimation keyframes for EuiFlyout. This resolved test that failed because they used onAnimationEnd because the FlyoutAnimation could not be found.

* Reolved Jest Tests in suites 1 and 5. Updated snapshots to account for the recent EuiButton Emotion conversion. Updated snapshots for EuiToolTip as it now contains the new EuiToolTipAnchor component that replaced the tooltip anchor styles.

* iterate on rules_list.test.tsx

* bump eui to v67.1.5

* Updatde snapshots for jest test suites to account for the recent EuiButton, EuiOverlayMask, EuiTooltip, and EuiBadge Emotion conversions

* Resolved failing security test by updating the target element for CONNECTOR_TITLE. EuiCard has recently been converted to Emotion and the card title is no longer wrapper in a span.

* Resolved failing test case in Runtime Fields. The modify runtime field test was failing because the combobox responsbible for adding and updating scripts was not appearing. The textbox did not appear because the shared setFieldScript function targets and toggles the script textbox when opening the flyout. When a runtime field is being modified, the toggle is already active and using the shared function will trigger the toggle again (losing access to the script textbox).
Also resolved an issue that prevented the warning EuiCallout to appear when changing the type of a runtime field from its original type. Resolved this by adding an enter keypress at the end of setFieldType function to confirm the type selection, thus triggering the EuiCallout

* Resolved two tests that were failing in Lens. These test were failing because they were checking for equality in class names that no longer exist within EuiButtonGroup as it was recently converted to Emotion. These tests were updated to check for a substring of the new and longer class name

* Quick fix in test case failing because of misspelling in data-test-sub

* Updated snapshot for Jest test case as EuiButton as recently been converted to Emotion

* Removed console.log statement. Oops!

* Resolved a failing test case in Lens. They were failing because they were checking for equality in class names that no longer exist within EuiButtonGroup as it was recently converted to Emotion. These tests were updated to check for a substring of the new and longer class name.
Updated a Security test case by giving a target button the data-test-subj attribute for easier querying

* Removed reference to EuiFlyout mixin as it has been converted to Emotion. Updated the reference to an interal copy of EuiFlyout styles

* Corrected spelling error in EuiFlyout animation in Lens app

* Update EUI with latest backport

* Update button snapshots

* fix another button snapshot

* More snapshot fixes

* [EuiButton][Security] Fix button relying on now-removed `euiButton__text` CSS

- replace removed CSS with `eui-textTruncate` util instead

- combine/DRY out unnecessary span - was affecting min-width of truncation util

+ increase screenshot diff limit - this was smaller than updating the actual baseline screenshots for whatever reason (likely render diff between local and CI)

* Fix remaining Jest tests affected by Emotion conversions

- because Emotion creates its own wrapper, `.first()` can no longer be used - prefer `.last()` instead

* Fix Jest test affected by EuiButton Emotion conversion + removed modifier class

- targeting the native DOM node + filtering by disabled true/false gets us back to the 'correct' lengths

* Fix + improve flyout test

- `.last()` changes to account for EuiButton Emotion conversion is needed, but the last onClose assertion still fails due to us having modified inputs, and the confirm modal being displayed

- split test into two separate tests - one testing the onClose call, and the other testing the confirm modal

* derpin

* Skip rules_list Jest suite

* Update new EuiButton snapshot

* Upgraded EUI version to 67.1.7

* [EuiCard] Update snapshots

* [EuiPopover] Update snapshots

* [QA] Fix missing Vega warn/error message colors

;_;

* [CI] Auto-commit changed files from 'node scripts/generate codeowners'

* Fix Lens kbnToolbarButton regressions

- Caused by flattening of EUI button CSS specificity

- background-color was previously relying on isDisabled CSS specificity to override its #fff color

- `text` color modifier & `!important` is no longer needed and overrides Emotion CSS flatly

- isDisabled class is no longer needed - euiButton no longer sets `pointer-events: none` on disabled buttons (fixes tooltip bug in webkit as well)

* Backport EUI 67.1.8 fixes

* Update EuiCard snapshots

* Fix EuiModal form wrapper causing overflow issues

- see https://elastic.github.io/eui/#/layout/modal#forms-in-a-modal

* Workaround for `.kbnOverlayMountWrapper` mount point causing overflow issues

- not sure what all is using this modal service to be honest, but the wrapper is causing issues with the modal layout, this fixes overflow issues but will not fix any mask-image issues as a result

* more snapshot updates

* EuiButton - added textProps to EuiButton to prevent very long button names from spilling over outside of the container

* EuiButton - Update EuiButton related snapshots. Updated tests that target EuiButton directly to use a data-telementary-id for more specific element querying required by Emotion

* QA - Removed unnecessary comment in code

* Temporary fix for EuiCard[selectable][layout=horizontal] instances on security solutions' rule page

* Temporary fix for EuiCard[selectable][layout=horizontal] instances on osquery live query and canvas's datasource selector

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Fix CSS specificity, where canvas's solutionToolbarButton's background-color now takes precedence over EuiButton's primary styles

* Removed update to search_marker_tooltip that removed the euiTooltip styles and replaced then with Emotion styling. Added EuiTooltip Sass styles for the component to rely on to test for a styling bug that is causing the tooltip and the tooltip arrow to be out of sync with each other.

* Lint Sass file

* Lint Sass file

* Removed overflow:hidden style from .vgaVis_view as it was causing euiScrollStyles not to present the scroll bars in Vega Vis

* Remove typo from EuiButton textProps object. 'className' should not have been included in the actual class name

* Revert tooltip Sass

This reverts commit 20e6ead571, a5cd2de901, and c605cbd7b9

* Fix Emotion tooltip arrows

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen@elastic.co>
Co-authored-by: Chandler Prall <chandler.prall@elastic.co>
2022-11-07 21:45:50 +00:00
Michael Dokolin
0a72c67838
[Embeddable] Add unified error UI (#143367)
* Refactor embeddable error handler
* Remove embeddable error handler from the visualization embeddable
* Update Lens embeddable to handle errors correctly
2022-11-04 16:46:32 +01:00
Yaroslav Kuznietsov
f065d66bb8
[Lens] PartitionVis expression types improvement. (#144248)
* Partition labels added.

* Theme function added.

* Added partitionVis types safety.

* Fixed visdimension generation.

* Update x-pack/plugins/lens/public/visualizations/partition/to_expression.ts

Co-authored-by: Andrew Tate <drewctate@gmail.com>

* Update x-pack/plugins/lens/public/visualizations/partition/to_expression.ts

Co-authored-by: Andrew Tate <drewctate@gmail.com>

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Fixed types.

Co-authored-by: Andrew Tate <drewctate@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-03 11:20:41 -07:00
Joe Reuter
cc4be7e612
[Lens] Allow date functions in formula (#143632)
* allow date functions in formula

* fix tests

* fix test

* fix review comments

* fix test

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2022-11-03 11:35:46 +01:00
Yaroslav Kuznietsov
5abc674b06
[Lens] Metric expression types improvement. (#144239)
* Added metricTrendlineFn.

* Added metricVis type safety.
2022-11-03 08:49:10 +02:00
Stratoula Kalafateli
a6ab758e5f
[Lens] Text based languages fixes and UX improvements (#144306)
* [Lens] Fixes wrong label color on field duplication

* Update meta information on selected field update

* Mark as incompatible all the non numeric fields for the metrics fields selection

* Restrict dropping non mumeric fields on metric dimensions

* Update functional tests
2022-11-03 08:44:53 +02:00
Yaroslav Kuznietsov
2db1920f94
[Lens] Legacy metric expression types improvement. (#144236)
* FontFn converted to builder.

* labelFontFn added.

* visdimensionFn added.

* Added legacyMetricVisFn.

* Added expression-legacy-metric-plugin as optional dependency to lens.
2022-11-02 17:19:06 +02:00
Stratoula Kalafateli
1fb018bb78
[Lens] Hide the titles of the axis from the preview (#144397) 2022-11-02 14:53:54 +02:00
Julia Rechkunova
ca1c58d3df
[UnifiedFieldList] Migrate field list components from Lens to UnifiedFieldList (#142758)
* [UnifiedFieldList] Extract FieldsAccordion component from Lens

* [UnifiedFieldList] Extract FieldList component from Lens

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* [UnifiedFieldList] Rename component

* [UnifiedFieldList] Start extracting logic for fetching fields existence info

* [UnifiedFieldList] Start extracting logic for fetching fields existence info

* [UnifiedFieldList] Fix special and runtime fields

* [UnifiedFieldList] Start extracting logic for fetching fields existence info

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* [UnifiedFieldList] Make API stricter

* [UnifiedFieldList] Make sure that key is specified for items

* [UnifiedFieldList] Fetch data for all active data views

* [UnifiedFieldList] Refactor some other occurances

* [UnifiedFieldList] Update more tests

* [UnifiedFieldList] Fix some checks

* [UnifiedFieldList] Some progress on updating tests

* [UnifiedFieldList] Update more tests

* [UnifiedFieldList] Skip redundant request's results

* [UnifiedFieldList] Update more tests

* [UnifiedFieldList] Improve tests

* [UnifiedFieldList] Improve tests

* [UnifiedFieldList] Improve tests

* [UnifiedFieldList] Move grouping into a customizable hook

* [UnifiedFieldList] Fix after the merge

* [UnifiedFieldList] Fix checks

* Revert "[UnifiedFieldList] Fix after the merge"

This reverts commit 500db7ed89.

* [UnifiedFieldList] Handle merge better

* [UnifiedFieldList] Update the naming

* [UnifiedFieldList] Support Selected fields

* [UnifiedFieldList] Update tests

* [UnifiedFieldList] Fix grouping

* [UnifiedFieldList] Update more tests

* [UnifiedFieldList] Fix refetch after adding a field

* [UnifiedFieldList] Load es query builder in async way

* [UnifiedFieldList] Fix a bug in case of renaming a field

* [UnifiedFieldList] Small refactoring

* [UnifiedFieldList] Refactor text based view

* [UnifiedFieldList] Better types support

* [UnifiedFieldList] Simplify props

* [UnifiedFieldList] Fix types

* [UnifiedFieldList] Async loading for FieldListGrouped code

* [UnifiedFieldList] Add more tests

* [UnifiedFieldList] Add more tests

* [UnifiedFieldList] Add more tests

* [UnifiedFieldList] Add more tests

* [UnifiedFieldList] Add more tests

* [UnifiedFieldList] Add more tests

* [UnifiedFieldList] Add more tests

* [UnifiedFieldList] Add docs

* [UnifiedFieldList] Clean up

* [UnifiedFieldList] Fix onNoData callback

* [UnifiedFieldList] Address PR comments

* [UnifiedFieldList] Address PR comments

* [UnifiedFieldList] Support a custom data-test-subj

* [UnifiedFieldList] Fix concurrency handling logic

* [UnifiedFieldList] Remove a generic tooltip message. Lens and Discover will have their own tooltips.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2022-11-02 13:18:21 +01:00
Angela Chuang
e6ae2f2cee
[Security Solution] Add custom features to lens (#138995)
* allows not to show inspector

* pass adapters to onLoad

* update unit tests

* metric alignment

* clean up

* update style

* fix type error

* fix types

* clean up types

* fix unit tests

* fix unit tests

* reuse textAlignment

* update configs

* remove unused args

* rm unused props

* fix types

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* fix unit tests

* update FTR configs

* update snapshot

* rename arg

* update lens attributes

* revert picture

* add comment

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-02 04:39:48 -07:00
Yaroslav Kuznietsov
3f620428b3
[Lens] Heatmap expression types improvement. (#144174)
* Added expression function builder for heatmap

* Fixed heatmap preview.

* Fixed tests.

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2022-11-02 03:39:30 -07:00
Alexey Antonov
d9adcfee0e
[Lens] Shard failure notices make it impossible to use Lens (#142985)
* [Lens] Shard failure notices make it impossible to use Lens

* rename getTSDBRollupWarningMessages -> getShardFailuresWarningMessages

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* update UI

* push some logic

* fix CI

* push some changes

* delete outdated test

* fix CI

* push some logic

* add KibanaThemeProvider

* apply UI changes for shard_failure_open_modal_button

* cleanup

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2022-11-01 15:58:05 +03:00
Yaroslav Kuznietsov
74829e527f
[Lens] Datatable expression types improvement. (#144173)
* Fixed way of expression building at Lens datatable.

* CollapseFn type safety added.

* Removed duplicated export.

* Small refactoring

* Added datatableColumnFn expression.

* Added type safety for datatable fn.

* Update x-pack/plugins/lens/public/visualizations/datatable/visualization.test.tsx

Co-authored-by: Andrew Tate <drewctate@gmail.com>

Co-authored-by: Andrew Tate <drewctate@gmail.com>
2022-11-01 10:26:32 +02:00
Michael Dokolin
9456303c97
[Monaco] Add JSON syntax support to the Monaco editor (#143739)
* Add JSON syntax support to the Monaco editor
* Bump `monaco-editor` version
* Fix the `monaco` package and usages to initialize lazily
* Add a story demonstrating JSON schema usage
2022-11-01 08:54:33 +01:00
Yaroslav Kuznietsov
c7769ce1a9
[Lens] Gauge expression types improvement. (#144168)
* Provided expression type.

* FIxed types.
2022-10-28 18:30:03 +03:00
Yaroslav Kuznietsov
9ae38803d8
[Lens][Agg based Heatmap] Navigate to Lens Agg based Heatmap. (#143820)
* Added base code for converting heatmap to lens.

* Added navigateToLens to visType.

* Added canNavigateToLens event.

* Fixed type.

* Added basic support of heatmap converting to lens.

* Added visType as arg.

* Added validation according to the

* Fixed heatmap std_dev.

* Fixed failing xy.

* Fixed tests.

* Added config for legend.

* Added support of converting color ranges.

* Fixed palette for default ranges.

* Refactored.

* Added tests for convertToLens.

* Added tests for getConfiguration.

* Fixed problem

* Added basic functional tests for heatmap.

* Added functional test for not convertable case.

* Added tests for not valid config and fixed one with valid.

* Added test for custom ranges.

* Added empty filters if x-axis is not defined.

- Added empty filters if y-axis is defined, but x-axis is not and if no x/y-axis was defined.
- Added/fixed tests.

* Removed unused service.

* Histogram problems fixed.

* Fixed include/exclude regexp.

* Fixed terms.
2022-10-27 18:00:09 +03:00
Marco Liberati
83e85bd960
[Lens] Revisit Random sampling UI (#143929)
* 💄 Revisit settings ui

* Design suggestions (#18)

Co-authored-by: Michael Marcialis <michael@marcial.is>
2022-10-27 16:16:57 +02:00
Marco Liberati
2efad9d15a
[Lens][Unified Field list] Add functional tests to fields lists and summary popover (#143747)
* ♻️ Add testId handlers

*  Add functional tests

* 💄 Wrap unsupported messages with testId

* 🔧 Enable creation of dataViews without timefield

*  Extends tests for other dataview types + runtime fields

*  Add more checks on top values charts

* 👌 Integrated feedback

* 🐛 Fix testIds and added some logging
2022-10-27 15:32:11 +02:00
Marco Liberati
30f585be41
[Lens] Add advanced params to formula API (#143876)
*  Add supported global params to formula api

*  Add tests
2022-10-27 10:28:22 +02:00
Jonathan Budzenski
be432c0d89
Upgrade to Jest 27 (#139335)
* Upgrade to Jest 27

* fix test
2022-10-25 14:38:38 -05:00
Kaarina Tungseth
2cb04a6ac5
[Lens] Updates the Average and Count quick function definitions (#143872)
* Updates Edit data view link copy

* [Lens] Updates the Average and Count quick function definitions

* Reverts Stack Management change

* Removes spacing from Count definition
2022-10-25 09:18:43 -05:00
Marco Liberati
8ec679878b
♻️ Unskip and fix tests (#143931) 2022-10-25 14:50:13 +02:00
Stratoula Kalafateli
1b5ea75bb9
[Unified search] Distinguishes the adhoc from the permanent dataviews on the pickers (#143525)
* In progress add icon to the adhoc picker

* [Unified search] Adds an icon to indicate that the selected dataview is not persisted

* Remove unused icon

* Add a temporary badge to the list

* Compare with the currentIndexpattern id
2022-10-25 09:10:35 +02:00
Tiago Costa
f402274270
skip flaky suite (#143907, #143908) 2022-10-24 22:19:12 +01:00
Andrew Tate
15ef4a0bcc
[Lens] Metric trendlines design changes (#143781) 2022-10-24 14:54:15 -05:00
Marco Liberati
9d819bac92
[Lens] Random sampling feature (#143221)
*  First pass with UI for random sampling

*  Initial working version

* 🔥 Remove unused stuff

* 🔧 Refactor layer settings panel

* 🐛 Fix terms other query and some refactor

* 🏷️ Fix types issues

* 🐛 Fix sampling for other terms agg

* 🐛 Fix issue with count operation

*  Fix jest tests

* 🐛 fix test stability

* 🐛 fix test with newer params

* 💄 Add tech preview label

*  Add new tests for sampling

*  Add more tests

*  Add new test for suggestions

*  Add functional tests for layer actions and random sampling

* Update x-pack/plugins/lens/public/datasources/form_based/layer_settings.tsx

Co-authored-by: Michael Marcialis <michael@marcial.is>

* 👌 Integrated design feedback

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Michael Marcialis <michael@marcial.is>
2022-10-24 18:45:09 +02:00
Stratoula Kalafateli
4349ea70ee
[Lens] Use the language-documentation package for formula (#143649)
* [Lens] Used documentation package for formula

* fix

* Rename file

* Cleanup formula css

* Cleanup the documentation.scss

* Fixes

* More cleanup
2022-10-21 09:00:27 +03:00
Stratoula Kalafateli
e1478581b3
[Lens] Fixes bug with removing layer with trendline (#143723)
* [Lens] Fixes bug with removing layer with trendline

* Add unit tests

* Update x-pack/plugins/lens/public/datasources/form_based/form_based.tsx

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2022-10-20 19:35:11 +03:00
Matthew Kime
631c24abf4
[unified search] Query string input uses data views plugin directly instead of via deprecated data plugin reference (#143611)
* use data views plugin

* remove unneeded dependency

* use data views plugin

* fix type

* type fix

* supply dataViews as depedency

* supply dataViews as depeden
2022-10-20 07:15:33 -07:00