@atlaskit/editor-plugin-block-controls 3.8.8 → 3.8.9

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-controls
2
2
 
3
+ ## 3.8.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#139216](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139216)
8
+ [`e8f596d2b1910`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e8f596d2b1910) -
9
+ [ux] Cleaned up platform_editor_controls_patch_1 FG
10
+ - Updated dependencies
11
+
3
12
  ## 3.8.8
4
13
 
5
14
  ### Patch Changes
@@ -116,7 +116,6 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
116
116
  rootNodeType = _ref.rootNodeType,
117
117
  anchorRectCache = _ref.anchorRectCache;
118
118
  var macroInteractionUpdates = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'featureFlags.macroInteractionUpdates');
119
- // remove when platform_editor_controls_patch_1 is removed
120
119
  var isTypeAheadOpen = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'typeAhead.isOpen');
121
120
  var _useState = (0, _react.useState)({
122
121
  display: 'none'
@@ -215,7 +214,7 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
215
214
  // text or element with be deselected and the / added immediately after the paragraph
216
215
  // unless the selection is empty
217
216
  var currentSelection = view.state.selection;
218
- if ((0, _documentChecks.isInTextSelection)(view) && currentSelection.from !== currentSelection.to && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_1')) {
217
+ if ((0, _documentChecks.isInTextSelection)(view) && currentSelection.from !== currentSelection.to) {
219
218
  var currentParagraphNode = (0, _utils.findParentNode)(function (node) {
220
219
  return TEXT_PARENT_TYPES.includes(node.type.name);
221
220
  })(currentSelection);
@@ -289,26 +288,20 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
289
288
  testId: "editor-quick-insert-button",
290
289
  type: "button",
291
290
  "aria-label": formatMessage(_messages.blockControlsMessages.insert),
292
- xcss: [(0, _platformFeatureFlags.fg)('platform_editor_controls_sticky_controls') ? buttonStyles : stickyButtonStyles,
293
- // remove disabledStyles and platform_editor_controls_widget_visibility check when platform_editor_controls_patch_1 is removed
294
- isTypeAheadOpen && !(0, _platformFeatureFlags.fg)('platform_editor_controls_widget_visibility') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_1') ? disabledStyles : undefined],
291
+ xcss: [(0, _platformFeatureFlags.fg)('platform_editor_controls_sticky_controls') ? buttonStyles : stickyButtonStyles, isTypeAheadOpen && !(0, _platformFeatureFlags.fg)('platform_editor_controls_widget_visibility') ? disabledStyles : undefined],
295
292
  onClick: handleQuickInsert,
296
- onMouseDown: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_1') ? undefined : handleMouseDown,
297
- isDisabled: !(0, _platformFeatureFlags.fg)('platform_editor_controls_widget_visibility') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_1') && isTypeAheadOpen
293
+ onMouseDown: handleMouseDown,
294
+ isDisabled: !(0, _platformFeatureFlags.fg)('platform_editor_controls_widget_visibility') && isTypeAheadOpen
298
295
  }, /*#__PURE__*/_react.default.createElement(_add.default, {
299
296
  label: "add",
300
- color:
301
- // remove color.icon.disabled when platform_editor_controls_patch_1 is removed
302
- isTypeAheadOpen && !(0, _platformFeatureFlags.fg)('platform_editor_controls_widget_visibility') ? "var(--ds-icon-disabled, #091E424F)" : "var(--ds-icon-subtle, #626F86)"
297
+ color: isTypeAheadOpen && !(0, _platformFeatureFlags.fg)('platform_editor_controls_widget_visibility') ? "var(--ds-icon-disabled, #091E424F)" : "var(--ds-icon-subtle, #626F86)"
303
298
  })));
304
299
  };
305
300
  return /*#__PURE__*/_react.default.createElement(_primitives.Box
306
301
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
307
302
  , {
308
303
  style: positionStyles,
309
- xcss: [containerStaticStyles,
310
- // remove disabledContainerStyles and platform_editor_controls_widget_visibility check when platform_editor_controls_patch_1 is removed
311
- isTypeAheadOpen && !(0, _platformFeatureFlags.fg)('platform_editor_controls_widget_visibility') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_1') && disabledContainerStyles]
304
+ xcss: [containerStaticStyles, isTypeAheadOpen && !(0, _platformFeatureFlags.fg)('platform_editor_controls_widget_visibility') && disabledContainerStyles]
312
305
  }, (0, _platformFeatureFlags.fg)('platform_editor_controls_sticky_controls') ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
313
306
  xcss: [tooltipContainerStyles]
314
307
  }, tooltipPressable()) : tooltipPressable());
@@ -103,7 +103,6 @@ export const TypeAheadControl = ({
103
103
  anchorRectCache
104
104
  }) => {
105
105
  const macroInteractionUpdates = useSharedPluginStateSelector(api, 'featureFlags.macroInteractionUpdates');
106
- // remove when platform_editor_controls_patch_1 is removed
107
106
  const isTypeAheadOpen = useSharedPluginStateSelector(api, 'typeAhead.isOpen');
108
107
  const [positionStyles, setPositionStyles] = useState({
109
108
  display: 'none'
@@ -201,7 +200,7 @@ export const TypeAheadControl = ({
201
200
  // text or element with be deselected and the / added immediately after the paragraph
202
201
  // unless the selection is empty
203
202
  const currentSelection = view.state.selection;
204
- if (isInTextSelection(view) && currentSelection.from !== currentSelection.to && fg('platform_editor_controls_patch_1')) {
203
+ if (isInTextSelection(view) && currentSelection.from !== currentSelection.to) {
205
204
  const currentParagraphNode = findParentNode(node => TEXT_PARENT_TYPES.includes(node.type.name))(currentSelection);
206
205
  if (currentParagraphNode) {
207
206
  const newPos =
@@ -275,25 +274,19 @@ export const TypeAheadControl = ({
275
274
  testId: "editor-quick-insert-button",
276
275
  type: "button",
277
276
  "aria-label": formatMessage(messages.insert),
278
- xcss: [fg('platform_editor_controls_sticky_controls') ? buttonStyles : stickyButtonStyles,
279
- // remove disabledStyles and platform_editor_controls_widget_visibility check when platform_editor_controls_patch_1 is removed
280
- isTypeAheadOpen && !fg('platform_editor_controls_widget_visibility') && fg('platform_editor_controls_patch_1') ? disabledStyles : undefined],
277
+ xcss: [fg('platform_editor_controls_sticky_controls') ? buttonStyles : stickyButtonStyles, isTypeAheadOpen && !fg('platform_editor_controls_widget_visibility') ? disabledStyles : undefined],
281
278
  onClick: handleQuickInsert,
282
- onMouseDown: fg('platform_editor_controls_patch_1') ? undefined : handleMouseDown,
283
- isDisabled: !fg('platform_editor_controls_widget_visibility') && fg('platform_editor_controls_patch_1') && isTypeAheadOpen
279
+ onMouseDown: handleMouseDown,
280
+ isDisabled: !fg('platform_editor_controls_widget_visibility') && isTypeAheadOpen
284
281
  }, /*#__PURE__*/React.createElement(AddIcon, {
285
282
  label: "add",
286
- color:
287
- // remove color.icon.disabled when platform_editor_controls_patch_1 is removed
288
- isTypeAheadOpen && !fg('platform_editor_controls_widget_visibility') ? "var(--ds-icon-disabled, #091E424F)" : "var(--ds-icon-subtle, #626F86)"
283
+ color: isTypeAheadOpen && !fg('platform_editor_controls_widget_visibility') ? "var(--ds-icon-disabled, #091E424F)" : "var(--ds-icon-subtle, #626F86)"
289
284
  })));
290
285
  return /*#__PURE__*/React.createElement(Box
291
286
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
292
287
  , {
293
288
  style: positionStyles,
294
- xcss: [containerStaticStyles,
295
- // remove disabledContainerStyles and platform_editor_controls_widget_visibility check when platform_editor_controls_patch_1 is removed
296
- isTypeAheadOpen && !fg('platform_editor_controls_widget_visibility') && fg('platform_editor_controls_patch_1') && disabledContainerStyles]
289
+ xcss: [containerStaticStyles, isTypeAheadOpen && !fg('platform_editor_controls_widget_visibility') && disabledContainerStyles]
297
290
  }, fg('platform_editor_controls_sticky_controls') ? /*#__PURE__*/React.createElement(Box, {
298
291
  xcss: [tooltipContainerStyles]
299
292
  }, tooltipPressable()) : tooltipPressable());
@@ -106,7 +106,6 @@ export var TypeAheadControl = function TypeAheadControl(_ref) {
106
106
  rootNodeType = _ref.rootNodeType,
107
107
  anchorRectCache = _ref.anchorRectCache;
108
108
  var macroInteractionUpdates = useSharedPluginStateSelector(api, 'featureFlags.macroInteractionUpdates');
109
- // remove when platform_editor_controls_patch_1 is removed
110
109
  var isTypeAheadOpen = useSharedPluginStateSelector(api, 'typeAhead.isOpen');
111
110
  var _useState = useState({
112
111
  display: 'none'
@@ -205,7 +204,7 @@ export var TypeAheadControl = function TypeAheadControl(_ref) {
205
204
  // text or element with be deselected and the / added immediately after the paragraph
206
205
  // unless the selection is empty
207
206
  var currentSelection = view.state.selection;
208
- if (isInTextSelection(view) && currentSelection.from !== currentSelection.to && fg('platform_editor_controls_patch_1')) {
207
+ if (isInTextSelection(view) && currentSelection.from !== currentSelection.to) {
209
208
  var currentParagraphNode = findParentNode(function (node) {
210
209
  return TEXT_PARENT_TYPES.includes(node.type.name);
211
210
  })(currentSelection);
@@ -279,26 +278,20 @@ export var TypeAheadControl = function TypeAheadControl(_ref) {
279
278
  testId: "editor-quick-insert-button",
280
279
  type: "button",
281
280
  "aria-label": formatMessage(messages.insert),
282
- xcss: [fg('platform_editor_controls_sticky_controls') ? buttonStyles : stickyButtonStyles,
283
- // remove disabledStyles and platform_editor_controls_widget_visibility check when platform_editor_controls_patch_1 is removed
284
- isTypeAheadOpen && !fg('platform_editor_controls_widget_visibility') && fg('platform_editor_controls_patch_1') ? disabledStyles : undefined],
281
+ xcss: [fg('platform_editor_controls_sticky_controls') ? buttonStyles : stickyButtonStyles, isTypeAheadOpen && !fg('platform_editor_controls_widget_visibility') ? disabledStyles : undefined],
285
282
  onClick: handleQuickInsert,
286
- onMouseDown: fg('platform_editor_controls_patch_1') ? undefined : handleMouseDown,
287
- isDisabled: !fg('platform_editor_controls_widget_visibility') && fg('platform_editor_controls_patch_1') && isTypeAheadOpen
283
+ onMouseDown: handleMouseDown,
284
+ isDisabled: !fg('platform_editor_controls_widget_visibility') && isTypeAheadOpen
288
285
  }, /*#__PURE__*/React.createElement(AddIcon, {
289
286
  label: "add",
290
- color:
291
- // remove color.icon.disabled when platform_editor_controls_patch_1 is removed
292
- isTypeAheadOpen && !fg('platform_editor_controls_widget_visibility') ? "var(--ds-icon-disabled, #091E424F)" : "var(--ds-icon-subtle, #626F86)"
287
+ color: isTypeAheadOpen && !fg('platform_editor_controls_widget_visibility') ? "var(--ds-icon-disabled, #091E424F)" : "var(--ds-icon-subtle, #626F86)"
293
288
  })));
294
289
  };
295
290
  return /*#__PURE__*/React.createElement(Box
296
291
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
297
292
  , {
298
293
  style: positionStyles,
299
- xcss: [containerStaticStyles,
300
- // remove disabledContainerStyles and platform_editor_controls_widget_visibility check when platform_editor_controls_patch_1 is removed
301
- isTypeAheadOpen && !fg('platform_editor_controls_widget_visibility') && fg('platform_editor_controls_patch_1') && disabledContainerStyles]
294
+ xcss: [containerStaticStyles, isTypeAheadOpen && !fg('platform_editor_controls_widget_visibility') && disabledContainerStyles]
302
295
  }, fg('platform_editor_controls_sticky_controls') ? /*#__PURE__*/React.createElement(Box, {
303
296
  xcss: [tooltipContainerStyles]
304
297
  }, tooltipPressable()) : tooltipPressable());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "3.8.8",
3
+ "version": "3.8.9",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,13 +33,13 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@atlaskit/adf-schema": "^47.6.0",
36
- "@atlaskit/editor-common": "^103.3.0",
36
+ "@atlaskit/editor-common": "^103.4.0",
37
37
  "@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
39
39
  "@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
40
- "@atlaskit/editor-plugin-feature-flags": "^1.3.0",
40
+ "@atlaskit/editor-plugin-feature-flags": "^1.4.0",
41
41
  "@atlaskit/editor-plugin-metrics": "^3.4.0",
42
- "@atlaskit/editor-plugin-quick-insert": "^2.2.0",
42
+ "@atlaskit/editor-plugin-quick-insert": "^2.3.0",
43
43
  "@atlaskit/editor-plugin-selection": "^2.1.0",
44
44
  "@atlaskit/editor-plugin-type-ahead": "^2.3.0",
45
45
  "@atlaskit/editor-plugin-width": "^3.0.0",
@@ -162,9 +162,6 @@
162
162
  "platform_editor_multi_body_extension_extensibility": {
163
163
  "type": "boolean"
164
164
  },
165
- "platform_editor_controls_patch_1": {
166
- "type": "boolean"
167
- },
168
165
  "platform_editor_elements_dnd_multi_select_patch_3": {
169
166
  "type": "boolean"
170
167
  },