Skip to content

Commit

Permalink
Removed automatic inclusion of tooltip plugin in custom uiPlugins p…
Browse files Browse the repository at this point in the history
…assed to `EuiMarkdownEditor`
  • Loading branch information
cee-chen committed May 4, 2022
1 parent c2c3be4 commit d61acf4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
8 changes: 0 additions & 8 deletions src/components/markdown_editor/markdown_editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import {

import { EuiModal } from '../modal';
import { ContextShape, EuiMarkdownContext } from './markdown_context';
import * as MarkdownTooltip from './plugins/markdown_tooltip';
import {
defaultParsingPlugins,
defaultProcessingPlugins,
Expand Down Expand Up @@ -227,13 +226,6 @@ export const EuiMarkdownEditor = forwardRef<
>(undefined);

const toolbarPlugins = [...uiPlugins];
// @ts-ignore __originatedFromEui is a custom property
if (!uiPlugins.__originatedFromEui) {
toolbarPlugins.unshift(MarkdownTooltip.plugin);
console.warn(
'Deprecation warning: uiPlugins passed to EuiMarkdownEditor does not include the tooltip plugin, which has been added for you. This automatic inclusion has been deprecated and will be removed in the future, see https://github.com/elastic/eui/pull/4383'
);
}

const markdownActions = useMemo(
() => new MarkdownActions(editorId, toolbarPlugins),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export const getDefaultEuiMarkdownUiPlugins = ({

if (!excludeSet.has('tooltip')) uiPlugins.push(MarkdownTooltip.plugin);

// @ts-ignore __originatedFromEui is a custom property
uiPlugins.__originatedFromEui = true;
return uiPlugins;
};

Expand Down
1 change: 1 addition & 0 deletions upcoming_changelogs/5868.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
- Removed `.euiButton---subdued` className and `$euiButtonTypes.subdued` Sass variable - use `text` color instead
- Removed `.eui-textOverflowWrap` - use `.eui-textBreakWord` instead
- Removed `.euiYScrollWithShadows` - use `.eui-yScrollWithShadows` instead
- `EuiMarkdownEditor` no longer automatically includes the tooltip plugin in custom plugin arrays passed to `uiPlugins`. To use EUI's tooltip plugin, use `getDefaultEuiMarkdownPlugins()`

0 comments on commit d61acf4

Please sign in to comment.