# Backport
This will backport the following commits from `main` to `8.12`:
- [[Lens] stop gap solution for invalid formula and math columns
(#175644)](https://github.com/elastic/kibana/pull/175644)
<!--- Backport version: 9.4.3 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Drew
Tate","email":"drew.tate@elastic.co"},"sourceCommit":{"committedDate":"2024-01-26T06:09:57Z","message":"[Lens]
stop gap solution for invalid formula and math columns (#175644)\n\n##
Summary\r\n\r\nA stop-gap solution for
https://github.com/elastic/kibana/issues/168561\r\n\r\nThis
visualization can be used to
test.\r\n\r\n```\r\n{\"attributes\":{\"fieldFormatMap\":\"{\\\"hour_of_day\\\":{}}\",\"name\":\"Kibana
Sample Data
Logs\",\"runtimeFieldMap\":\"{\\\"hour_of_day\\\":{\\\"type\\\":\\\"long\\\",\\\"script\\\":{\\\"source\\\":\\\"emit(doc['timestamp'].value.getHour());\\\"}}}\",\"timeFieldName\":\"timestamp\",\"title\":\"kibana_sample_data_logs\"},\"coreMigrationVersion\":\"8.8.0\",\"created_at\":\"2024-01-24T19:57:34.193Z\",\"id\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"managed\":false,\"references\":[],\"type\":\"index-pattern\",\"typeMigrationVersion\":\"8.0.0\",\"updated_at\":\"2024-01-24T19:57:34.193Z\",\"version\":\"WzM1LDFd\"}\r\n{\"attributes\":{\"description\":\"\",\"state\":{\"adHocDataViews\":{},\"datasourceStates\":{\"formBased\":{\"layers\":{\"7945fa55-b9ea-4b10-a498-e265ef192d7d\":{\"columnOrder\":[\"207508ea-7433-494f-9925-70d55831c74c\",\"36d445ea-dd2a-4b13-96e2-d51d07d98f70\",\"36d445ea-dd2a-4b13-96e2-d51d07d98f70X0\"],\"columns\":{\"207508ea-7433-494f-9925-70d55831c74c\":{\"dataType\":\"date\",\"isBucketed\":true,\"label\":\"timestamp\",\"operationType\":\"date_histogram\",\"params\":{\"dropPartials\":false,\"includeEmptyRows\":true,\"interval\":\"auto\"},\"scale\":\"interval\",\"sourceField\":\"timestamp\"},\"36d445ea-dd2a-4b13-96e2-d51d07d98f70\":{\"dataType\":\"number\",\"isBucketed\":false,\"label\":\"median(bytes)\",\"operationType\":\"formula\",\"sourceField\":\"___records___\",\"params\":{\"formula\":\"median(bytes)\",\"isFormulaBroken\":false},\"references\":[\"36d445ea-dd2a-4b13-96e2-d51d07d98f70X0\"],\"scale\":\"ratio\"},\"36d445ea-dd2a-4b13-96e2-d51d07d98f70X0\":{\"customLabel\":true,\"dataType\":\"number\",\"isBucketed\":false,\"label\":\"Part
of
median(bytes)\",\"operationType\":\"median\",\"params\":{\"emptyAsNull\":false},\"scale\":\"ratio\",\"sourceField\":\"bytes\"}},\"incompleteColumns\":{},\"sampling\":1}}},\"indexpattern\":{\"layers\":{}},\"textBased\":{\"layers\":{}}},\"filters\":[],\"internalReferences\":[],\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"visualization\":{\"axisTitlesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"fittingFunction\":\"None\",\"gridlinesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"labelsOrientation\":{\"x\":0,\"yLeft\":0,\"yRight\":0},\"layers\":[{\"accessors\":[\"36d445ea-dd2a-4b13-96e2-d51d07d98f70\"],\"layerId\":\"7945fa55-b9ea-4b10-a498-e265ef192d7d\",\"layerType\":\"data\",\"position\":\"top\",\"seriesType\":\"bar_stacked\",\"showGridlines\":false,\"xAccessor\":\"207508ea-7433-494f-9925-70d55831c74c\"}],\"legend\":{\"isVisible\":true,\"position\":\"right\"},\"preferredSeriesType\":\"bar_stacked\",\"tickLabelsVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"valueLabels\":\"hide\"}},\"title\":\"Vis
with
formula\",\"visualizationType\":\"lnsXY\"},\"coreMigrationVersion\":\"8.8.0\",\"created_at\":\"2024-01-25T21:12:58.923Z\",\"id\":\"2139b4e8-ee7c-41dc-9564-74b7c1e54216\",\"managed\":false,\"references\":[{\"id\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"name\":\"indexpattern-datasource-layer-7945fa55-b9ea-4b10-a498-e265ef192d7d\",\"type\":\"index-pattern\"}],\"type\":\"lens\",\"typeMigrationVersion\":\"8.9.0\",\"updated_at\":\"2024-01-25T21:12:58.923Z\",\"version\":\"WzgwLDFd\"}\r\n{\"excludedObjects\":[],\"excludedObjectsCount\":0,\"exportedCount\":2,\"missingRefCount\":0,\"missingReferences\":[]}\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- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\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)","sha":"0dfff4c208d4c4c78c14c8b46dff841689623ee4","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:prev-minor","v8.12.1","v8.13.0"],"title":"[Lens]
stop gap solution for invalid formula and math
columns","number":175644,"url":"https://github.com/elastic/kibana/pull/175644","mergeCommit":{"message":"[Lens]
stop gap solution for invalid formula and math columns (#175644)\n\n##
Summary\r\n\r\nA stop-gap solution for
https://github.com/elastic/kibana/issues/168561\r\n\r\nThis
visualization can be used to
test.\r\n\r\n```\r\n{\"attributes\":{\"fieldFormatMap\":\"{\\\"hour_of_day\\\":{}}\",\"name\":\"Kibana
Sample Data
Logs\",\"runtimeFieldMap\":\"{\\\"hour_of_day\\\":{\\\"type\\\":\\\"long\\\",\\\"script\\\":{\\\"source\\\":\\\"emit(doc['timestamp'].value.getHour());\\\"}}}\",\"timeFieldName\":\"timestamp\",\"title\":\"kibana_sample_data_logs\"},\"coreMigrationVersion\":\"8.8.0\",\"created_at\":\"2024-01-24T19:57:34.193Z\",\"id\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"managed\":false,\"references\":[],\"type\":\"index-pattern\",\"typeMigrationVersion\":\"8.0.0\",\"updated_at\":\"2024-01-24T19:57:34.193Z\",\"version\":\"WzM1LDFd\"}\r\n{\"attributes\":{\"description\":\"\",\"state\":{\"adHocDataViews\":{},\"datasourceStates\":{\"formBased\":{\"layers\":{\"7945fa55-b9ea-4b10-a498-e265ef192d7d\":{\"columnOrder\":[\"207508ea-7433-494f-9925-70d55831c74c\",\"36d445ea-dd2a-4b13-96e2-d51d07d98f70\",\"36d445ea-dd2a-4b13-96e2-d51d07d98f70X0\"],\"columns\":{\"207508ea-7433-494f-9925-70d55831c74c\":{\"dataType\":\"date\",\"isBucketed\":true,\"label\":\"timestamp\",\"operationType\":\"date_histogram\",\"params\":{\"dropPartials\":false,\"includeEmptyRows\":true,\"interval\":\"auto\"},\"scale\":\"interval\",\"sourceField\":\"timestamp\"},\"36d445ea-dd2a-4b13-96e2-d51d07d98f70\":{\"dataType\":\"number\",\"isBucketed\":false,\"label\":\"median(bytes)\",\"operationType\":\"formula\",\"sourceField\":\"___records___\",\"params\":{\"formula\":\"median(bytes)\",\"isFormulaBroken\":false},\"references\":[\"36d445ea-dd2a-4b13-96e2-d51d07d98f70X0\"],\"scale\":\"ratio\"},\"36d445ea-dd2a-4b13-96e2-d51d07d98f70X0\":{\"customLabel\":true,\"dataType\":\"number\",\"isBucketed\":false,\"label\":\"Part
of
median(bytes)\",\"operationType\":\"median\",\"params\":{\"emptyAsNull\":false},\"scale\":\"ratio\",\"sourceField\":\"bytes\"}},\"incompleteColumns\":{},\"sampling\":1}}},\"indexpattern\":{\"layers\":{}},\"textBased\":{\"layers\":{}}},\"filters\":[],\"internalReferences\":[],\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"visualization\":{\"axisTitlesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"fittingFunction\":\"None\",\"gridlinesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"labelsOrientation\":{\"x\":0,\"yLeft\":0,\"yRight\":0},\"layers\":[{\"accessors\":[\"36d445ea-dd2a-4b13-96e2-d51d07d98f70\"],\"layerId\":\"7945fa55-b9ea-4b10-a498-e265ef192d7d\",\"layerType\":\"data\",\"position\":\"top\",\"seriesType\":\"bar_stacked\",\"showGridlines\":false,\"xAccessor\":\"207508ea-7433-494f-9925-70d55831c74c\"}],\"legend\":{\"isVisible\":true,\"position\":\"right\"},\"preferredSeriesType\":\"bar_stacked\",\"tickLabelsVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"valueLabels\":\"hide\"}},\"title\":\"Vis
with
formula\",\"visualizationType\":\"lnsXY\"},\"coreMigrationVersion\":\"8.8.0\",\"created_at\":\"2024-01-25T21:12:58.923Z\",\"id\":\"2139b4e8-ee7c-41dc-9564-74b7c1e54216\",\"managed\":false,\"references\":[{\"id\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"name\":\"indexpattern-datasource-layer-7945fa55-b9ea-4b10-a498-e265ef192d7d\",\"type\":\"index-pattern\"}],\"type\":\"lens\",\"typeMigrationVersion\":\"8.9.0\",\"updated_at\":\"2024-01-25T21:12:58.923Z\",\"version\":\"WzgwLDFd\"}\r\n{\"excludedObjects\":[],\"excludedObjectsCount\":0,\"exportedCount\":2,\"missingRefCount\":0,\"missingReferences\":[]}\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- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\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)","sha":"0dfff4c208d4c4c78c14c8b46dff841689623ee4"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/175644","number":175644,"mergeCommit":{"message":"[Lens]
stop gap solution for invalid formula and math columns (#175644)\n\n##
Summary\r\n\r\nA stop-gap solution for
https://github.com/elastic/kibana/issues/168561\r\n\r\nThis
visualization can be used to
test.\r\n\r\n```\r\n{\"attributes\":{\"fieldFormatMap\":\"{\\\"hour_of_day\\\":{}}\",\"name\":\"Kibana
Sample Data
Logs\",\"runtimeFieldMap\":\"{\\\"hour_of_day\\\":{\\\"type\\\":\\\"long\\\",\\\"script\\\":{\\\"source\\\":\\\"emit(doc['timestamp'].value.getHour());\\\"}}}\",\"timeFieldName\":\"timestamp\",\"title\":\"kibana_sample_data_logs\"},\"coreMigrationVersion\":\"8.8.0\",\"created_at\":\"2024-01-24T19:57:34.193Z\",\"id\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"managed\":false,\"references\":[],\"type\":\"index-pattern\",\"typeMigrationVersion\":\"8.0.0\",\"updated_at\":\"2024-01-24T19:57:34.193Z\",\"version\":\"WzM1LDFd\"}\r\n{\"attributes\":{\"description\":\"\",\"state\":{\"adHocDataViews\":{},\"datasourceStates\":{\"formBased\":{\"layers\":{\"7945fa55-b9ea-4b10-a498-e265ef192d7d\":{\"columnOrder\":[\"207508ea-7433-494f-9925-70d55831c74c\",\"36d445ea-dd2a-4b13-96e2-d51d07d98f70\",\"36d445ea-dd2a-4b13-96e2-d51d07d98f70X0\"],\"columns\":{\"207508ea-7433-494f-9925-70d55831c74c\":{\"dataType\":\"date\",\"isBucketed\":true,\"label\":\"timestamp\",\"operationType\":\"date_histogram\",\"params\":{\"dropPartials\":false,\"includeEmptyRows\":true,\"interval\":\"auto\"},\"scale\":\"interval\",\"sourceField\":\"timestamp\"},\"36d445ea-dd2a-4b13-96e2-d51d07d98f70\":{\"dataType\":\"number\",\"isBucketed\":false,\"label\":\"median(bytes)\",\"operationType\":\"formula\",\"sourceField\":\"___records___\",\"params\":{\"formula\":\"median(bytes)\",\"isFormulaBroken\":false},\"references\":[\"36d445ea-dd2a-4b13-96e2-d51d07d98f70X0\"],\"scale\":\"ratio\"},\"36d445ea-dd2a-4b13-96e2-d51d07d98f70X0\":{\"customLabel\":true,\"dataType\":\"number\",\"isBucketed\":false,\"label\":\"Part
of
median(bytes)\",\"operationType\":\"median\",\"params\":{\"emptyAsNull\":false},\"scale\":\"ratio\",\"sourceField\":\"bytes\"}},\"incompleteColumns\":{},\"sampling\":1}}},\"indexpattern\":{\"layers\":{}},\"textBased\":{\"layers\":{}}},\"filters\":[],\"internalReferences\":[],\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"visualization\":{\"axisTitlesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"fittingFunction\":\"None\",\"gridlinesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"labelsOrientation\":{\"x\":0,\"yLeft\":0,\"yRight\":0},\"layers\":[{\"accessors\":[\"36d445ea-dd2a-4b13-96e2-d51d07d98f70\"],\"layerId\":\"7945fa55-b9ea-4b10-a498-e265ef192d7d\",\"layerType\":\"data\",\"position\":\"top\",\"seriesType\":\"bar_stacked\",\"showGridlines\":false,\"xAccessor\":\"207508ea-7433-494f-9925-70d55831c74c\"}],\"legend\":{\"isVisible\":true,\"position\":\"right\"},\"preferredSeriesType\":\"bar_stacked\",\"tickLabelsVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"valueLabels\":\"hide\"}},\"title\":\"Vis
with
formula\",\"visualizationType\":\"lnsXY\"},\"coreMigrationVersion\":\"8.8.0\",\"created_at\":\"2024-01-25T21:12:58.923Z\",\"id\":\"2139b4e8-ee7c-41dc-9564-74b7c1e54216\",\"managed\":false,\"references\":[{\"id\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"name\":\"indexpattern-datasource-layer-7945fa55-b9ea-4b10-a498-e265ef192d7d\",\"type\":\"index-pattern\"}],\"type\":\"lens\",\"typeMigrationVersion\":\"8.9.0\",\"updated_at\":\"2024-01-25T21:12:58.923Z\",\"version\":\"WzgwLDFd\"}\r\n{\"excludedObjects\":[],\"excludedObjectsCount\":0,\"exportedCount\":2,\"missingRefCount\":0,\"missingReferences\":[]}\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- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\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)","sha":"0dfff4c208d4c4c78c14c8b46dff841689623ee4"}}]}]
BACKPORT-->
Co-authored-by: Drew Tate <drew.tate@elastic.co>
# Backport
This will backport the following commits from `main` to `8.12`:
- [[Lens] Fix table alignment
(#173908)](https://github.com/elastic/kibana/pull/173908)
<!--- Backport version: 9.4.3 -->
### 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":"2024-01-02T12:54:07Z","message":"[Lens]
Fix table alignment (#173908)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/173902\r\n\r\nFix issue and
introduces also a unit
test.\r\n\r\n\r\n\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\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli
<efstratia.kalafateli@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"2cddc6036879380723e3c3a6b382fb84217070aa","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:prev-minor","v8.12.0","v8.13.0"],"title":"[Lens]
Fix table
alignment","number":173908,"url":"https://github.com/elastic/kibana/pull/173908","mergeCommit":{"message":"[Lens]
Fix table alignment (#173908)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/173902\r\n\r\nFix issue and
introduces also a unit
test.\r\n\r\n\r\n\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\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli
<efstratia.kalafateli@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"2cddc6036879380723e3c3a6b382fb84217070aa"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/173908","number":173908,"mergeCommit":{"message":"[Lens]
Fix table alignment (#173908)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/173902\r\n\r\nFix issue and
introduces also a unit
test.\r\n\r\n\r\n\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\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli
<efstratia.kalafateli@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"2cddc6036879380723e3c3a6b382fb84217070aa"}}]}]
BACKPORT-->
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
# Backport
This will backport the following commits from `main` to `8.12`:
- [[Lens] Fix context formula functions
(#172710)](https://github.com/elastic/kibana/pull/172710)
<!--- Backport version: 8.9.8 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Drew
Tate","email":"drew.tate@elastic.co"},"sourceCommit":{"committedDate":"2023-12-19T15:32:31Z","message":"[Lens]
Fix context formula functions (#172710)\n\n## Summary\r\nFix
f5b50ffa-4a03-45ee-bc7a-2f2aca7fa3bd\r\n\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\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"99763dc61647c817384019f6603de7ad258eea01","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:ExpressionLanguage","Team:Visualizations","Feature:Lens","backport:prev-minor","v8.13.0"],"number":172710,"url":"https://github.com/elastic/kibana/pull/172710","mergeCommit":{"message":"[Lens]
Fix context formula functions (#172710)\n\n## Summary\r\nFix
f5b50ffa-4a03-45ee-bc7a-2f2aca7fa3bd\r\n\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\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"99763dc61647c817384019f6603de7ad258eea01"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172710","number":172710,"mergeCommit":{"message":"[Lens]
Fix context formula functions (#172710)\n\n## Summary\r\nFix
f5b50ffa-4a03-45ee-bc7a-2f2aca7fa3bd\r\n\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\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"99763dc61647c817384019f6603de7ad258eea01"}}]}]
BACKPORT-->
# Backport
This will backport the following commits from `main` to `8.12`:
- [[Lens] unify expression search context type
(#172738)](https://github.com/elastic/kibana/pull/172738)
This is a prerequisite to backporting
https://github.com/elastic/kibana/pull/172710
<!--- Backport version: 8.9.8 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Drew
Tate","email":"drew.tate@elastic.co"},"sourceCommit":{"committedDate":"2023-12-11T14:08:00Z","message":"[Lens]
unify expression search context type (#172738)\n\n##
Summary\r\n\r\nWhile working on
https://github.com/elastic/kibana/pull/172710 I noticed\r\nhow loose our
search context types were. This leeway seems like overkill\r\ngiven how
we actually use the expressions
framework.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"570937ff19c500d0d54b605b0602b6ffb2a6fb10","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:ExpressionLanguage","Team:Visualizations","release_note:skip","backport:skip","v8.13.0"],"number":172738,"url":"https://github.com/elastic/kibana/pull/172738","mergeCommit":{"message":"[Lens]
unify expression search context type (#172738)\n\n##
Summary\r\n\r\nWhile working on
https://github.com/elastic/kibana/pull/172710 I noticed\r\nhow loose our
search context types were. This leeway seems like overkill\r\ngiven how
we actually use the expressions
framework.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"570937ff19c500d0d54b605b0602b6ffb2a6fb10"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172738","number":172738,"mergeCommit":{"message":"[Lens]
unify expression search context type (#172738)\n\n##
Summary\r\n\r\nWhile working on
https://github.com/elastic/kibana/pull/172710 I noticed\r\nhow loose our
search context types were. This leeway seems like overkill\r\ngiven how
we actually use the expressions
framework.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"570937ff19c500d0d54b605b0602b6ffb2a6fb10"}}]}]
BACKPORT-->
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Backport
This will backport the following commits from `main` to `8.12`:
- [[Lens] Fix crash on chart type change via suggestions
(#173523)](https://github.com/elastic/kibana/pull/173523)
<!--- 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":"2023-12-18T14:59:53Z","message":"[Lens]
Fix crash on chart type change via suggestions (#173523)\n\n##
Summary\r\n\r\nUse the correct `activeVisualization` on chart type
change
by\r\nsuggestions:\r\n\r\n\r\n","sha":"99f3001715f0484190be0ceb36f2328f31f4e682","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","backport:prev-minor","Feature:ES|QL","v8.12.0","v8.13.0"],"number":173523,"url":"https://github.com/elastic/kibana/pull/173523","mergeCommit":{"message":"[Lens]
Fix crash on chart type change via suggestions (#173523)\n\n##
Summary\r\n\r\nUse the correct `activeVisualization` on chart type
change
by\r\nsuggestions:\r\n\r\n\r\n","sha":"99f3001715f0484190be0ceb36f2328f31f4e682"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/173523","number":173523,"mergeCommit":{"message":"[Lens]
Fix crash on chart type change via suggestions (#173523)\n\n##
Summary\r\n\r\nUse the correct `activeVisualization` on chart type
change
by\r\nsuggestions:\r\n\r\n\r\n","sha":"99f3001715f0484190be0ceb36f2328f31f4e682"}}]}]
BACKPORT-->
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
# Backport
This will backport the following commits from `main` to `8.12`:
- [[Lens] Fixes wrong tooltip
(#172929)](https://github.com/elastic/kibana/pull/172929)
<!--- 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":"2023-12-11T07:26:54Z","message":"[Lens]
Fixes wrong tooltip (#172929)\n\n## Summary\r\n\r\nBecause the
perfection is in the details, this PR fixes a minor bug in\r\nthe inline
editing of **dataview** mode charts. The tooltip mentions\r\nES|QL while
it
shouldn't","sha":"08693ff1b73f76ed1ab352147c2e36b22e57fd49","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","backport:prev-minor","v8.12.0","v8.13.0"],"number":172929,"url":"https://github.com/elastic/kibana/pull/172929","mergeCommit":{"message":"[Lens]
Fixes wrong tooltip (#172929)\n\n## Summary\r\n\r\nBecause the
perfection is in the details, this PR fixes a minor bug in\r\nthe inline
editing of **dataview** mode charts. The tooltip mentions\r\nES|QL while
it
shouldn't","sha":"08693ff1b73f76ed1ab352147c2e36b22e57fd49"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172929","number":172929,"mergeCommit":{"message":"[Lens]
Fixes wrong tooltip (#172929)\n\n## Summary\r\n\r\nBecause the
perfection is in the details, this PR fixes a minor bug in\r\nthe inline
editing of **dataview** mode charts. The tooltip mentions\r\nES|QL while
it shouldn't","sha":"08693ff1b73f76ed1ab352147c2e36b22e57fd49"}}]}]
BACKPORT-->
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
# Backport
This will backport the following commits from `main` to `8.12`:
- [[Lens] Pass user messages to the config panel
(#172791)](https://github.com/elastic/kibana/pull/172791)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Marta
Bondyra","email":"4283304+mbondyra@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-12-07T13:10:27Z","message":"[Lens]
Pass user messages to the config panel (#172791)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/169175","sha":"8f7a12cc42b4c0d2e14fc8084e2ab0c479d0aa9f","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","backport:prev-minor","v8.12.0","v8.13.0"],"number":172791,"url":"https://github.com/elastic/kibana/pull/172791","mergeCommit":{"message":"[Lens]
Pass user messages to the config panel (#172791)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/169175","sha":"8f7a12cc42b4c0d2e14fc8084e2ab0c479d0aa9f"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172791","number":172791,"mergeCommit":{"message":"[Lens]
Pass user messages to the config panel (#172791)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/169175","sha":"8f7a12cc42b4c0d2e14fc8084e2ab0c479d0aa9f"}}]}]
BACKPORT-->
Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
# Backport
This will backport the following commits from `main` to `8.12`:
- [[Lens] fixed equality check for visualization
(#172685)](https://github.com/elastic/kibana/pull/172685)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Marta
Bondyra","email":"4283304+mbondyra@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-12-07T09:31:38Z","message":"[Lens]
fixed equality check for visualization (#172685)\n\n##
Summary\r\n\r\nFixed an equality check bug for attributesChanged
calculation. It wasn't\r\ntaking into account that visualization can
also have references (to\r\ndataview for annotations) and a custom
isEqual
function.","sha":"9e41850a352a24446a0c49bacffccf93df2547fb","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","v8.12.0","v8.13.0"],"number":172685,"url":"https://github.com/elastic/kibana/pull/172685","mergeCommit":{"message":"[Lens]
fixed equality check for visualization (#172685)\n\n##
Summary\r\n\r\nFixed an equality check bug for attributesChanged
calculation. It wasn't\r\ntaking into account that visualization can
also have references (to\r\ndataview for annotations) and a custom
isEqual
function.","sha":"9e41850a352a24446a0c49bacffccf93df2547fb"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172685","number":172685,"mergeCommit":{"message":"[Lens]
fixed equality check for visualization (#172685)\n\n##
Summary\r\n\r\nFixed an equality check bug for attributesChanged
calculation. It wasn't\r\ntaking into account that visualization can
also have references (to\r\ndataview for annotations) and a custom
isEqual function.","sha":"9e41850a352a24446a0c49bacffccf93df2547fb"}}]}]
BACKPORT-->
Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
Adds optional `minBarHeight` option to the Lens embeddable args, defaults to `1px`. Adds back min bar height of `2px` in discover histogram for large document count variances per https://github.com/elastic/kibana/issues/68436.
## Summary
Reduce a bit the call stack with associated perf speedup in a scenario
with many fields.
*Note*: initially I've optimize somehow the memoization of
`getAvailableOperationsByMetadata` but it was too brittle as changing
something in the dataview leads to wrong results. I'm not sure this
could actually happen in real life ™️ but a test hijacking a bit a
dataView found that out.
## Summary
This PR makes the dashboard SO lighter by removing the initialContext
from the state. It is not needed after the navigation from Discover to
Dashboard and can create SO size problems as it contains a lot of
information for the transition.
## Summary
Fix https://github.com/elastic/kibana/issues/170428
The bug this is intended to resolve requires some in-depth steps to
reproduce. Follow the instructions in the issue above. Then, merge in
this branch and compare.
### Checklist
- [ ] [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
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Fixes partially two remaining tasks from
https://github.com/elastic/kibana/issues/168753
Fixes partially dataview issue from
https://github.com/elastic/kibana/issues/170398
It stretches to maximum approximate 60 characters if any of the labels
in the list is of this length. If the content doesn't need the container
to stretch, it doesn't do it.
<details>
<summary> Field picker in Lens</summary>
minimum width:
<img width="445" alt="Screenshot 2023-11-21 at 15 56 03"
src="2f0f8482-bd00-4ec2-bbde-cbc4f3198eed">
auto-expanded width:
<img width="575" alt="Screenshot 2023-11-21 at 15 58 22"
src="df7bab4d-0a08-4d49-8a91-9386eba15d93">
</details>
<details>
<summary>Layer data view picker in Lens</summary>
<img width="376" alt="Screenshot 2023-11-21 at 16 01 17"
src="b8a98d83-dabc-49bd-a3cc-fc3856de6d3e">
<img width="455" alt="Screenshot 2023-11-21 at 15 58 09"
src="f2c5bde8-7a4a-485f-bf97-fc2179171e50">
<img width="615" alt="Screenshot 2023-11-21 at 15 56 27"
src="0574fc6c-69a3-44e9-9d48-8d427c1c5dba">
</details>
<details> <summary>Data view picker in Unified Search</summary>
<img width="341" alt="Screenshot 2023-11-21 at 16 00 29"
src="1c838ded-0dc5-4632-94e4-1d94586f667c">
<img width="441" alt="Screenshot 2023-11-21 at 15 58 04"
src="87e4f1c0-7922-4b94-a114-f23ece544395">
<img width="561" alt="Screenshot 2023-11-21 at 15 56 20"
src="3ea0f222-5241-4c5b-b00b-4311972754cc">
</details>
<details>
<summary> Data view picker in dashboard Create control flyout</summary>
<img width="677" alt="Screenshot 2023-11-21 at 16 14 00"
src="0455b6ed-555d-4cff-9e34-0de377be6e04">
<img width="682" alt="Screenshot 2023-11-21 at 15 54 56"
src="2a67685c-379d-4c0b-bf56-dbf7c35b3bd4">
</details>
<details>
<summary> Unified search data view select component (tested in
maps)</summary>
<img width="570" alt="Screenshot 2023-11-22 at 14 38 25"
src="bb52ab22-626d-4556-b40c-c9bcc925f426">
</details>
<details>
<summary>Unified search field and value picker</summary>
Adds `panelMinWidth`, removes the custom flex width change behavior
<img width="1142" alt="Screenshot 2023-11-22 at 14 40 26"
src="2450957f-38b7-4a73-b531-7acb29cb56bc">
f4f33624-9287-403e-8472-81f705440f97
</details>
<details>
<summary> Discover breakdown field</summary>
Removes the focus stretching and instead uses the panelMinWidth prop
<img width="419" alt="Screenshot 2023-11-21 at 16 46 50"
src="e35125ad-8823-4bff-954b-8119a352829c">
<img width="619" alt="Screenshot 2023-11-21 at 16 48 20"
src="89e63daf-a59e-43e1-a6ec-91d1b15b0fcd">
</details>
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Part of https://github.com/elastic/kibana/issues/165928
Closes https://github.com/elastic/kibana/issues/144498
Allows the user to edit the ES|QL query from the dashboard. Also allows
the user to select one of the suggestions.
<img width="1886" alt="image"
src="9961c154-e414-4ce1-bff5-33ec5c30db69">
<img width="1883" alt="image"
src="6e8971d3-4a35-466f-804a-b8df58b09394">
### Testing
Navigate to Discover ES|QL mode and save a Lens chart to a dashboard.
Click the edit Visualization.
### Important notes
- We can very easily enable suggestions for the dataview panels but I am
going to do it on a follow up PR to keep this PR clean
- Creation is going to be added on a follow up PR
- Warnings are not rendered in the editor because I am using the limit 0
for performance reasons. We need to find another way to depict them via
the embeddable or store. It will be on a follow up PR.
- Errors are being displayed though. The user is not allowed to apply
the changes when an error occurs.
- Creating ES|QL charts from dashboard will happen to a follow up PR
### Running queries which don't return numeric fields
In these cases (i.e. `from logstash-* | keep clientip` we are returning
a table. I had to change the datatable logic for text based datasource
to not depend to isBucketed flag. This is something we had foreseen from
the [beginning of text based
languages](https://github.com/elastic/kibana/issues/144498)
<img width="1879" alt="image"
src="ca4b66fd-560d-4c1e-881d-b173458a06ae">
### Running queries which return a lot of fields
For queries with many fields Lens is going to suggest a huge table
trying to add the fields to the different dimensions. This is not
something we want:
- not performant
- user possibly will start removing fields from the dimensions
- this table is unreadable
For this reason we decided to select the first 5 fields and then the
user can easily adjust the dimensions with the fields they want.
<img width="1215" alt="image"
src="07d7ee78-0085-41b1-98a0-a77eefbc0dcd">
### Checklist
- [ ] 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)
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/162840
## Summary
This PR adds a visualization alias for the new Links embeddable so that
all Links library items can be managed/edited from the Visualization
library, like so:
8541506b-cfdd-4a2f-8bc2-841220def7a3
However, in order to get the above working, it was unfortunately not as
simple as just adding a visualization alias. Because the Links
embeddable does not have a dedicated editing app (all editing/creation
is done through a flyout), the usual `aliasPath` + `aliasApp` redirect
that happens for editing an alias did not work in this case.
To get around this, I've had to make changes to how aliases are
registered, as well as both the Visualization `VisualizeListing`
component and the generic `TableListViewTableComp` content management
component:
- **Summary of visualization alias changes:**
First off, I made changes to the typing of aliases - specifically,
rather than taking two independent `aliasPath` and `aliasApp` props,
I've combined them into a singular `alias` prop which will either be of
type `{ alias: string; path: string; }` or `{ embeddableType: string;
}`. This makes it easier to determine (a) whether a visualization is of
type `BaseVisType` or `VisTypeAlias` and (b) if it **is** of type
`VisTypeAlias`, how the editing of that vis should be handled.
Specifically, if `alias` is of type `{ alias: string; path: string; }`,
then it is a normal visualization and behaviour should be the same as it
was previously; however, if it is of type `{ embeddableType: string; }`,
then this is an **inline** alias - i.e. editing should be done inline
via the embeddable factory's edit method.
- **Summary of `VisualizeListing` changes**
The primary changes here were made to the `editItem` callback -
specifically, if the fetched saved object has neither an `editApp` nor
an `editUrl`, then it will now try to fetch the embeddable factory for
the given saved object type and, if this factory exists, it will call
the `getExplicitInput` method in order to handle editing.
- **Summary of `TableListViewTableComp` changes**
Previously, an error would be thrown if both a `getDetailViewLink` and
an `onClickTitle` prop were provided - while I understand the original
reasoning for adding this catch, this no longer works if we want to
support inline editing like this. In this case, I needed **only** the
Link embeddable items to have an `onClick` while keeping the behaviour
for other visualizations the same (i.e. all other visualization types
should continue to link off to their specific editor apps) - however,
since this method is not provided **per item**, I had no way of making
an exception for just one specific item type.
Therefore, to get around this, it is now considered to be valid for
**both** the `getDetailViewLink` and `onClickTitle` props to be defined
for the `TableListViewTableComp` component. In order to prevent conflict
between the two props, I have made it so that, if both are provided,
`getDetailViewLink` **always takes precedence** over `onClickTitle` - in
this case, `onClickTitle` will **only** be called if `getDetailViewLink`
returns `undefined` for a given item. I have added a comment to
hopefully make this clear for consumers.
### Checklist
- [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)
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
## Summary
Bug: https://github.com/elastic/kibana/issues/171167
The [previous
implementation](https://github.com/elastic/kibana/pull/170127) solved a
different bug using a new `shouldShowLegendAction` property. This
approach had a limitation on the Security Dashboards page since the
Security app has no control over the properties passed to the
visualization components when they are rendered through portable
Dashboards.
This PR fixes the problem by checking if any of the registered actions
is a "filter" action `type` in the visualizations. If customized filter
actions are found, the default filter actions hardcoded in the
visualizations code are not added, preventing duplication of filter
actions.
The specific action `type` used for the check is the
`FILTER_CELL_ACTION_TYPE = 'cellAction-filter'` constant exported by the
`@kbn/cell-actions` package.
This new approach uses a property stored in the registered actions
themselves, so we don't need to pass any extra property to the
visualization components, it works transparently. So the
`shouldShowLegendAction` property has also been cleaned.
## Demos
Timeline using `showTopN` visualization:
491c08e8-0740-4c9e-9cb7-81267b9ba040
Alerts page using `Counts` table visualization and `showTopN`
visualization
683eec6c-382e-4ae9-9400-c1022922e488
Portable Dashboard visualizations:
50f09a65-488d-41f2-a5b8-3882d9c80678
Security actions are "compatible" only inside the Security app, in the
Lens app the default filter actions are displayed:
<img width="1682" alt="lens-actions-screenshot"
src="1e7ce929-129d-45a9-ba71-8d28e3726454">
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Previously if uses want to save a visualization from Security Solution.
They have to `Open in Lens` first and save it from there. In this PR, we
add a shortcut to the context menu of visualisation so users can save
the visualization without leaving SecuritySolution.
<img width="2544" alt="Screenshot 2023-11-14 at 15 05 09"
src="76c72224-12e8-4e96-8beb-caf1cceed8ef">
## Where to find the action:
### When clicking on the `...`button of visualizations:
fea12472-311a-4bf7-93e7-37c4f6025a5b
### When `editing` dashboard from SecuritySolution:
- Visualizations existing in the library won't have `Save to library`
action.
- Visualizations unlinked from library or never exists in library have
`Save to library` action.
45d7a868-88c4-43e0-bd88-4b907f028d13
## Scenarios:
### Add to library only:
8c1b6a37-7422-4792-a1f3-28af585fd700
### Save visualization to a new dashboard + Add to library:
6f718164-894f-4cbf-b93b-f63904497be6
### Save visualization to a new dashboard only (**NO** added to
library):
31c9a045-de13-4861-b6f9-afb7096f7fdd
### Save visualization to an existing dashboard + Add to library:
240e3ad4-078e-4937-b931-b3b1d674b6a2
### Save visualization to an existing dashboard only (**NO** added to
library):
174cfe2c-c765-4a19-9e32-6012a50624ba
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
This PR removes the duplicated ToolbarButton component that has been
marked for deprecation since
cf16057333.
In this changeset;
- The import declaration for `ToolbarButton` & `ToolbarButtonProps` from
`@kbn/kibana-react-plugin/public` is changed to
`@kbn/shared-ux-button-toolbar`.
- The visual expectation from the legacy `ToolbarButton` is preserved in
the new component
- A prop `as` is introduced to handle rendering toolbar buttons that are
simply just icons, a use case for this can be found when configuring
Legend settings for a visualisation. The `as` prop accepts values of
`standard` and `iconButton` and in either case the same styling is
preserved.
- When the standard version of the toolbar is being used, by default the
button will rendered with a down arrow positioned to the right, this
icon can be changed by specifying any eui compatible `IconType`.
### Checklist
<!--
Delete any items that are not applicable to this PR.
- [ ] 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))
<!-- - [ ] If a plugin configuration key changed, check if it needs to
be allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.
When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
-->
## Summary
We have 2 very similar structures in Lens - FramePublicAPI and
DatasourcePublicAPI. Creating `DatasourcePublicAPI` was an attempt to
remove framePublicAPI by firstly limiting it and then just using redux
store directly. Unfortunately, due to Lens architecture it never
progressed so we're stuck with those two structures for no reason
whatsover. This PR merges them back together.
Apart from that it also moves some code from app.tsx to the hook that is
responsible for creating `getUserMessages` helper. This way we could use
it in other places (inline editor, for example)
### Checklist
Delete any items that are not applicable to this PR.
- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.
When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
## Summary
Removes `testing-library/dom` from dependencies. As all the utilities
from`dom` are available already in `testing-library/react`, there's no
need to have both `dom` and `react` libraries available in our
package.json.
Following the [@testing-library/react
documentation:](https://testing-library.com/docs/react-testing-library/intro)
> [React Testing
Library](https://github.com/testing-library/react-testing-library)
builds on top of DOM Testing Library by adding APIs for working with
React components.
Let's just import everything from `testing-library/react`, this way we
won't need to worry about inconsistencies between `testing-library/dom`
we have in our `package.json` and the one that is
`testing-library/react` dependency.
## Summary
Fixes#137756
Allows to set non numeric metrics for metric visualization for primary
and secondary metric.
<img width="369" alt="Screenshot 2023-10-19 at 13 45 47"
src="d6f00cd1-3be8-4c07-abe0-5bd15e2e9813">
<img width="350" alt="Screenshot 2023-10-19 at 13 46 37"
src="01978149-ca40-44c2-ba73-9698335e819a">
Doesn't include coloring by terms.
When primary metric is non-numeric:
1. when maximum value is empty, we hide maximum value group
2. when maximum value has a value we set an error message on dimension
3. we don’t allow to use a palette for coloring
4. we don’t allow to set a trendline
<img width="681" alt="Screenshot 2023-10-19 at 13 30 16"
src="7464f9cc-c09c-42cd-bd44-f55ffc1dfad9">
<img width="456" alt="Screenshot 2023-10-19 at 13 30 22"
src="e5726ab9-a748-4417-9b66-5bf4d708d833">
### Checklist
Delete any items that are not applicable to this PR.
- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.
When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Closes https://github.com/elastic/kibana/issues/167906
PR breaks monolith component `<SearchResponseWarnings/>` into 3 separate
components: `<SearchResponseWarningsBadge/>`,
`<SearchResponseWarningsCallout/>`, and
`<SearchResponseWarningsEmptyPrompt/>`. These components are designed to
display a single messages when provided warnings from multiple requests
and display better messaging around partial results. PR also removes
`message` from `SearchResponseWarning` type.
Collaborated with @gchaps on copy.
### Test setup
1. install sample web logs data set
2. install sample flights data set
3. Create data view.
1. Set **Index pattern** to `kibana_sample_data*`
2. Set **Time field** to `timestamp`
4. Open discover
5. Select **kibana_sample_data*** data view
6. set time range to last 24 hours
7. Add filter
```
{
"error_query": {
"indices": [
{
"error_type": "exception",
"message": "shard failure message 123",
"name": "kibana_sample_data_logs",
"shard_ids": [
0
]
}
]
}
}
```
8) save search as **kibana_sample_data***
#### Search response warnings callout
1. Open saved search created in test setup
<img width="500" alt="Screenshot 2023-10-24 at 8 49 19 AM"
src="867cff58-c201-4a6b-b049-7136b43d053f">
2. Click "expand" icon on left of first row in documents table
3. Click "Surrounding documents"
4. Re-enable "kibana_sample_data_logs failure" filter
<img width="500" alt="Screenshot 2023-10-24 at 8 51 22 AM"
src="a50cf033-64de-4909-a47d-6ee07bb915ea">
#### Search response warnings empty prompt
1. Open saved search created in test setup
2. Add filter `DistanceKilometers is -1`
<img width="500" alt="Screenshot 2023-10-24 at 8 44 13 AM"
src="e3ae0fac-8bda-4cad-b079-8ace4e01b786">
#### Search response warnings badge
1. create new dashboard
2. add saved search created during test setup
<img width="500" alt="Screenshot 2023-10-26 at 9 15 21 AM"
src="0066e3e2-953b-4631-a7aa-f389f7e6dbfc">
#### Search response warnings toast
1. create new table aggregation visualization
2. Use saved search created during test setup as source
<img width="500" alt="Screenshot 2023-10-24 at 2 59 41 PM"
src="58aab97e-71d9-49d9-bd67-73484ec54751">
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
When checking my PR here https://github.com/elastic/kibana/pull/169258
@stratoula noticed that the `column.meta.type` is not set properly for
last value aggregation (it always defaults to 'number', same with all
the filtered metrics too!). When I dug deeper, I noticed that happens
because we calculate it as:
```
type:
column.aggConfig.type.valueType
column.aggConfig.params.field?.type ||
'number',
```
and some of the `AggConfigs` don't have the static `valueType` property
nor field, specifically the one with nested aggregations, like top_hits,
top_metrics and filtered_metric. instead of a static `valueType`, I've
decided to change it to a method `getValueType` where we can pass
AggConfigs and get the type from different places internally. This way
`top_hits`, `top_metrics` and `filtered_metric` get the type of the
field from `customMetric`.
I also changed the values for `min` and `max` aggregation - they were
set on `number`, but they can also be a `date`.
## Summary
In Lens when a dataview is missing, the editing should be allowed. There
are cases which it doesn't. The easiest to reproduce is to create a
visualization with terms and remove the dataview. Then you will see an
error (cannot getFieldByName of undefined) and editing and changing the
dataview is not allowed.
This PR fixes this and all other occurences.
### Checklist
- [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
Closes https://github.com/elastic/kibana/issues/167099
#### Problem
`/bsearch` and `/search` APIs only return `error` key from elasticsearch
error response. This is problematic because Inspector needs
`rawResponse` to populate "Clusters and shards"
While working on this issue, I discovered another problem with how error
responses are added to inspector requestResponder. The `Error` instance
is added as `json` key. This is a little awkward since the response tab
just stringifies the contents of `json`, thus stringifing the Error
object instead of just the error body returned from API. This PR address
this problem by setting `json` to either `attributes` or `{ message }`.
#### Solution
PR updates `/bsearch` and `/search` APIs to return `{ attributes: {
error: ErrorCause, rawResponse }}` for failed responses. Solution
avoided changing KbnServerError and reportServerError since these
methods are used extensivly throughout Kibana (see
https://github.com/elastic/kibana/pull/167544#discussion_r1342460941 for
more details). Instead, KbnSearchError and reportSearchError are created
to report search error messages.
#### Test
1) install web logs sample data set
2) open discover
3) add filter
```
{
"error_query": {
"indices": [
{
"error_type": "exception",
"message": "local shard failure message 123",
"name": "kibana_sample_data_logs",
"shard_ids": [
0
]
}
]
}
}
```
4) Open inspector. Verify "Clusters and shards" tab is visible and
populated. Verify "Response" tab shows "error" and "rawResponse" keys.
<img width="500" alt="Screenshot 2023-10-09 at 9 29 16 AM"
src="461b0eb0-0502-4d48-a487-68025ef24d35">
<img width="500" alt="Screenshot 2023-10-09 at 9 29 06 AM"
src="9aff41eb-f771-48e3-a66d-1447689c2c6a">
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Gloria Hornero <gloria.hornero@elastic.co>
prerequisite for https://github.com/elastic/kibana/issues/167906
PR consolidates all warnings logic into kbn-search-response-warnings
package
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Moves Lens tagcloud visualization out of experimental status and
releases it for GA.
Fixes https://github.com/elastic/kibana/issues/168675
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
## Summary
This PR turns the color mapping off by default. After receiving some
feedback we decided to turn it off for now for newly created
visualizations (users can still turn it on and use it).
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
There are cases in ES|QL where a query might return a lot of buckets.
With our new color mapping system a lot of buckets were greyed out and
there were many concerns.
For this reason I am disabling the new color mapping for these
suggestions (users can always turn it on)
I m fine with this as a temporary solution but I think we need to
re-think:
- having 10 colored buckets was a business decision we took, is it ok
for ES|QL though?
- possibly for cases like this another chart should be suggested, we
agreed with @markov00 that we are going to revisit all the suggestions
soonish and improve. We might need a different suggestion system per
datasource but this is a quite big project and needs a lot of
discussions. Until then, we can have the color mapping disabled by
default for the ES|QL suggestions.
**Now**
<img width="2492" alt="image"
src="2327ccf3-d0d0-4ee7-bf1a-25e3d282003b">
**Before**
<img width="2495" alt="image"
src="9c35f90b-04d6-4e39-9eb6-a5e2d2df335f">
- Resolves https://github.com/elastic/kibana/issues/166906
## Summary
This PR adds field tokens to column header for the grid.
There are also additional necessary changes:
- field utils (name, description, icon) were moved from
`@kbn/unified-field-list` and `@kbn/discover-utils` to its own new
package `@kbn/field-utils`
- Unified Data Table and Unified Doc Viewer got a new prop `columnTypes`
which allows to render correct field icons for ES|QL searches (before
types were derived from the data view fields which could be misleading
in text-based searches as users can customize field names via query)
<img width="600" alt="Screenshot 2023-09-25 at 19 30 21"
src="388de9bb-94f7-4d3e-878a-ca0da99fcec2">
### 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] [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] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
## Summary
Use icons/titles for the suggestions panel instead of previews.
We decided to move forward with this for performance reasons. Some
suggestions can be very heavy and we have many sdhs from the customers
complaining about it. It is not obvious to them that the performance
problem is due to the suggestions.
<img width="1773" alt="image"
src="92816b82-b6a5-4f19-a436-52f41eae6a1a">
The FTs changes are mostly changes to the selectors.
## Summary
Closes https://github.com/elastic/kibana/issues/162456
It switches off the other bucket switch if the user updates the terms to
a number greater than equal 1000.
In the beginning I had made it simpler so the switch would change to
false if size >= 1000 and to true if size < 1000. But I am not sure I
like this experience so I decided to do something else:
- The other bucket defaults to true if size < 1000
- If the user changes to a value >=1000 then it changes to false (The
user can always enable it)
- If the user changes this to a value < 1000 it doesn't change back to
true. The user must change it manually.
Let me know if you agree that this experience makes more sense.
<img width="2346" alt="image"
src="29d64ab7-7e55-4b2a-b769-b5f9c6b6d385">
### Checklist
- [ ] [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
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/167098
PR updates "View details" button in incomplete response callouts to open
inspector to request id and cluster tab. PR them removes shards model as
its no longer used.
Clicking "View details"
<img width="400" alt="Screenshot 2023-09-28 at 9 19 49 AM"
src="1b91e70e-3dc6-4757-89eb-0c58482fff2c">
Opens
<img width="400" alt="Screenshot 2023-09-28 at 9 21 35 AM"
src="e26031e8-b2b7-45c9-9339-7206ce73e551">
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>