@atlaskit/editor-plugin-toolbar 5.0.4 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/editor-plugin-toolbar
2
2
 
3
+ ## 5.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`11f2dadbd0b51`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/11f2dadbd0b51) -
8
+ Adjust z-index of selection toolbar, making it inline with menus and other high priority elements.
9
+ - Updated dependencies
10
+
11
+ ## 5.1.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`5a8d797e50210`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5a8d797e50210) -
16
+ [FFCLEANUP-91669] clean up platform_editor_hide_toolbar_tooltips_fix experiment to hide dropdown
17
+ menu item tooltips on hover of the dropdown menu button
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 5.0.4
4
24
 
5
25
  ### Patch Changes
@@ -42,6 +42,9 @@
42
42
  {
43
43
  "path": "../../editor-prosemirror/afm-cc/tsconfig.json"
44
44
  },
45
+ {
46
+ "path": "../../editor-shared-styles/afm-cc/tsconfig.json"
47
+ },
45
48
  {
46
49
  "path": "../../editor-toolbar/afm-cc/tsconfig.json"
47
50
  },
@@ -9,30 +9,18 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntlNext = require("react-intl-next");
10
10
  var _messages = require("@atlaskit/editor-common/messages");
11
11
  var _editorToolbar = require("@atlaskit/editor-toolbar");
12
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
12
  var OverflowMenu = exports.OverflowMenu = function OverflowMenu(_ref) {
14
13
  var children = _ref.children;
15
14
  var intl = (0, _reactIntlNext.useIntl)();
16
15
  var tooltipContent = intl.formatMessage(_messages.toolbarMessages.selectionToolbarOverflowMenuTooltip);
17
- if ((0, _expValEquals.expValEquals)('platform_editor_hide_toolbar_tooltips_fix', 'isEnabled', true)) {
18
- return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenu, {
19
- label: tooltipContent,
20
- iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.ShowMoreHorizontalIcon, {
21
- label: ""
22
- }),
23
- tooltipComponent: /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
24
- content: tooltipContent,
25
- position: "top"
26
- })
27
- }, children);
28
- }
29
- return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
30
- content: tooltipContent,
31
- position: "top"
32
- }, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenu, {
16
+ return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenu, {
33
17
  label: tooltipContent,
34
18
  iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.ShowMoreHorizontalIcon, {
35
19
  label: ""
20
+ }),
21
+ tooltipComponent: /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
22
+ content: tooltipContent,
23
+ position: "top"
36
24
  })
37
- }, children));
25
+ }, children);
38
26
  };
@@ -17,8 +17,10 @@ var _ui = require("@atlaskit/editor-common/ui");
17
17
  var _utils = require("@atlaskit/editor-common/utils");
18
18
  var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
19
19
  var _state = require("@atlaskit/editor-prosemirror/state");
20
+ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
20
21
  var _editorToolbar = require("@atlaskit/editor-toolbar");
21
22
  var _editorToolbarModel = require("@atlaskit/editor-toolbar-model");
23
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
22
24
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
23
25
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
24
26
  var _consts = require("../consts");
@@ -102,7 +104,8 @@ var SelectionToolbar = exports.SelectionToolbar = function SelectionToolbar(_ref
102
104
  offset: [0, 10],
103
105
  target: (0, _utils2.getDomRefFromSelection)(editorView),
104
106
  onPositionCalculated: onPositionCalculated,
105
- mountTo: mountPoint
107
+ mountTo: mountPoint,
108
+ zIndex: (0, _platformFeatureFlags.fg)('platform_editor_sel_toolbar_stacking_fix') ? _editorSharedStyles.akEditorFloatingDialogZIndex : undefined
106
109
  }, /*#__PURE__*/_react.default.createElement(_toolbar.EditorToolbarProvider, {
107
110
  editorView: editorView,
108
111
  editorToolbarDockingPreference: editorToolbarDockingPreference,
@@ -9,7 +9,6 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntlNext = require("react-intl-next");
10
10
  var _messages = require("@atlaskit/editor-common/messages");
11
11
  var _editorToolbar = require("@atlaskit/editor-toolbar");
12
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
12
  /**
14
13
  * Basic version of existing 'Text Styles' Menu - which doesn't dynamically change icon
15
14
  * and is also placeholder to render all other menus in the collapsed state.
@@ -18,25 +17,14 @@ var TextCollapsedMenu = exports.TextCollapsedMenu = function TextCollapsedMenu(_
18
17
  var children = _ref.children;
19
18
  var _useIntl = (0, _reactIntlNext.useIntl)(),
20
19
  formatMessage = _useIntl.formatMessage;
21
- if ((0, _expValEquals.expValEquals)('platform_editor_hide_toolbar_tooltips_fix', 'isEnabled', true)) {
22
- return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenu, {
23
- iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.TextIcon, {
24
- label: formatMessage(_messages.toolbarMessages.textStylesTooltip),
25
- size: "small"
26
- }),
27
- enableMaxHeight: true,
28
- tooltipComponent: /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
29
- content: formatMessage(_messages.toolbarMessages.textStylesTooltip)
30
- })
31
- }, children);
32
- }
33
- return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
34
- content: formatMessage(_messages.toolbarMessages.textStylesTooltip)
35
- }, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenu, {
20
+ return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenu, {
36
21
  iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.TextIcon, {
37
22
  label: formatMessage(_messages.toolbarMessages.textStylesTooltip),
38
23
  size: "small"
39
24
  }),
40
- enableMaxHeight: true
41
- }, children));
25
+ enableMaxHeight: true,
26
+ tooltipComponent: /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
27
+ content: formatMessage(_messages.toolbarMessages.textStylesTooltip)
28
+ })
29
+ }, children);
42
30
  };
@@ -2,31 +2,19 @@ import React from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
3
  import { toolbarMessages } from '@atlaskit/editor-common/messages';
4
4
  import { ShowMoreHorizontalIcon, ToolbarDropdownMenu, ToolbarTooltip } from '@atlaskit/editor-toolbar';
5
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
5
  export const OverflowMenu = ({
7
6
  children
8
7
  }) => {
9
8
  const intl = useIntl();
10
9
  const tooltipContent = intl.formatMessage(toolbarMessages.selectionToolbarOverflowMenuTooltip);
11
- if (expValEquals('platform_editor_hide_toolbar_tooltips_fix', 'isEnabled', true)) {
12
- return /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
13
- label: tooltipContent,
14
- iconBefore: /*#__PURE__*/React.createElement(ShowMoreHorizontalIcon, {
15
- label: ""
16
- }),
17
- tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, {
18
- content: tooltipContent,
19
- position: "top"
20
- })
21
- }, children);
22
- }
23
- return /*#__PURE__*/React.createElement(ToolbarTooltip, {
24
- content: tooltipContent,
25
- position: "top"
26
- }, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
10
+ return /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
27
11
  label: tooltipContent,
28
12
  iconBefore: /*#__PURE__*/React.createElement(ShowMoreHorizontalIcon, {
29
13
  label: ""
14
+ }),
15
+ tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, {
16
+ content: tooltipContent,
17
+ position: "top"
30
18
  })
31
- }, children));
19
+ }, children);
32
20
  };
@@ -10,8 +10,10 @@ import { Popup } from '@atlaskit/editor-common/ui';
10
10
  import { calculateToolbarPositionTrackHead, calculateToolbarPositionOnCellSelection } from '@atlaskit/editor-common/utils';
11
11
  import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
12
12
  import { AllSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
13
+ import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
13
14
  import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useToolbarUI } from '@atlaskit/editor-toolbar';
14
15
  import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
16
+ import { fg } from '@atlaskit/platform-feature-flags';
15
17
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
16
18
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
17
19
  import { SELECTION_TOOLBAR_LABEL } from '../consts';
@@ -95,7 +97,8 @@ export const SelectionToolbar = ({
95
97
  offset: [0, 10],
96
98
  target: getDomRefFromSelection(editorView),
97
99
  onPositionCalculated: onPositionCalculated,
98
- mountTo: mountPoint
100
+ mountTo: mountPoint,
101
+ zIndex: fg('platform_editor_sel_toolbar_stacking_fix') ? akEditorFloatingDialogZIndex : undefined
99
102
  }, /*#__PURE__*/React.createElement(EditorToolbarProvider, {
100
103
  editorView: editorView,
101
104
  editorToolbarDockingPreference: editorToolbarDockingPreference,
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
3
  import { toolbarMessages } from '@atlaskit/editor-common/messages';
4
4
  import { ToolbarDropdownMenu, ToolbarTooltip, TextIcon } from '@atlaskit/editor-toolbar';
5
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
5
  /**
7
6
  * Basic version of existing 'Text Styles' Menu - which doesn't dynamically change icon
8
7
  * and is also placeholder to render all other menus in the collapsed state.
@@ -13,25 +12,14 @@ export const TextCollapsedMenu = ({
13
12
  const {
14
13
  formatMessage
15
14
  } = useIntl();
16
- if (expValEquals('platform_editor_hide_toolbar_tooltips_fix', 'isEnabled', true)) {
17
- return /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
18
- iconBefore: /*#__PURE__*/React.createElement(TextIcon, {
19
- label: formatMessage(toolbarMessages.textStylesTooltip),
20
- size: "small"
21
- }),
22
- enableMaxHeight: true,
23
- tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, {
24
- content: formatMessage(toolbarMessages.textStylesTooltip)
25
- })
26
- }, children);
27
- }
28
- return /*#__PURE__*/React.createElement(ToolbarTooltip, {
29
- content: formatMessage(toolbarMessages.textStylesTooltip)
30
- }, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
15
+ return /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
31
16
  iconBefore: /*#__PURE__*/React.createElement(TextIcon, {
32
17
  label: formatMessage(toolbarMessages.textStylesTooltip),
33
18
  size: "small"
34
19
  }),
35
- enableMaxHeight: true
36
- }, children));
20
+ enableMaxHeight: true,
21
+ tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, {
22
+ content: formatMessage(toolbarMessages.textStylesTooltip)
23
+ })
24
+ }, children);
37
25
  };
@@ -2,30 +2,18 @@ import React from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
3
  import { toolbarMessages } from '@atlaskit/editor-common/messages';
4
4
  import { ShowMoreHorizontalIcon, ToolbarDropdownMenu, ToolbarTooltip } from '@atlaskit/editor-toolbar';
5
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
5
  export var OverflowMenu = function OverflowMenu(_ref) {
7
6
  var children = _ref.children;
8
7
  var intl = useIntl();
9
8
  var tooltipContent = intl.formatMessage(toolbarMessages.selectionToolbarOverflowMenuTooltip);
10
- if (expValEquals('platform_editor_hide_toolbar_tooltips_fix', 'isEnabled', true)) {
11
- return /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
12
- label: tooltipContent,
13
- iconBefore: /*#__PURE__*/React.createElement(ShowMoreHorizontalIcon, {
14
- label: ""
15
- }),
16
- tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, {
17
- content: tooltipContent,
18
- position: "top"
19
- })
20
- }, children);
21
- }
22
- return /*#__PURE__*/React.createElement(ToolbarTooltip, {
23
- content: tooltipContent,
24
- position: "top"
25
- }, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
9
+ return /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
26
10
  label: tooltipContent,
27
11
  iconBefore: /*#__PURE__*/React.createElement(ShowMoreHorizontalIcon, {
28
12
  label: ""
13
+ }),
14
+ tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, {
15
+ content: tooltipContent,
16
+ position: "top"
29
17
  })
30
- }, children));
18
+ }, children);
31
19
  };
@@ -10,8 +10,10 @@ import { Popup } from '@atlaskit/editor-common/ui';
10
10
  import { calculateToolbarPositionTrackHead, calculateToolbarPositionOnCellSelection } from '@atlaskit/editor-common/utils';
11
11
  import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
12
12
  import { AllSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
13
+ import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
13
14
  import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useToolbarUI } from '@atlaskit/editor-toolbar';
14
15
  import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
16
+ import { fg } from '@atlaskit/platform-feature-flags';
15
17
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
16
18
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
17
19
  import { SELECTION_TOOLBAR_LABEL } from '../consts';
@@ -94,7 +96,8 @@ export var SelectionToolbar = function SelectionToolbar(_ref) {
94
96
  offset: [0, 10],
95
97
  target: getDomRefFromSelection(editorView),
96
98
  onPositionCalculated: onPositionCalculated,
97
- mountTo: mountPoint
99
+ mountTo: mountPoint,
100
+ zIndex: fg('platform_editor_sel_toolbar_stacking_fix') ? akEditorFloatingDialogZIndex : undefined
98
101
  }, /*#__PURE__*/React.createElement(EditorToolbarProvider, {
99
102
  editorView: editorView,
100
103
  editorToolbarDockingPreference: editorToolbarDockingPreference,
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
3
  import { toolbarMessages } from '@atlaskit/editor-common/messages';
4
4
  import { ToolbarDropdownMenu, ToolbarTooltip, TextIcon } from '@atlaskit/editor-toolbar';
5
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
5
  /**
7
6
  * Basic version of existing 'Text Styles' Menu - which doesn't dynamically change icon
8
7
  * and is also placeholder to render all other menus in the collapsed state.
@@ -11,25 +10,14 @@ export var TextCollapsedMenu = function TextCollapsedMenu(_ref) {
11
10
  var children = _ref.children;
12
11
  var _useIntl = useIntl(),
13
12
  formatMessage = _useIntl.formatMessage;
14
- if (expValEquals('platform_editor_hide_toolbar_tooltips_fix', 'isEnabled', true)) {
15
- return /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
16
- iconBefore: /*#__PURE__*/React.createElement(TextIcon, {
17
- label: formatMessage(toolbarMessages.textStylesTooltip),
18
- size: "small"
19
- }),
20
- enableMaxHeight: true,
21
- tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, {
22
- content: formatMessage(toolbarMessages.textStylesTooltip)
23
- })
24
- }, children);
25
- }
26
- return /*#__PURE__*/React.createElement(ToolbarTooltip, {
27
- content: formatMessage(toolbarMessages.textStylesTooltip)
28
- }, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
13
+ return /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
29
14
  iconBefore: /*#__PURE__*/React.createElement(TextIcon, {
30
15
  label: formatMessage(toolbarMessages.textStylesTooltip),
31
16
  size: "small"
32
17
  }),
33
- enableMaxHeight: true
34
- }, children));
18
+ enableMaxHeight: true,
19
+ tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, {
20
+ content: formatMessage(toolbarMessages.textStylesTooltip)
21
+ })
22
+ }, children);
35
23
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-toolbar",
3
- "version": "5.0.4",
3
+ "version": "5.1.1",
4
4
  "description": "Toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,16 +36,17 @@
36
36
  "@atlaskit/editor-plugin-user-intent": "^6.0.0",
37
37
  "@atlaskit/editor-plugin-user-preferences": "^6.0.0",
38
38
  "@atlaskit/editor-prosemirror": "^7.3.0",
39
- "@atlaskit/editor-toolbar": "^0.19.0",
39
+ "@atlaskit/editor-shared-styles": "^3.10.0",
40
+ "@atlaskit/editor-toolbar": "^0.20.0",
40
41
  "@atlaskit/editor-toolbar-model": "^0.4.0",
41
42
  "@atlaskit/platform-feature-flags": "^1.1.0",
42
- "@atlaskit/tmp-editor-statsig": "^39.0.0",
43
+ "@atlaskit/tmp-editor-statsig": "^40.2.0",
43
44
  "@babel/runtime": "^7.0.0",
44
45
  "bind-event-listener": "^3.0.0",
45
46
  "react-intl-next": "npm:react-intl@^5.18.1"
46
47
  },
47
48
  "peerDependencies": {
48
- "@atlaskit/editor-common": "^112.3.0",
49
+ "@atlaskit/editor-common": "^112.4.0",
49
50
  "react": "^18.2.0"
50
51
  },
51
52
  "platform-feature-flags": {
@@ -54,6 +55,9 @@
54
55
  },
55
56
  "platform_editor_toolbar_open_experience_fix": {
56
57
  "type": "boolean"
58
+ },
59
+ "platform_editor_sel_toolbar_stacking_fix": {
60
+ "type": "boolean"
57
61
  }
58
62
  },
59
63
  "techstack": {