mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
# Backport This will backport the following commits from `main` to `8.13`: - [revert change to shared UX markdown component for dashboard vis (#180906)](https://github.com/elastic/kibana/pull/180906) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Eyo O. Eyo","email":"7893459+eokoneyo@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-04-18T12:01:18Z","message":"revert change to shared UX markdown component for dashboard vis (#180906)\n\n## Summary\r\n\r\nThis PR reverts the change to the shared UX markdown component that\r\nhappened here https://github.com/elastic/kibana/pull/176478. The\r\naforementioned PR introduced couple of visual issues that were uncaught\r\nduring the migration.\r\n\r\nThe known issues that have been brought up that informed the decision to\r\nrevert this change, are itemised below;\r\n\r\n- https://github.com/elastic/kibana/issues/180576\r\n- https://github.com/elastic/kibana/issues/180452\r\n- https://github.com/elastic/sdh-kibana/issues/4608\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### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"4127163bd913dccfbd17badbb9ce1a7a5b2afadc","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:SharedUX","backport:all-open","v8.14.0","v8.15.0"],"number":180906,"url":"https://github.com/elastic/kibana/pull/180906","mergeCommit":{"message":"revert change to shared UX markdown component for dashboard vis (#180906)\n\n## Summary\r\n\r\nThis PR reverts the change to the shared UX markdown component that\r\nhappened here https://github.com/elastic/kibana/pull/176478. The\r\naforementioned PR introduced couple of visual issues that were uncaught\r\nduring the migration.\r\n\r\nThe known issues that have been brought up that informed the decision to\r\nrevert this change, are itemised below;\r\n\r\n- https://github.com/elastic/kibana/issues/180576\r\n- https://github.com/elastic/kibana/issues/180452\r\n- https://github.com/elastic/sdh-kibana/issues/4608\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### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"4127163bd913dccfbd17badbb9ce1a7a5b2afadc"}},"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/181140","number":181140,"state":"MERGED","mergeCommit":{"sha":"f799e4fc253831332008fa7b06dc7c8d9c0d8c2a","message":"[8.14] revert change to shared UX markdown component for dashboard vis (#180906) (#181140)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.14`:\n- [revert change to shared UX markdown component for dashboard vis\n(#180906)](https://github.com/elastic/kibana/pull/180906)\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\":\"Eyo O.\nEyo\",\"email\":\"7893459+eokoneyo@users.noreply.github.com\"},\"sourceCommit\":{\"committedDate\":\"2024-04-18T12:01:18Z\",\"message\":\"revert\nchange to shared UX markdown component for dashboard vis (#180906)\\n\\n##\nSummary\\r\\n\\r\\nThis PR reverts the change to the shared UX markdown\ncomponent that\\r\\nhappened here\nhttps://github.com/elastic/kibana/pull/176478. The\\r\\naforementioned PR\nintroduced couple of visual issues that were uncaught\\r\\nduring the\nmigration.\\r\\n\\r\\nThe known issues that have been brought up that\ninformed the decision to\\r\\nrevert this change, are itemised\nbelow;\\r\\n\\r\\n- https://github.com/elastic/kibana/issues/180576\\r\\n-\nhttps://github.com/elastic/kibana/issues/180452\\r\\n-\nhttps://github.com/elastic/sdh-kibana/issues/4608\\r\\n\\r\\n\\r\\n###\nChecklist\\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- [x] 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)\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"4127163bd913dccfbd17badbb9ce1a7a5b2afadc\",\"branchLabelMapping\":{\"^v8.15.0$\":\"main\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:fix\",\"Team:SharedUX\",\"backport:all-open\",\"v8.14.0\",\"v8.15.0\"],\"title\":\"revert\nchange to shared UX markdown component for dashboard\nvis\",\"number\":180906,\"url\":\"https://github.com/elastic/kibana/pull/180906\",\"mergeCommit\":{\"message\":\"revert\nchange to shared UX markdown component for dashboard vis (#180906)\\n\\n##\nSummary\\r\\n\\r\\nThis PR reverts the change to the shared UX markdown\ncomponent that\\r\\nhappened here\nhttps://github.com/elastic/kibana/pull/176478. The\\r\\naforementioned PR\nintroduced couple of visual issues that were uncaught\\r\\nduring the\nmigration.\\r\\n\\r\\nThe known issues that have been brought up that\ninformed the decision to\\r\\nrevert this change, are itemised\nbelow;\\r\\n\\r\\n- https://github.com/elastic/kibana/issues/180576\\r\\n-\nhttps://github.com/elastic/kibana/issues/180452\\r\\n-\nhttps://github.com/elastic/sdh-kibana/issues/4608\\r\\n\\r\\n\\r\\n###\nChecklist\\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- [x] 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)\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"4127163bd913dccfbd17badbb9ce1a7a5b2afadc\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.14\"],\"targetPullRequestStates\":[{\"branch\":\"8.14\",\"label\":\"v8.14.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"main\",\"label\":\"v8.15.0\",\"branchLabelMappingKey\":\"^v8.15.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/180906\",\"number\":180906,\"mergeCommit\":{\"message\":\"revert\nchange to shared UX markdown component for dashboard vis (#180906)\\n\\n##\nSummary\\r\\n\\r\\nThis PR reverts the change to the shared UX markdown\ncomponent that\\r\\nhappened here\nhttps://github.com/elastic/kibana/pull/176478. The\\r\\naforementioned PR\nintroduced couple of visual issues that were uncaught\\r\\nduring the\nmigration.\\r\\n\\r\\nThe known issues that have been brought up that\ninformed the decision to\\r\\nrevert this change, are itemised\nbelow;\\r\\n\\r\\n- https://github.com/elastic/kibana/issues/180576\\r\\n-\nhttps://github.com/elastic/kibana/issues/180452\\r\\n-\nhttps://github.com/elastic/sdh-kibana/issues/4608\\r\\n\\r\\n\\r\\n###\nChecklist\\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- [x] 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)\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"4127163bd913dccfbd17badbb9ce1a7a5b2afadc\"}}]}]\nBACKPORT-->\n\nCo-authored-by: Eyo O. Eyo <7893459+eokoneyo@users.noreply.github.com>"}},{"branch":"main","label":"v8.15.0","labelRegex":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/180906","number":180906,"mergeCommit":{"message":"revert change to shared UX markdown component for dashboard vis (#180906)\n\n## Summary\r\n\r\nThis PR reverts the change to the shared UX markdown component that\r\nhappened here https://github.com/elastic/kibana/pull/176478. The\r\naforementioned PR introduced couple of visual issues that were uncaught\r\nduring the migration.\r\n\r\nThe known issues that have been brought up that informed the decision to\r\nrevert this change, are itemised below;\r\n\r\n- https://github.com/elastic/kibana/issues/180576\r\n- https://github.com/elastic/kibana/issues/180452\r\n- https://github.com/elastic/sdh-kibana/issues/4608\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### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"4127163bd913dccfbd17badbb9ce1a7a5b2afadc"}}]}] BACKPORT-->
This commit is contained in:
parent
30470cf5ca
commit
7a1f69190d
5 changed files with 10 additions and 10 deletions
|
@ -13,6 +13,7 @@
|
|||
],
|
||||
"requiredBundles": [
|
||||
"expressions",
|
||||
"kibanaReact",
|
||||
"visDefaultEditor",
|
||||
"visualizations"
|
||||
]
|
||||
|
|
|
@ -29,9 +29,7 @@ describe('markdown vis controller', () => {
|
|||
|
||||
expect(getByText('markdown')).toMatchInlineSnapshot(`
|
||||
<a
|
||||
class="euiLink emotion-euiLink-primary"
|
||||
href="http://daringfireball.net/projects/markdown"
|
||||
rel="noreferrer"
|
||||
>
|
||||
markdown
|
||||
</a>
|
||||
|
@ -55,8 +53,7 @@ describe('markdown vis controller', () => {
|
|||
|
||||
expect(getByText(/testing/i)).toMatchInlineSnapshot(`
|
||||
<p>
|
||||
Testing
|
||||
html
|
||||
Testing <a>html</a>
|
||||
</p>
|
||||
`);
|
||||
});
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React, { useEffect } from 'react';
|
||||
import { Markdown } from '@kbn/shared-ux-markdown';
|
||||
import { Markdown } from '@kbn/kibana-react-plugin/public';
|
||||
import { MarkdownVisParams } from './types';
|
||||
|
||||
import './markdown_vis.scss';
|
||||
|
@ -29,8 +29,7 @@ const MarkdownVisComponent = ({
|
|||
<Markdown
|
||||
data-test-subj="markdownBody"
|
||||
openLinksInNewTab={openLinksInNewTab}
|
||||
markdownContent={markdown || ` `}
|
||||
readOnly
|
||||
markdown={markdown}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"@kbn/i18n",
|
||||
"@kbn/i18n-react",
|
||||
"@kbn/config-schema",
|
||||
"@kbn/shared-ux-markdown",
|
||||
"@kbn/kibana-react-plugin",
|
||||
],
|
||||
"exclude": [
|
||||
"target/**/*",
|
||||
|
|
|
@ -39,9 +39,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
expect(h1Txt).to.equal('Heading 1');
|
||||
});
|
||||
|
||||
it('should not render html in markdown', async function () {
|
||||
it('should not render html in markdown as html', async function () {
|
||||
const actual = await PageObjects.visChart.getMarkdownText();
|
||||
expect(actual).to.equal('Heading 1');
|
||||
|
||||
expect(actual).to.equal(
|
||||
'Heading 1\n<h3>Inline HTML that should not be rendered as html</h3>'
|
||||
);
|
||||
});
|
||||
|
||||
it('should auto apply changes if auto mode is turned on', async function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue