kibana/x-pack/plugins/canvas/public
Catherine Liu 46052ad87d
[8.6] [Canvas] Fixes broken data view sort (#146209) (#146232)
# Backport

This will backport the following commits from `main` to `8.6`:
- [[Canvas] Fixes broken data view sort
(#146209)](https://github.com/elastic/kibana/pull/146209)

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

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

<!--BACKPORT [{"author":{"name":"Catherine
Liu","email":"catherine.liu@elastic.co"},"sourceCommit":{"committedDate":"2022-11-23T20:54:10Z","message":"[Canvas]
Fixes broken data view sort (#146209)\n\n## Summary\r\n\r\nCloses
#146171.\r\n\r\nThis sorting function for the data view options was
assuming that `name`\r\nwas always defined, but with some legacy data
views/index patterns,\r\n`name` is not defined and only `title` is. This
changes the sort\r\nfunction to use `name` or `title` when sorting, so
it doesn't error out\r\nwhen `name` or `title` is missing. I also
noticed that we were still\r\nusing the data plugin here instead of the
data views plugin directly, so\r\nI fixed that too.\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###
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":"87e88694f2ef3c32e0ace5a35704f992fcef2f0a","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","review","Team:Presentation","loe:hours","release_note:skip","impact:critical","Feature:Canvas","v8.6.0","v8.7.0"],"number":146209,"url":"https://github.com/elastic/kibana/pull/146209","mergeCommit":{"message":"[Canvas]
Fixes broken data view sort (#146209)\n\n## Summary\r\n\r\nCloses
#146171.\r\n\r\nThis sorting function for the data view options was
assuming that `name`\r\nwas always defined, but with some legacy data
views/index patterns,\r\n`name` is not defined and only `title` is. This
changes the sort\r\nfunction to use `name` or `title` when sorting, so
it doesn't error out\r\nwhen `name` or `title` is missing. I also
noticed that we were still\r\nusing the data plugin here instead of the
data views plugin directly, so\r\nI fixed that too.\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###
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":"87e88694f2ef3c32e0ace5a35704f992fcef2f0a"}},"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/146209","number":146209,"mergeCommit":{"message":"[Canvas]
Fixes broken data view sort (#146209)\n\n## Summary\r\n\r\nCloses
#146171.\r\n\r\nThis sorting function for the data view options was
assuming that `name`\r\nwas always defined, but with some legacy data
views/index patterns,\r\n`name` is not defined and only `title` is. This
changes the sort\r\nfunction to use `name` or `title` when sorting, so
it doesn't error out\r\nwhen `name` or `title` is missing. I also
noticed that we were still\r\nusing the data plugin here instead of the
data views plugin directly, so\r\nI fixed that too.\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###
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":"87e88694f2ef3c32e0ace5a35704f992fcef2f0a"}}]}]
BACKPORT-->
2022-11-23 14:54:47 -07:00
..
components [8.6] [Canvas] Fixes broken data view sort (#146209) (#146232) 2022-11-23 14:54:47 -07:00
expression_types Bumping EUI to version 67.1.8 (#141279) 2022-11-07 21:45:50 +00:00
functions rename @elastic/* packages to @kbn/* (#138957) 2022-08-18 08:54:42 -07:00
lib [Canvas] Use data views service (#139610) 2022-10-24 12:33:36 -07:00
routes Upgrade to Jest 27 (#139335) 2022-10-25 14:38:38 -05:00
services [8.6] [Canvas] Fixes broken data view sort (#146209) (#146232) 2022-11-23 14:54:47 -07:00
state [eslint] fix and skip violations for cross-boundary imports (#136911) 2022-07-29 13:57:55 -05:00
style Upgrade EUI to v62.0.3 (#138351) 2022-08-12 16:40:58 -07:00
transitions [canvas] Reduce bundle size by combining SCSS imports (#102822) 2021-06-24 18:05:11 -05:00
application.tsx Removed canvas function reference docs generator component (#136955) 2022-07-22 16:15:59 -07:00
feature_catalogue_entry.ts no longer use an enum for home's FeatureCatalogueCategory (#129599) 2022-04-19 13:32:25 +02:00
icon.svg [Canvas] move files from legacy/plugins to plugins (#65283) 2020-05-05 20:52:56 -04:00
index.ts fix all violations 2022-04-16 01:37:30 -05:00
plugin.tsx [8.6] [Canvas] Fixes broken data view sort (#146209) (#146232) 2022-11-23 14:54:47 -07:00
plugin_api.ts fix all violations 2022-04-16 01:37:30 -05:00
registries.ts chore(NA): splits types from code on @kbn/interpreter (#121576) 2021-12-21 12:23:38 +00:00
setup_expressions.ts fix all violations 2022-04-16 01:37:30 -05:00
store.ts fix all violations 2022-04-16 01:37:30 -05:00