-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Dashboard] Default to saved object description when panel description is not provided #181177
[Dashboard] Default to saved object description when panel description is not provided #181177
Conversation
/ci |
/ci |
const titleObjects = await this.find.allByCssSelector( | ||
'[data-test-subj=embeddablePanelTitleInner] .embPanel__titleText' | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that the saved object description is being used, the titles for the panels used in the panel_clone
and dashboard_clone
had extra white space when fetched (due to the icon being included in the previous selected span
) - we no longer have to worry about this if we modify how we grab the panel title to only include the panel title and not the description icon.
Note that the panel_clone
and dashboard_clone
tests should have started failing as part of the #178139, but they didn't because we weren't setting the default panel description for the saved objects used in these tests. So, that is why they started failing here and this change was required.
Pinging @elastic/kibana-presentation (Team:Presentation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
code review only
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @Heenawter |
…n is not provided (elastic#181177) Closes elastic#181172 ## Summary This PR fixes a bug where panels were not showing descriptions from library items - this is because (1) we weren't providing the `defaultPanelDescription` as part of the default embeddable API and (2) the panel header was not defaulting to the `defaultPanelDescription` when a panel description was not provided. Because of (1), the panel settings flyout showed a blank description **despite** having the correct logic for defaulting to the default panel description - that is why the tests in `customize_panel_editor.test.tsx` passed but it didn't work in production. ### 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 ### 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) (cherry picked from commit a41177f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…cription is not provided (#181177) (#181333) # Backport This will backport the following commits from `main` to `8.14`: - [[Dashboard] Default to saved object description when panel description is not provided (#181177)](#181177) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Hannah Mudge","email":"Heenawter@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-04-22T14:52:46Z","message":"[Dashboard] Default to saved object description when panel description is not provided (#181177)\n\nCloses #181172 Summary\r\n\r\nThis PR fixes a bug where panels were not showing descriptions from\r\nlibrary items - this is because (1) we weren't providing the\r\n`defaultPanelDescription` as part of the default embeddable API and (2)\r\nthe panel header was not defaulting to the `defaultPanelDescription`\r\nwhen a panel description was not provided.\r\n\r\nBecause of (1), the panel settings flyout showed a blank description\r\n**despite** having the correct logic for defaulting to the default panel\r\ndescription - that is why the tests in `customize_panel_editor.test.tsx`\r\npassed but it didn't work in production.\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### 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":"a41177f32cc1d02a425f70979694d8c160195649","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Feature:Embedding","regression","release_note:fix","Team:Presentation","loe:small","impact:high","backport:prev-minor","v8.15.0"],"title":"[Dashboard] Default to saved object description when panel description is not provided","number":181177,"url":"#181177 Default to saved object description when panel description is not provided (#181177)\n\nCloses #181172 Summary\r\n\r\nThis PR fixes a bug where panels were not showing descriptions from\r\nlibrary items - this is because (1) we weren't providing the\r\n`defaultPanelDescription` as part of the default embeddable API and (2)\r\nthe panel header was not defaulting to the `defaultPanelDescription`\r\nwhen a panel description was not provided.\r\n\r\nBecause of (1), the panel settings flyout showed a blank description\r\n**despite** having the correct logic for defaulting to the default panel\r\ndescription - that is why the tests in `customize_panel_editor.test.tsx`\r\npassed but it didn't work in production.\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### 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":"a41177f32cc1d02a425f70979694d8c160195649"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/181177","number":181177,"mergeCommit":{"message":"[Dashboard] Default to saved object description when panel description is not provided (#181177)\n\nCloses #181172 Summary\r\n\r\nThis PR fixes a bug where panels were not showing descriptions from\r\nlibrary items - this is because (1) we weren't providing the\r\n`defaultPanelDescription` as part of the default embeddable API and (2)\r\nthe panel header was not defaulting to the `defaultPanelDescription`\r\nwhen a panel description was not provided.\r\n\r\nBecause of (1), the panel settings flyout showed a blank description\r\n**despite** having the correct logic for defaulting to the default panel\r\ndescription - that is why the tests in `customize_panel_editor.test.tsx`\r\npassed but it didn't work in production.\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### 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":"a41177f32cc1d02a425f70979694d8c160195649"}}]}] BACKPORT--> Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
…n is not provided (elastic#181177) Closes elastic#181172 ## Summary This PR fixes a bug where panels were not showing descriptions from library items - this is because (1) we weren't providing the `defaultPanelDescription` as part of the default embeddable API and (2) the panel header was not defaulting to the `defaultPanelDescription` when a panel description was not provided. Because of (1), the panel settings flyout showed a blank description **despite** having the correct logic for defaulting to the default panel description - that is why the tests in `customize_panel_editor.test.tsx` passed but it didn't work in production. ### 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 ### 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) (cherry picked from commit a41177f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…cription is not provided (#181177) (#181354) # Backport This will backport the following commits from `main` to `8.13`: - [[Dashboard] Default to saved object description when panel description is not provided (#181177)](#181177) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Hannah Mudge","email":"Heenawter@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-04-22T14:52:46Z","message":"[Dashboard] Default to saved object description when panel description is not provided (#181177)\n\nCloses #181172 Summary\r\n\r\nThis PR fixes a bug where panels were not showing descriptions from\r\nlibrary items - this is because (1) we weren't providing the\r\n`defaultPanelDescription` as part of the default embeddable API and (2)\r\nthe panel header was not defaulting to the `defaultPanelDescription`\r\nwhen a panel description was not provided.\r\n\r\nBecause of (1), the panel settings flyout showed a blank description\r\n**despite** having the correct logic for defaulting to the default panel\r\ndescription - that is why the tests in `customize_panel_editor.test.tsx`\r\npassed but it didn't work in production.\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### 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":"a41177f32cc1d02a425f70979694d8c160195649","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Feature:Embedding","regression","release_note:fix","Team:Presentation","loe:small","impact:high","backport:prev-minor","v8.14.0","v8.15.0"],"number":181177,"url":"https://github.com/elastic/kibana/pull/181177","mergeCommit":{"message":"[Dashboard] Default to saved object description when panel description is not provided (#181177)\n\nCloses #181172 Summary\r\n\r\nThis PR fixes a bug where panels were not showing descriptions from\r\nlibrary items - this is because (1) we weren't providing the\r\n`defaultPanelDescription` as part of the default embeddable API and (2)\r\nthe panel header was not defaulting to the `defaultPanelDescription`\r\nwhen a panel description was not provided.\r\n\r\nBecause of (1), the panel settings flyout showed a blank description\r\n**despite** having the correct logic for defaulting to the default panel\r\ndescription - that is why the tests in `customize_panel_editor.test.tsx`\r\npassed but it didn't work in production.\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### 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":"a41177f32cc1d02a425f70979694d8c160195649"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/181333","number":181333,"state":"MERGED","mergeCommit":{"sha":"aea09828f336324ce69a5601c84691b85269ad66","message":"[8.14] [Dashboard] Default to saved object description when panel description is not provided (#181177) (#181333)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.14`:\n- [[Dashboard] Default to saved object description when panel\ndescription is not provided\n(#181177)](https://github.com/elastic/kibana/pull/181177)\n\n<!--- Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT [{\"author\":{\"name\":\"Hannah\nMudge\",\"email\":\"Heenawter@users.noreply.github.com\"},\"sourceCommit\":{\"committedDate\":\"2024-04-22T14:52:46Z\",\"message\":\"[Dashboard]\nDefault to saved object description when panel description is not\nprovided (#181177)\\n\\nCloses\nhttps://github.com//issues/181172\\r\\n\\r\\n##\nSummary\\r\\n\\r\\nThis PR fixes a bug where panels were not showing\ndescriptions from\\r\\nlibrary items - this is because (1) we weren't\nproviding the\\r\\n`defaultPanelDescription` as part of the default\nembeddable API and (2)\\r\\nthe panel header was not defaulting to the\n`defaultPanelDescription`\\r\\nwhen a panel description was not\nprovided.\\r\\n\\r\\nBecause of (1), the panel settings flyout showed a\nblank description\\r\\n**despite** having the correct logic for defaulting\nto the default panel\\r\\ndescription - that is why the tests in\n`customize_panel_editor.test.tsx`\\r\\npassed but it didn't work in\nproduction.\\r\\n\\r\\n### Checklist\\r\\n\\r\\n- [x] [Unit or\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated or added to match the most common scenarios\\r\\n\\r\\n\\r\\n### For\nmaintainers\\r\\n\\r\\n- [ ] This was checked for breaking API changes and\nwas\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\",\"sha\":\"a41177f32cc1d02a425f70979694d8c160195649\",\"branchLabelMapping\":{\"^v8.15.0$\":\"main\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"bug\",\"Feature:Embedding\",\"regression\",\"release_note:fix\",\"Team:Presentation\",\"loe:small\",\"impact:high\",\"backport:prev-minor\",\"v8.15.0\"],\"title\":\"[Dashboard]\nDefault to saved object description when panel description is not\nprovided\",\"number\":181177,\"url\":\"#181177 to saved object description when panel description is not\nprovided (#181177)\\n\\nCloses\nhttps://github.com//issues/181172\\r\\n\\r\\n##\nSummary\\r\\n\\r\\nThis PR fixes a bug where panels were not showing\ndescriptions from\\r\\nlibrary items - this is because (1) we weren't\nproviding the\\r\\n`defaultPanelDescription` as part of the default\nembeddable API and (2)\\r\\nthe panel header was not defaulting to the\n`defaultPanelDescription`\\r\\nwhen a panel description was not\nprovided.\\r\\n\\r\\nBecause of (1), the panel settings flyout showed a\nblank description\\r\\n**despite** having the correct logic for defaulting\nto the default panel\\r\\ndescription - that is why the tests in\n`customize_panel_editor.test.tsx`\\r\\npassed but it didn't work in\nproduction.\\r\\n\\r\\n### Checklist\\r\\n\\r\\n- [x] [Unit or\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated or added to match the most common scenarios\\r\\n\\r\\n\\r\\n### For\nmaintainers\\r\\n\\r\\n- [ ] This was checked for breaking API changes and\nwas\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\",\"sha\":\"a41177f32cc1d02a425f70979694d8c160195649\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v8.15.0\",\"branchLabelMappingKey\":\"^v8.15.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/181177\",\"number\":181177,\"mergeCommit\":{\"message\":\"[Dashboard]\nDefault to saved object description when panel description is not\nprovided (#181177)\\n\\nCloses\nhttps://github.com//issues/181172\\r\\n\\r\\n##\nSummary\\r\\n\\r\\nThis PR fixes a bug where panels were not showing\ndescriptions from\\r\\nlibrary items - this is because (1) we weren't\nproviding the\\r\\n`defaultPanelDescription` as part of the default\nembeddable API and (2)\\r\\nthe panel header was not defaulting to the\n`defaultPanelDescription`\\r\\nwhen a panel description was not\nprovided.\\r\\n\\r\\nBecause of (1), the panel settings flyout showed a\nblank description\\r\\n**despite** having the correct logic for defaulting\nto the default panel\\r\\ndescription - that is why the tests in\n`customize_panel_editor.test.tsx`\\r\\npassed but it didn't work in\nproduction.\\r\\n\\r\\n### Checklist\\r\\n\\r\\n- [x] [Unit or\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated or added to match the most common scenarios\\r\\n\\r\\n\\r\\n### For\nmaintainers\\r\\n\\r\\n- [ ] This was checked for breaking API changes and\nwas\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\",\"sha\":\"a41177f32cc1d02a425f70979694d8c160195649\"}}]}]\nBACKPORT-->\n\nCo-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>"}},{"branch":"main","label":"v8.15.0","labelRegex":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"#181177 Default to saved object description when panel description is not provided (#181177)\n\nCloses #181172 Summary\r\n\r\nThis PR fixes a bug where panels were not showing descriptions from\r\nlibrary items - this is because (1) we weren't providing the\r\n`defaultPanelDescription` as part of the default embeddable API and (2)\r\nthe panel header was not defaulting to the `defaultPanelDescription`\r\nwhen a panel description was not provided.\r\n\r\nBecause of (1), the panel settings flyout showed a blank description\r\n**despite** having the correct logic for defaulting to the default panel\r\ndescription - that is why the tests in `customize_panel_editor.test.tsx`\r\npassed but it didn't work in production.\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### 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":"a41177f32cc1d02a425f70979694d8c160195649"}}]}] BACKPORT-->
Closes #181172
Summary
This PR fixes a bug where panels were not showing descriptions from library items - this is because (1) we weren't providing the
defaultPanelDescription
as part of the default embeddable API and (2) the panel header was not defaulting to thedefaultPanelDescription
when a panel description was not provided.Because of (1), the panel settings flyout showed a blank description despite having the correct logic for defaulting to the default panel description - that is why the tests in
customize_panel_editor.test.tsx
passed but it didn't work in production.Checklist
For maintainers