@atlaskit/editor-plugin-block-menu 7.0.35 → 7.0.36

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,14 @@
1
1
  # @atlaskit/editor-plugin-block-menu
2
2
 
3
+ ## 7.0.36
4
+
5
+ ### Patch Changes
6
+
7
+ - [`1bd298ad0a152`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1bd298ad0a152) -
8
+ [ux] EDITOR-6280 Clean up platform_editor_block_menu_v2_patch_3 to fix icon and copy in jira block
9
+ menu
10
+ - Updated dependencies
11
+
3
12
  ## 7.0.35
4
13
 
5
14
  ### Patch Changes
@@ -10,20 +10,15 @@ var _reactIntlNext = require("react-intl-next");
10
10
  var _messages = require("@atlaskit/editor-common/messages");
11
11
  var _editorToolbar = require("@atlaskit/editor-toolbar");
12
12
  var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/core/chevron-right"));
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
13
  var FallbackNestedMenu = function FallbackNestedMenu(_ref) {
15
14
  var children = _ref.children;
16
15
  var _useIntl = (0, _reactIntlNext.useIntl)(),
17
16
  formatMessage = _useIntl.formatMessage;
18
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
19
- // Adds size="small" to icons for better visual consistency in block menu.
20
- // To clean up: remove conditional, keep only size="small" version.
21
- var iconSize = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
22
17
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarNestedDropdownMenu, {
23
18
  elemBefore: undefined,
24
19
  elemAfter: /*#__PURE__*/_react.default.createElement(_chevronRight.default, {
25
20
  label: "",
26
- size: iconSize
21
+ size: "small"
27
22
  }),
28
23
  text: formatMessage(_messages.blockMenuMessages.fallbackNestedMenu),
29
24
  enableMaxHeight: true,
@@ -89,28 +89,18 @@ var CopyLinkDropdownItemContent = function CopyLinkDropdownItemContent(_ref) {
89
89
  if (!(0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid')) {
90
90
  return null;
91
91
  }
92
-
93
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
94
- // Conditionally display message based on feature flag
95
- // To clean up: remove the conditional and use only copyLinkToSelection message
96
- var message = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? _messages.blockMenuMessages.copyLinkToSelection : _messages.blockMenuMessages.copyLinkToBlock;
97
-
98
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
99
- // Adds size="small" to icons for better visual consistency in block menu.
100
- // To clean up: remove conditional, keep only size="small" version.
101
- var iconSize = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
102
92
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
103
93
  onClick: handleClick,
104
94
  elemBefore: /*#__PURE__*/_react.default.createElement(_link.default, {
105
95
  label: "",
106
- size: iconSize
96
+ size: "small"
107
97
  }),
108
98
  elemAfter: shortcut ? /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarKeyboardShortcutHint, {
109
99
  shortcut: shortcut
110
100
  }) : undefined,
111
101
  ariaKeyshortcuts: shortcut,
112
102
  testId: _blockMenu.BLOCK_MENU_ACTION_TEST_ID.COPY_LINK
113
- }, formatMessage(message));
103
+ }, formatMessage(_messages.blockMenuMessages.copyLinkToSelection));
114
104
  };
115
105
 
116
106
  // eslint-disable-next-line @typescript-eslint/ban-types
@@ -110,11 +110,6 @@ var DeleteDropdownItemContent = function DeleteDropdownItemContent(_ref) {
110
110
  onRemoveHoverDecoration();
111
111
  };
112
112
  }, [onRemoveHoverDecoration]);
113
-
114
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
115
- // Adds size="small" to icons for better visual consistency in block menu.
116
- // To clean up: remove conditional, keep only size="small" version.
117
- var iconSize = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
118
113
  return /*#__PURE__*/_react.default.createElement(_box.Box, {
119
114
  onMouseEnter: onShowHoverDecoration,
120
115
  onMouseLeave: onRemoveHoverDecoration,
@@ -124,7 +119,7 @@ var DeleteDropdownItemContent = function DeleteDropdownItemContent(_ref) {
124
119
  elemBefore: /*#__PURE__*/_react.default.createElement(_delete.default, {
125
120
  color: "var(--ds-icon-danger, #C9372C)",
126
121
  label: "",
127
- size: iconSize
122
+ size: "small"
128
123
  }),
129
124
  onClick: onClick,
130
125
  testId: _blockMenu.BLOCK_MENU_ACTION_TEST_ID.DELETE
@@ -13,7 +13,6 @@ var _hooks = require("@atlaskit/editor-common/hooks");
13
13
  var _messages = require("@atlaskit/editor-common/messages");
14
14
  var _flag = _interopRequireWildcard(require("@atlaskit/flag"));
15
15
  var _checkCircle = _interopRequireDefault(require("@atlaskit/icon/core/check-circle"));
16
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
16
  var _blockMenuPluginType = require("../blockMenuPluginType");
18
17
  var _main = require("../pm-plugins/main");
19
18
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
@@ -47,11 +46,6 @@ var Flag = exports.Flag = function Flag(_ref) {
47
46
  api === null || api === void 0 || api.core.actions.focus();
48
47
  };
49
48
  var FlagComponent = flagMap[showFlag].autoDismiss ? _flag.AutoDismissFlag : _flag.default;
50
-
51
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
52
- // Adds size="small" to icons for better visual consistency in block menu.
53
- // To clean up: remove conditional, keep only size="small" version.
54
- var iconSize = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
55
49
  return /*#__PURE__*/_react.default.createElement(_flag.FlagGroup, null, /*#__PURE__*/_react.default.createElement(FlagComponent, {
56
50
  onDismissed: onDismissed,
57
51
  title: formatMessage(title),
@@ -60,7 +54,7 @@ var Flag = exports.Flag = function Flag(_ref) {
60
54
  icon: /*#__PURE__*/_react.default.createElement(_checkCircle.default, {
61
55
  label: "",
62
56
  color: "var(--ds-icon-success, #6A9A23)",
63
- size: iconSize
57
+ size: "small"
64
58
  })
65
59
  }));
66
60
  };
@@ -13,7 +13,6 @@ var _messages = require("@atlaskit/editor-common/messages");
13
13
  var _editorToolbar = require("@atlaskit/editor-toolbar");
14
14
  var _changes = _interopRequireDefault(require("@atlaskit/icon/core/changes"));
15
15
  var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/core/chevron-right"));
16
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
16
  var _consts = require("./consts");
18
17
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
19
18
  var FormatMenuComponent = exports.FormatMenuComponent = function FormatMenuComponent(_ref) {
@@ -37,20 +36,15 @@ var FormatMenuComponent = exports.FormatMenuComponent = function FormatMenuCompo
37
36
  return tr;
38
37
  });
39
38
  }, [api]);
40
-
41
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
42
- // Adds size="small" to icons for better visual consistency in block menu.
43
- // To clean up: remove conditional, keep only size="small" version.
44
- var iconSize = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
45
39
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarNestedDropdownMenu, {
46
40
  text: formatMessage(_messages.blockMenuMessages.turnInto),
47
41
  elemBefore: /*#__PURE__*/_react.default.createElement(_changes.default, {
48
42
  label: "",
49
- size: iconSize
43
+ size: "small"
50
44
  }),
51
45
  elemAfter: /*#__PURE__*/_react.default.createElement(_chevronRight.default, {
52
46
  label: "",
53
- size: iconSize
47
+ size: "small"
54
48
  }),
55
49
  enableMaxHeight: true,
56
50
  onClick: handleClick,
@@ -16,7 +16,6 @@ var _messages = require("@atlaskit/editor-common/messages");
16
16
  var _types = require("@atlaskit/editor-common/types");
17
17
  var _editorToolbar = require("@atlaskit/editor-toolbar");
18
18
  var _arrowDown = _interopRequireDefault(require("@atlaskit/icon/core/arrow-down"));
19
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
19
  var _blockMenuProvider = require("./block-menu-provider");
21
20
  var _consts = require("./consts");
22
21
  var _fixBlockMenuPositionAndScroll = require("./utils/fixBlockMenuPositionAndScroll");
@@ -68,17 +67,12 @@ var MoveDownDropdownItemContent = function MoveDownDropdownItemContent(_ref) {
68
67
  (0, _fixBlockMenuPositionAndScroll.fixBlockMenuPositionAndScroll)(newFirstNode);
69
68
  });
70
69
  };
71
-
72
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
73
- // Adds size="small" to icons for better visual consistency in block menu.
74
- // To clean up: remove conditional, keep only size="small" version.
75
- var iconSize = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
76
70
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
77
71
  triggerRef: moveDownRef,
78
72
  onClick: handleClick,
79
73
  elemBefore: /*#__PURE__*/_react.default.createElement(_arrowDown.default, {
80
74
  label: "",
81
- size: iconSize
75
+ size: "small"
82
76
  }),
83
77
  isDisabled: !canMoveDown,
84
78
  testId: _blockMenu.BLOCK_MENU_ACTION_TEST_ID.MOVE_DOWN
@@ -16,7 +16,6 @@ var _messages = require("@atlaskit/editor-common/messages");
16
16
  var _types = require("@atlaskit/editor-common/types");
17
17
  var _editorToolbar = require("@atlaskit/editor-toolbar");
18
18
  var _arrowUp = _interopRequireDefault(require("@atlaskit/icon/core/arrow-up"));
19
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
19
  var _blockMenuProvider = require("./block-menu-provider");
21
20
  var _consts = require("./consts");
22
21
  var _fixBlockMenuPositionAndScroll = require("./utils/fixBlockMenuPositionAndScroll");
@@ -66,17 +65,12 @@ var MoveUpDropdownItemContent = function MoveUpDropdownItemContent(_ref) {
66
65
  (0, _fixBlockMenuPositionAndScroll.fixBlockMenuPositionAndScroll)(newFirstNode);
67
66
  });
68
67
  };
69
-
70
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
71
- // Adds size="small" to icons for better visual consistency in block menu.
72
- // To clean up: remove conditional, keep only size="small" version.
73
- var iconSize = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
74
68
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
75
69
  triggerRef: moveUpRef,
76
70
  onClick: handleClick,
77
71
  elemBefore: /*#__PURE__*/_react.default.createElement(_arrowUp.default, {
78
72
  label: "",
79
- size: iconSize
73
+ size: "small"
80
74
  }),
81
75
  isDisabled: !canMoveUp,
82
76
  testId: _blockMenu.BLOCK_MENU_ACTION_TEST_ID.MOVE_UP
@@ -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 _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _useSuggestedItems = require("./hooks/useSuggestedItems");
14
13
  var _checkHasPreviousSectionContent = require("./utils/checkHasPreviousSectionContent");
15
14
  var SuggestedItemsMenuSection = exports.SuggestedItemsMenuSection = /*#__PURE__*/_react.default.memo(function (_ref) {
@@ -21,12 +20,7 @@ var SuggestedItemsMenuSection = exports.SuggestedItemsMenuSection = /*#__PURE__*
21
20
  if (suggestedItems.length === 0) {
22
21
  return null;
23
22
  }
24
-
25
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
26
- // Conditionally show separator based on whether there's content after this section.
27
- // Old behavior: always show separator (true).
28
- // To clean up: remove conditional, keep only the hasCreateSectionContent || hasStructureSectionContent logic.
29
- var hasSeparator = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? (0, _checkHasPreviousSectionContent.hasCreateSectionContent)(api) || (0, _checkHasPreviousSectionContent.hasStructureSectionContent)(api) : true;
23
+ var hasSeparator = (0, _checkHasPreviousSectionContent.hasCreateSectionContent)(api) || (0, _checkHasPreviousSectionContent.hasStructureSectionContent)(api);
30
24
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItemSection, {
31
25
  title: formatMessage(_messages.blockMenuMessages.suggested),
32
26
  hasSeparator: hasSeparator
@@ -3,22 +3,17 @@ import { useIntl } from 'react-intl-next';
3
3
  import { blockMenuMessages } from '@atlaskit/editor-common/messages';
4
4
  import { ToolbarDropdownItem, ToolbarDropdownItemSection, ToolbarNestedDropdownMenu } from '@atlaskit/editor-toolbar';
5
5
  import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  const FallbackNestedMenu = ({
8
7
  children
9
8
  }) => {
10
9
  const {
11
10
  formatMessage
12
11
  } = useIntl();
13
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
14
- // Adds size="small" to icons for better visual consistency in block menu.
15
- // To clean up: remove conditional, keep only size="small" version.
16
- const iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
17
12
  return /*#__PURE__*/React.createElement(ToolbarNestedDropdownMenu, {
18
13
  elemBefore: undefined,
19
14
  elemAfter: /*#__PURE__*/React.createElement(ChevronRightIcon, {
20
15
  label: "",
21
- size: iconSize
16
+ size: "small"
22
17
  }),
23
18
  text: formatMessage(blockMenuMessages.fallbackNestedMenu),
24
19
  enableMaxHeight: true,
@@ -88,28 +88,18 @@ const CopyLinkDropdownItemContent = ({
88
88
  if (!fg('platform_editor_adf_with_localid')) {
89
89
  return null;
90
90
  }
91
-
92
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
93
- // Conditionally display message based on feature flag
94
- // To clean up: remove the conditional and use only copyLinkToSelection message
95
- const message = fg('platform_editor_block_menu_v2_patch_3') ? messages.copyLinkToSelection : messages.copyLinkToBlock;
96
-
97
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
98
- // Adds size="small" to icons for better visual consistency in block menu.
99
- // To clean up: remove conditional, keep only size="small" version.
100
- const iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
101
91
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
102
92
  onClick: handleClick,
103
93
  elemBefore: /*#__PURE__*/React.createElement(LinkIcon, {
104
94
  label: "",
105
- size: iconSize
95
+ size: "small"
106
96
  }),
107
97
  elemAfter: shortcut ? /*#__PURE__*/React.createElement(ToolbarKeyboardShortcutHint, {
108
98
  shortcut: shortcut
109
99
  }) : undefined,
110
100
  ariaKeyshortcuts: shortcut,
111
101
  testId: BLOCK_MENU_ACTION_TEST_ID.COPY_LINK
112
- }, formatMessage(message));
102
+ }, formatMessage(messages.copyLinkToSelection));
113
103
  };
114
104
 
115
105
  // eslint-disable-next-line @typescript-eslint/ban-types
@@ -106,11 +106,6 @@ const DeleteDropdownItemContent = ({
106
106
  onRemoveHoverDecoration();
107
107
  };
108
108
  }, [onRemoveHoverDecoration]);
109
-
110
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
111
- // Adds size="small" to icons for better visual consistency in block menu.
112
- // To clean up: remove conditional, keep only size="small" version.
113
- const iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
114
109
  return /*#__PURE__*/React.createElement(Box, {
115
110
  onMouseEnter: onShowHoverDecoration,
116
111
  onMouseLeave: onRemoveHoverDecoration,
@@ -120,7 +115,7 @@ const DeleteDropdownItemContent = ({
120
115
  elemBefore: /*#__PURE__*/React.createElement(DeleteIcon, {
121
116
  color: "var(--ds-icon-danger, #C9372C)",
122
117
  label: "",
123
- size: iconSize
118
+ size: "small"
124
119
  }),
125
120
  onClick: onClick,
126
121
  testId: BLOCK_MENU_ACTION_TEST_ID.DELETE
@@ -4,7 +4,6 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
4
4
  import { blockMenuMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import AkFlag, { FlagGroup, AutoDismissFlag } from '@atlaskit/flag';
6
6
  import SuccessIcon from '@atlaskit/icon/core/check-circle';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { FLAG_ID } from '../blockMenuPluginType';
9
8
  import { blockMenuPluginKey } from '../pm-plugins/main';
10
9
  const flagMap = {
@@ -45,11 +44,6 @@ export const Flag = ({
45
44
  api === null || api === void 0 ? void 0 : api.core.actions.focus();
46
45
  };
47
46
  const FlagComponent = flagMap[showFlag].autoDismiss ? AutoDismissFlag : AkFlag;
48
-
49
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
50
- // Adds size="small" to icons for better visual consistency in block menu.
51
- // To clean up: remove conditional, keep only size="small" version.
52
- const iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
53
47
  return /*#__PURE__*/React.createElement(FlagGroup, null, /*#__PURE__*/React.createElement(FlagComponent, {
54
48
  onDismissed: onDismissed,
55
49
  title: formatMessage(title),
@@ -58,7 +52,7 @@ export const Flag = ({
58
52
  icon: /*#__PURE__*/React.createElement(SuccessIcon, {
59
53
  label: "",
60
54
  color: "var(--ds-icon-success, #6A9A23)",
61
- size: iconSize
55
+ size: "small"
62
56
  })
63
57
  }));
64
58
  };
@@ -5,7 +5,6 @@ import { blockMenuMessages } from '@atlaskit/editor-common/messages';
5
5
  import { ToolbarNestedDropdownMenu } from '@atlaskit/editor-toolbar';
6
6
  import ChangesIcon from '@atlaskit/icon/core/changes';
7
7
  import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  import { BLOCK_MENU_ITEM_NAME } from './consts';
10
9
  export const FormatMenuComponent = ({
11
10
  api,
@@ -31,20 +30,15 @@ export const FormatMenuComponent = ({
31
30
  return tr;
32
31
  });
33
32
  }, [api]);
34
-
35
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
36
- // Adds size="small" to icons for better visual consistency in block menu.
37
- // To clean up: remove conditional, keep only size="small" version.
38
- const iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
39
33
  return /*#__PURE__*/React.createElement(ToolbarNestedDropdownMenu, {
40
34
  text: formatMessage(blockMenuMessages.turnInto),
41
35
  elemBefore: /*#__PURE__*/React.createElement(ChangesIcon, {
42
36
  label: "",
43
- size: iconSize
37
+ size: "small"
44
38
  }),
45
39
  elemAfter: /*#__PURE__*/React.createElement(ChevronRightIcon, {
46
40
  label: "",
47
- size: iconSize
41
+ size: "small"
48
42
  }),
49
43
  enableMaxHeight: true,
50
44
  onClick: handleClick,
@@ -8,7 +8,6 @@ import { blockMenuMessages as messages } from '@atlaskit/editor-common/messages'
8
8
  import { DIRECTION } from '@atlaskit/editor-common/types';
9
9
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
10
10
  import ArrowDownIcon from '@atlaskit/icon/core/arrow-down';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import { useBlockMenu } from './block-menu-provider';
13
12
  import { BLOCK_MENU_ITEM_NAME } from './consts';
14
13
  import { fixBlockMenuPositionAndScroll } from './utils/fixBlockMenuPositionAndScroll';
@@ -65,17 +64,12 @@ const MoveDownDropdownItemContent = ({
65
64
  fixBlockMenuPositionAndScroll(newFirstNode);
66
65
  });
67
66
  };
68
-
69
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
70
- // Adds size="small" to icons for better visual consistency in block menu.
71
- // To clean up: remove conditional, keep only size="small" version.
72
- const iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
73
67
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
74
68
  triggerRef: moveDownRef,
75
69
  onClick: handleClick,
76
70
  elemBefore: /*#__PURE__*/React.createElement(ArrowDownIcon, {
77
71
  label: "",
78
- size: iconSize
72
+ size: "small"
79
73
  }),
80
74
  isDisabled: !canMoveDown,
81
75
  testId: BLOCK_MENU_ACTION_TEST_ID.MOVE_DOWN
@@ -8,7 +8,6 @@ import { blockMenuMessages as messages } from '@atlaskit/editor-common/messages'
8
8
  import { DIRECTION } from '@atlaskit/editor-common/types';
9
9
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
10
10
  import ArrowUpIcon from '@atlaskit/icon/core/arrow-up';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import { useBlockMenu } from './block-menu-provider';
13
12
  import { BLOCK_MENU_ITEM_NAME } from './consts';
14
13
  import { fixBlockMenuPositionAndScroll } from './utils/fixBlockMenuPositionAndScroll';
@@ -63,17 +62,12 @@ const MoveUpDropdownItemContent = ({
63
62
  fixBlockMenuPositionAndScroll(newFirstNode);
64
63
  });
65
64
  };
66
-
67
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
68
- // Adds size="small" to icons for better visual consistency in block menu.
69
- // To clean up: remove conditional, keep only size="small" version.
70
- const iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
71
65
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
72
66
  triggerRef: moveUpRef,
73
67
  onClick: handleClick,
74
68
  elemBefore: /*#__PURE__*/React.createElement(ArrowUpIcon, {
75
69
  label: "",
76
- size: iconSize
70
+ size: "small"
77
71
  }),
78
72
  isDisabled: !canMoveUp,
79
73
  testId: BLOCK_MENU_ACTION_TEST_ID.MOVE_UP
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
3
  import { blockMenuMessages } from '@atlaskit/editor-common/messages';
4
4
  import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { useSuggestedItems } from './hooks/useSuggestedItems';
7
6
  import { hasCreateSectionContent, hasStructureSectionContent } from './utils/checkHasPreviousSectionContent';
8
7
  export const SuggestedItemsMenuSection = /*#__PURE__*/React.memo(({
@@ -16,12 +15,7 @@ export const SuggestedItemsMenuSection = /*#__PURE__*/React.memo(({
16
15
  if (suggestedItems.length === 0) {
17
16
  return null;
18
17
  }
19
-
20
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
21
- // Conditionally show separator based on whether there's content after this section.
22
- // Old behavior: always show separator (true).
23
- // To clean up: remove conditional, keep only the hasCreateSectionContent || hasStructureSectionContent logic.
24
- const hasSeparator = fg('platform_editor_block_menu_v2_patch_3') ? hasCreateSectionContent(api) || hasStructureSectionContent(api) : true;
18
+ const hasSeparator = hasCreateSectionContent(api) || hasStructureSectionContent(api);
25
19
  return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
26
20
  title: formatMessage(blockMenuMessages.suggested),
27
21
  hasSeparator: hasSeparator
@@ -3,20 +3,15 @@ import { useIntl } from 'react-intl-next';
3
3
  import { blockMenuMessages } from '@atlaskit/editor-common/messages';
4
4
  import { ToolbarDropdownItem, ToolbarDropdownItemSection, ToolbarNestedDropdownMenu } from '@atlaskit/editor-toolbar';
5
5
  import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  var FallbackNestedMenu = function FallbackNestedMenu(_ref) {
8
7
  var children = _ref.children;
9
8
  var _useIntl = useIntl(),
10
9
  formatMessage = _useIntl.formatMessage;
11
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
12
- // Adds size="small" to icons for better visual consistency in block menu.
13
- // To clean up: remove conditional, keep only size="small" version.
14
- var iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
15
10
  return /*#__PURE__*/React.createElement(ToolbarNestedDropdownMenu, {
16
11
  elemBefore: undefined,
17
12
  elemAfter: /*#__PURE__*/React.createElement(ChevronRightIcon, {
18
13
  label: "",
19
- size: iconSize
14
+ size: "small"
20
15
  }),
21
16
  text: formatMessage(blockMenuMessages.fallbackNestedMenu),
22
17
  enableMaxHeight: true,
@@ -80,28 +80,18 @@ var CopyLinkDropdownItemContent = function CopyLinkDropdownItemContent(_ref) {
80
80
  if (!fg('platform_editor_adf_with_localid')) {
81
81
  return null;
82
82
  }
83
-
84
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
85
- // Conditionally display message based on feature flag
86
- // To clean up: remove the conditional and use only copyLinkToSelection message
87
- var message = fg('platform_editor_block_menu_v2_patch_3') ? messages.copyLinkToSelection : messages.copyLinkToBlock;
88
-
89
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
90
- // Adds size="small" to icons for better visual consistency in block menu.
91
- // To clean up: remove conditional, keep only size="small" version.
92
- var iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
93
83
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
94
84
  onClick: handleClick,
95
85
  elemBefore: /*#__PURE__*/React.createElement(LinkIcon, {
96
86
  label: "",
97
- size: iconSize
87
+ size: "small"
98
88
  }),
99
89
  elemAfter: shortcut ? /*#__PURE__*/React.createElement(ToolbarKeyboardShortcutHint, {
100
90
  shortcut: shortcut
101
91
  }) : undefined,
102
92
  ariaKeyshortcuts: shortcut,
103
93
  testId: BLOCK_MENU_ACTION_TEST_ID.COPY_LINK
104
- }, formatMessage(message));
94
+ }, formatMessage(messages.copyLinkToSelection));
105
95
  };
106
96
 
107
97
  // eslint-disable-next-line @typescript-eslint/ban-types
@@ -101,11 +101,6 @@ var DeleteDropdownItemContent = function DeleteDropdownItemContent(_ref) {
101
101
  onRemoveHoverDecoration();
102
102
  };
103
103
  }, [onRemoveHoverDecoration]);
104
-
105
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
106
- // Adds size="small" to icons for better visual consistency in block menu.
107
- // To clean up: remove conditional, keep only size="small" version.
108
- var iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
109
104
  return /*#__PURE__*/React.createElement(Box, {
110
105
  onMouseEnter: onShowHoverDecoration,
111
106
  onMouseLeave: onRemoveHoverDecoration,
@@ -115,7 +110,7 @@ var DeleteDropdownItemContent = function DeleteDropdownItemContent(_ref) {
115
110
  elemBefore: /*#__PURE__*/React.createElement(DeleteIcon, {
116
111
  color: "var(--ds-icon-danger, #C9372C)",
117
112
  label: "",
118
- size: iconSize
113
+ size: "small"
119
114
  }),
120
115
  onClick: onClick,
121
116
  testId: BLOCK_MENU_ACTION_TEST_ID.DELETE
@@ -5,7 +5,6 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
5
5
  import { blockMenuMessages as messages } from '@atlaskit/editor-common/messages';
6
6
  import AkFlag, { FlagGroup, AutoDismissFlag } from '@atlaskit/flag';
7
7
  import SuccessIcon from '@atlaskit/icon/core/check-circle';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  import { FLAG_ID } from '../blockMenuPluginType';
10
9
  import { blockMenuPluginKey } from '../pm-plugins/main';
11
10
  var flagMap = _defineProperty({}, FLAG_ID.LINK_COPIED_TO_CLIPBOARD, {
@@ -38,11 +37,6 @@ export var Flag = function Flag(_ref) {
38
37
  api === null || api === void 0 || api.core.actions.focus();
39
38
  };
40
39
  var FlagComponent = flagMap[showFlag].autoDismiss ? AutoDismissFlag : AkFlag;
41
-
42
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
43
- // Adds size="small" to icons for better visual consistency in block menu.
44
- // To clean up: remove conditional, keep only size="small" version.
45
- var iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
46
40
  return /*#__PURE__*/React.createElement(FlagGroup, null, /*#__PURE__*/React.createElement(FlagComponent, {
47
41
  onDismissed: onDismissed,
48
42
  title: formatMessage(title),
@@ -51,7 +45,7 @@ export var Flag = function Flag(_ref) {
51
45
  icon: /*#__PURE__*/React.createElement(SuccessIcon, {
52
46
  label: "",
53
47
  color: "var(--ds-icon-success, #6A9A23)",
54
- size: iconSize
48
+ size: "small"
55
49
  })
56
50
  }));
57
51
  };
@@ -5,7 +5,6 @@ import { blockMenuMessages } from '@atlaskit/editor-common/messages';
5
5
  import { ToolbarNestedDropdownMenu } from '@atlaskit/editor-toolbar';
6
6
  import ChangesIcon from '@atlaskit/icon/core/changes';
7
7
  import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  import { BLOCK_MENU_ITEM_NAME } from './consts';
10
9
  export var FormatMenuComponent = function FormatMenuComponent(_ref) {
11
10
  var api = _ref.api,
@@ -28,20 +27,15 @@ export var FormatMenuComponent = function FormatMenuComponent(_ref) {
28
27
  return tr;
29
28
  });
30
29
  }, [api]);
31
-
32
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
33
- // Adds size="small" to icons for better visual consistency in block menu.
34
- // To clean up: remove conditional, keep only size="small" version.
35
- var iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
36
30
  return /*#__PURE__*/React.createElement(ToolbarNestedDropdownMenu, {
37
31
  text: formatMessage(blockMenuMessages.turnInto),
38
32
  elemBefore: /*#__PURE__*/React.createElement(ChangesIcon, {
39
33
  label: "",
40
- size: iconSize
34
+ size: "small"
41
35
  }),
42
36
  elemAfter: /*#__PURE__*/React.createElement(ChevronRightIcon, {
43
37
  label: "",
44
- size: iconSize
38
+ size: "small"
45
39
  }),
46
40
  enableMaxHeight: true,
47
41
  onClick: handleClick,
@@ -8,7 +8,6 @@ import { blockMenuMessages as messages } from '@atlaskit/editor-common/messages'
8
8
  import { DIRECTION } from '@atlaskit/editor-common/types';
9
9
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
10
10
  import ArrowDownIcon from '@atlaskit/icon/core/arrow-down';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import { useBlockMenu } from './block-menu-provider';
13
12
  import { BLOCK_MENU_ITEM_NAME } from './consts';
14
13
  import { fixBlockMenuPositionAndScroll } from './utils/fixBlockMenuPositionAndScroll';
@@ -59,17 +58,12 @@ var MoveDownDropdownItemContent = function MoveDownDropdownItemContent(_ref) {
59
58
  fixBlockMenuPositionAndScroll(newFirstNode);
60
59
  });
61
60
  };
62
-
63
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
64
- // Adds size="small" to icons for better visual consistency in block menu.
65
- // To clean up: remove conditional, keep only size="small" version.
66
- var iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
67
61
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
68
62
  triggerRef: moveDownRef,
69
63
  onClick: handleClick,
70
64
  elemBefore: /*#__PURE__*/React.createElement(ArrowDownIcon, {
71
65
  label: "",
72
- size: iconSize
66
+ size: "small"
73
67
  }),
74
68
  isDisabled: !canMoveDown,
75
69
  testId: BLOCK_MENU_ACTION_TEST_ID.MOVE_DOWN
@@ -8,7 +8,6 @@ import { blockMenuMessages as messages } from '@atlaskit/editor-common/messages'
8
8
  import { DIRECTION } from '@atlaskit/editor-common/types';
9
9
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
10
10
  import ArrowUpIcon from '@atlaskit/icon/core/arrow-up';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import { useBlockMenu } from './block-menu-provider';
13
12
  import { BLOCK_MENU_ITEM_NAME } from './consts';
14
13
  import { fixBlockMenuPositionAndScroll } from './utils/fixBlockMenuPositionAndScroll';
@@ -57,17 +56,12 @@ var MoveUpDropdownItemContent = function MoveUpDropdownItemContent(_ref) {
57
56
  fixBlockMenuPositionAndScroll(newFirstNode);
58
57
  });
59
58
  };
60
-
61
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
62
- // Adds size="small" to icons for better visual consistency in block menu.
63
- // To clean up: remove conditional, keep only size="small" version.
64
- var iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
65
59
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
66
60
  triggerRef: moveUpRef,
67
61
  onClick: handleClick,
68
62
  elemBefore: /*#__PURE__*/React.createElement(ArrowUpIcon, {
69
63
  label: "",
70
- size: iconSize
64
+ size: "small"
71
65
  }),
72
66
  isDisabled: !canMoveUp,
73
67
  testId: BLOCK_MENU_ACTION_TEST_ID.MOVE_UP
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
3
  import { blockMenuMessages } from '@atlaskit/editor-common/messages';
4
4
  import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { useSuggestedItems } from './hooks/useSuggestedItems';
7
6
  import { hasCreateSectionContent, hasStructureSectionContent } from './utils/checkHasPreviousSectionContent';
8
7
  export var SuggestedItemsMenuSection = /*#__PURE__*/React.memo(function (_ref) {
@@ -14,12 +13,7 @@ export var SuggestedItemsMenuSection = /*#__PURE__*/React.memo(function (_ref) {
14
13
  if (suggestedItems.length === 0) {
15
14
  return null;
16
15
  }
17
-
18
- // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
19
- // Conditionally show separator based on whether there's content after this section.
20
- // Old behavior: always show separator (true).
21
- // To clean up: remove conditional, keep only the hasCreateSectionContent || hasStructureSectionContent logic.
22
- var hasSeparator = fg('platform_editor_block_menu_v2_patch_3') ? hasCreateSectionContent(api) || hasStructureSectionContent(api) : true;
16
+ var hasSeparator = hasCreateSectionContent(api) || hasStructureSectionContent(api);
23
17
  return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
24
18
  title: formatMessage(blockMenuMessages.suggested),
25
19
  hasSeparator: hasSeparator
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-menu",
3
- "version": "7.0.35",
3
+ "version": "7.0.36",
4
4
  "description": "BlockMenu plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/primitives": "^19.0.0",
46
46
  "@atlaskit/prosemirror-history": "^0.2.0",
47
- "@atlaskit/tmp-editor-statsig": "^62.0.0",
47
+ "@atlaskit/tmp-editor-statsig": "^62.2.0",
48
48
  "@atlaskit/tokens": "^13.0.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "bind-event-listener": "^3.0.0"
@@ -94,16 +94,13 @@
94
94
  "platform_editor_adf_with_localid": {
95
95
  "type": "boolean"
96
96
  },
97
- "platform_editor_block_menu_jira_patch_1": {
98
- "type": "boolean"
99
- },
100
97
  "platform_editor_block_menu_copy_section": {
101
98
  "type": "boolean"
102
99
  },
103
100
  "platform_editor_block_menu_v2_patch_2": {
104
101
  "type": "boolean"
105
102
  },
106
- "platform_editor_block_menu_v2_patch_3": {
103
+ "platform_editor_block_menu_jira_patch_1": {
107
104
  "type": "boolean"
108
105
  },
109
106
  "platform_editor_block_menu_divider_patch": {