@atlaskit/editor-plugin-block-controls 2.21.4 → 2.21.5

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,13 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 2.21.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#104365](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104365)
8
+ [`b23e9a45b03a1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b23e9a45b03a1) -
9
+ Remove use of platform_editor_element_drag_and_drop_debug for drop target VR test
10
+
3
11
  ## 2.21.4
4
12
 
5
13
  ### Patch Changes
@@ -18,7 +18,6 @@ var _dropTarget = require("../ui/drop-target");
18
18
  var _dropTargetLayout = require("../ui/drop-target-layout");
19
19
  var _decorationsCommon = require("./decorations-common");
20
20
  var _consts2 = require("./utils/consts");
21
- var _dragTargetDebug = require("./utils/drag-target-debug");
22
21
  var _validation = require("./utils/validation");
23
22
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
24
23
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -227,7 +226,7 @@ var dropTargetDecorations = exports.dropTargetDecorations = function dropTargetD
227
226
  var canDrop = activePMNode && (0, _validation.canMoveNodeToIndex)(parent, index, activePMNode, $pos, node);
228
227
 
229
228
  //NOTE: This will block drop targets showing for nodes that are valid after transformation (i.e. expand -> nestedExpand)
230
- if (!canDrop && !(0, _dragTargetDebug.isBlocksDragTargetDebug)()) {
229
+ if (!canDrop) {
231
230
  pushNodeStack(node, depth);
232
231
  return false; //not valid pos, so nested not valid either
233
232
  }
@@ -27,7 +27,6 @@ var _handleMouseOver = require("./handle-mouse-over");
27
27
  var _keymap = require("./keymap");
28
28
  var _activeAnchorTracker = require("./utils/active-anchor-tracker");
29
29
  var _anchorUtils = require("./utils/anchor-utils");
30
- var _dragTargetDebug = require("./utils/drag-target-debug");
31
30
  var _transactions = require("./utils/transactions");
32
31
  var key = exports.key = new _state.PluginKey('blockControls');
33
32
  var EDITOR_BLOCKS_DRAG_INIT = 'Editor Blocks Drag Initialization Time';
@@ -219,14 +218,14 @@ var newApply = exports.newApply = function newApply(api, formatMessage, tr, curr
219
218
  var isDropTargetsMissing = ((_meta$isDragging = meta === null || meta === void 0 ? void 0 : meta.isDragging) !== null && _meta$isDragging !== void 0 ? _meta$isDragging : isDragging) && maybeNodeCountChanged && !(meta !== null && meta !== void 0 && meta.nodeMoved);
220
219
 
221
220
  // Remove drop target decorations when dragging stops or they need to be redrawn
222
- if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing || (0, _dragTargetDebug.isBlocksDragTargetDebug)()) {
221
+ if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing) {
223
222
  var dropTargetDecs = (0, _decorationsDropTarget.findDropTargetDecs)(decorations);
224
223
  decorations = decorations.remove(dropTargetDecs);
225
224
  }
226
225
 
227
226
  // Add drop targets when dragging starts or some are missing
228
227
  if (api) {
229
- if (meta !== null && meta !== void 0 && meta.isDragging || isDropTargetsMissing || (0, _dragTargetDebug.isBlocksDragTargetDebug)()) {
228
+ if (meta !== null && meta !== void 0 && meta.isDragging || isDropTargetsMissing) {
230
229
  var decs = (0, _decorationsDropTarget.dropTargetDecorations)(newState, api, formatMessage, nodeViewPortalProviderAPI, latestActiveNode, anchorRectCache);
231
230
  decorations = decorations.add(newState.doc, decs);
232
231
  }
@@ -368,7 +367,7 @@ var oldApply = exports.oldApply = function oldApply(api, formatMessage, tr, curr
368
367
  var decs = (0, _decorationsDragHandle.dragHandleDecoration)(api, formatMessage, meta.activeNode.pos, meta.activeNode.anchorName, meta.activeNode.nodeType, nodeViewPortalProviderAPI, meta.activeNode.handleOptions);
369
368
  decorations = decorations.add(newState.doc, [decs]);
370
369
  }
371
- if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing || (0, _dragTargetDebug.isBlocksDragTargetDebug)()) {
370
+ if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing) {
372
371
  // Remove drop target decoration when dragging stops
373
372
  var dropTargetDecs = decorations.find(undefined, undefined, function (spec) {
374
373
  return spec.type === 'drop-target-decoration';
@@ -386,7 +385,7 @@ var oldApply = exports.oldApply = function oldApply(api, formatMessage, tr, curr
386
385
  if (api) {
387
386
  // Add drop targets when node is being dragged
388
387
  // if the transaction is only for analytics and user is dragging, continue to draw drop targets
389
- if (shouldCreateDropTargets || (0, _dragTargetDebug.isBlocksDragTargetDebug)()) {
388
+ if (shouldCreateDropTargets) {
390
389
  var _meta$activeNode7;
391
390
  var _decs = (0, _decorationsDropTarget.dropTargetDecorations)(newState, api, formatMessage, nodeViewPortalProviderAPI, isNestedEnabled ? (_meta$activeNode7 = meta === null || meta === void 0 ? void 0 : meta.activeNode) !== null && _meta$activeNode7 !== void 0 ? _meta$activeNode7 : mappedActiveNodePos : meta === null || meta === void 0 ? void 0 : meta.activeNode, anchorRectCache);
392
391
  decorations = decorations.add(newState.doc, _decs);
@@ -17,7 +17,6 @@ var _colors = require("@atlaskit/theme/colors");
17
17
  var _decorationsCommon = require("../pm-plugins/decorations-common");
18
18
  var _activeAnchorTracker = require("../pm-plugins/utils/active-anchor-tracker");
19
19
  var _anchorUtils = require("../pm-plugins/utils/anchor-utils");
20
- var _dragTargetDebug = require("../pm-plugins/utils/drag-target-debug");
21
20
  var _updateSelection = require("../pm-plugins/utils/update-selection");
22
21
  /**
23
22
  * @jsxRuntime classic
@@ -131,7 +130,7 @@ var DropTargetLayout = exports.DropTargetLayout = function DropTargetLayout(prop
131
130
  ,
132
131
  css: [dropTargetLayoutStyle, dropTargetStackLayoutHintStyle],
133
132
  "data-testid": "block-ctrl-drop-indicator"
134
- }, isDraggedOver || (0, _dragTargetDebug.isBlocksDragTargetDebug)() ? (0, _react2.jsx)(_box.DropIndicator, {
133
+ }, isDraggedOver ? (0, _react2.jsx)(_box.DropIndicator, {
135
134
  edge: "right",
136
135
  gap: "-".concat(DROP_TARGET_LAYOUT_DROP_ZONE_WIDTH, "px")
137
136
  }) : isActiveAnchor && (0, _react2.jsx)("div", {
@@ -18,7 +18,6 @@ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
18
18
  var _decorationsCommon = require("../pm-plugins/decorations-common");
19
19
  var _activeAnchorTracker = require("../pm-plugins/utils/active-anchor-tracker");
20
20
  var _anchorUtils = require("../pm-plugins/utils/anchor-utils");
21
- var _dragTargetDebug = require("../pm-plugins/utils/drag-target-debug");
22
21
  var _inlineDropTarget = require("../pm-plugins/utils/inline-drop-target");
23
22
  var _consts = require("./consts");
24
23
  var _inlineDropTarget2 = require("./inline-drop-target");
@@ -48,7 +47,11 @@ var styleDropIndicator = (0, _react2.css)({
48
47
  height: '100%',
49
48
  margin: '0 auto',
50
49
  position: 'relative',
51
- width: "var(".concat(EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH, ", 100%)")
50
+ width: "var(".concat(EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH, ", 100%)"),
51
+ display: 'none'
52
+ });
53
+ var styleDropIndicatorVisible = (0, _react2.css)({
54
+ display: 'block'
52
55
  });
53
56
  var nestedDropIndicatorStyle = (0, _react2.css)({
54
57
  position: 'relative'
@@ -232,10 +235,8 @@ var DropTarget = exports.DropTarget = function DropTarget(props) {
232
235
  ,
233
236
  style: dynamicStyle,
234
237
  "data-testid": "block-ctrl-drop-target"
235
- },
236
- // 4px gap to clear expand node border
237
- (isDraggedOver || (0, _dragTargetDebug.isBlocksDragTargetDebug)()) && (0, _react2.jsx)("div", {
238
- css: styleDropIndicator,
238
+ }, (0, _react2.jsx)("div", {
239
+ css: [styleDropIndicator, isDraggedOver && styleDropIndicatorVisible],
239
240
  "data-testid": "block-ctrl-drop-indicator"
240
241
  }, (0, _react2.jsx)(_box.DropIndicator, {
241
242
  edge: "bottom"
@@ -17,7 +17,6 @@ var _colors = require("@atlaskit/theme/colors");
17
17
  var _decorationsCommon = require("../pm-plugins/decorations-common");
18
18
  var _activeAnchorTracker = require("../pm-plugins/utils/active-anchor-tracker");
19
19
  var _anchorUtils = require("../pm-plugins/utils/anchor-utils");
20
- var _dragTargetDebug = require("../pm-plugins/utils/drag-target-debug");
21
20
  var _updateSelection = require("../pm-plugins/utils/update-selection");
22
21
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
23
22
  /* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */
@@ -255,7 +254,7 @@ var InlineDropTarget = exports.InlineDropTarget = function InlineDropTarget(_ref
255
254
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
256
255
  ,
257
256
  style: hoverZoneRectStyle
258
- }, isDraggedOver || (0, _dragTargetDebug.isBlocksDragTargetDebug)() ? (0, _react2.jsx)(_box.DropIndicator, {
257
+ }, isDraggedOver ? (0, _react2.jsx)(_box.DropIndicator, {
259
258
  edge: dropIndicatorPos
260
259
  }) : isActiveAnchor && (0, _react2.jsx)("div", {
261
260
  "data-testid": "block-ctrl-drop-hint",
@@ -10,7 +10,6 @@ import { DropTarget, EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_GAP, EDITOR_BLOCK_CONT
10
10
  import { DropTargetLayout } from '../ui/drop-target-layout';
11
11
  import { getNestedDepth, TYPE_DROP_TARGET_DEC, unmountDecorations } from './decorations-common';
12
12
  import { maxLayoutColumnSupported } from './utils/consts';
13
- import { isBlocksDragTargetDebug } from './utils/drag-target-debug';
14
13
  import { canMoveNodeToIndex, isInSameLayout } from './utils/validation';
15
14
  const IGNORE_NODES = ['tableCell', 'tableHeader', 'tableRow', 'layoutColumn', 'listItem', 'caption'];
16
15
  const PARENT_WITH_END_DROP_TARGET = ['tableCell', 'tableHeader', 'panel', 'layoutColumn', 'expand', 'nestedExpand', 'bodiedExtension'];
@@ -216,7 +215,7 @@ export const dropTargetDecorations = (newState, api, formatMessage, nodeViewPort
216
215
  const canDrop = activePMNode && canMoveNodeToIndex(parent, index, activePMNode, $pos, node);
217
216
 
218
217
  //NOTE: This will block drop targets showing for nodes that are valid after transformation (i.e. expand -> nestedExpand)
219
- if (!canDrop && !isBlocksDragTargetDebug()) {
218
+ if (!canDrop) {
220
219
  pushNodeStack(node, depth);
221
220
  return false; //not valid pos, so nested not valid either
222
221
  }
@@ -19,7 +19,6 @@ import { handleMouseOver } from './handle-mouse-over';
19
19
  import { boundKeydownHandler } from './keymap';
20
20
  import { defaultActiveAnchorTracker } from './utils/active-anchor-tracker';
21
21
  import { AnchorRectCache, isAnchorSupported } from './utils/anchor-utils';
22
- import { isBlocksDragTargetDebug } from './utils/drag-target-debug';
23
22
  import { getTrMetadata } from './utils/transactions';
24
23
  export const key = new PluginKey('blockControls');
25
24
  const EDITOR_BLOCKS_DRAG_INIT = 'Editor Blocks Drag Initialization Time';
@@ -219,14 +218,14 @@ export const newApply = (api, formatMessage, tr, currentState, newState, flags,
219
218
  const isDropTargetsMissing = ((_meta$isDragging = meta === null || meta === void 0 ? void 0 : meta.isDragging) !== null && _meta$isDragging !== void 0 ? _meta$isDragging : isDragging) && maybeNodeCountChanged && !(meta !== null && meta !== void 0 && meta.nodeMoved);
220
219
 
221
220
  // Remove drop target decorations when dragging stops or they need to be redrawn
222
- if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing || isBlocksDragTargetDebug()) {
221
+ if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing) {
223
222
  const dropTargetDecs = findDropTargetDecs(decorations);
224
223
  decorations = decorations.remove(dropTargetDecs);
225
224
  }
226
225
 
227
226
  // Add drop targets when dragging starts or some are missing
228
227
  if (api) {
229
- if (meta !== null && meta !== void 0 && meta.isDragging || isDropTargetsMissing || isBlocksDragTargetDebug()) {
228
+ if (meta !== null && meta !== void 0 && meta.isDragging || isDropTargetsMissing) {
230
229
  const decs = dropTargetDecorations(newState, api, formatMessage, nodeViewPortalProviderAPI, latestActiveNode, anchorRectCache);
231
230
  decorations = decorations.add(newState.doc, decs);
232
231
  }
@@ -355,7 +354,7 @@ export const oldApply = (api, formatMessage, tr, currentState, oldState, newStat
355
354
  const decs = dragHandleDecoration(api, formatMessage, meta.activeNode.pos, meta.activeNode.anchorName, meta.activeNode.nodeType, nodeViewPortalProviderAPI, meta.activeNode.handleOptions);
356
355
  decorations = decorations.add(newState.doc, [decs]);
357
356
  }
358
- if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing || isBlocksDragTargetDebug()) {
357
+ if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing) {
359
358
  // Remove drop target decoration when dragging stops
360
359
  const dropTargetDecs = decorations.find(undefined, undefined, spec => spec.type === 'drop-target-decoration');
361
360
  decorations = decorations.remove(dropTargetDecs);
@@ -371,7 +370,7 @@ export const oldApply = (api, formatMessage, tr, currentState, oldState, newStat
371
370
  if (api) {
372
371
  // Add drop targets when node is being dragged
373
372
  // if the transaction is only for analytics and user is dragging, continue to draw drop targets
374
- if (shouldCreateDropTargets || isBlocksDragTargetDebug()) {
373
+ if (shouldCreateDropTargets) {
375
374
  var _meta$activeNode7;
376
375
  const decs = dropTargetDecorations(newState, api, formatMessage, nodeViewPortalProviderAPI, isNestedEnabled ? (_meta$activeNode7 = meta === null || meta === void 0 ? void 0 : meta.activeNode) !== null && _meta$activeNode7 !== void 0 ? _meta$activeNode7 : mappedActiveNodePos : meta === null || meta === void 0 ? void 0 : meta.activeNode, anchorRectCache);
377
376
  decorations = decorations.add(newState.doc, decs);
@@ -14,7 +14,6 @@ import { B200 } from '@atlaskit/theme/colors';
14
14
  import { getNodeAnchor } from '../pm-plugins/decorations-common';
15
15
  import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
16
16
  import { isAnchorSupported } from '../pm-plugins/utils/anchor-utils';
17
- import { isBlocksDragTargetDebug } from '../pm-plugins/utils/drag-target-debug';
18
17
  import { getInsertLayoutStep, updateSelection } from '../pm-plugins/utils/update-selection';
19
18
 
20
19
  // 8px gap + 16px on left and right
@@ -127,7 +126,7 @@ export const DropTargetLayout = props => {
127
126
  ,
128
127
  css: [dropTargetLayoutStyle, dropTargetStackLayoutHintStyle],
129
128
  "data-testid": "block-ctrl-drop-indicator"
130
- }, isDraggedOver || isBlocksDragTargetDebug() ? jsx(DropIndicator, {
129
+ }, isDraggedOver ? jsx(DropIndicator, {
131
130
  edge: "right",
132
131
  gap: `-${DROP_TARGET_LAYOUT_DROP_ZONE_WIDTH}px`
133
132
  }) : isActiveAnchor && jsx("div", {
@@ -15,7 +15,6 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
15
  import { getNodeAnchor } from '../pm-plugins/decorations-common';
16
16
  import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
17
17
  import { isAnchorSupported } from '../pm-plugins/utils/anchor-utils';
18
- import { isBlocksDragTargetDebug } from '../pm-plugins/utils/drag-target-debug';
19
18
  import { shouldAllowInlineDropTarget } from '../pm-plugins/utils/inline-drop-target';
20
19
  import { getNestedNodeLeftPaddingMargin } from './consts';
21
20
  import { InlineDropTarget } from './inline-drop-target';
@@ -38,7 +37,11 @@ const styleDropIndicator = css({
38
37
  height: '100%',
39
38
  margin: '0 auto',
40
39
  position: 'relative',
41
- width: `var(${EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH}, 100%)`
40
+ width: `var(${EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH}, 100%)`,
41
+ display: 'none'
42
+ });
43
+ const styleDropIndicatorVisible = css({
44
+ display: 'block'
42
45
  });
43
46
  const nestedDropIndicatorStyle = css({
44
47
  position: 'relative'
@@ -221,10 +224,8 @@ export const DropTarget = props => {
221
224
  ,
222
225
  style: dynamicStyle,
223
226
  "data-testid": "block-ctrl-drop-target"
224
- },
225
- // 4px gap to clear expand node border
226
- (isDraggedOver || isBlocksDragTargetDebug()) && jsx("div", {
227
- css: styleDropIndicator,
227
+ }, jsx("div", {
228
+ css: [styleDropIndicator, isDraggedOver && styleDropIndicatorVisible],
228
229
  "data-testid": "block-ctrl-drop-indicator"
229
230
  }, jsx(DropIndicator, {
230
231
  edge: "bottom"
@@ -16,7 +16,6 @@ import { B200 } from '@atlaskit/theme/colors';
16
16
  import { getNodeAnchor } from '../pm-plugins/decorations-common';
17
17
  import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
18
18
  import { isAnchorSupported } from '../pm-plugins/utils/anchor-utils';
19
- import { isBlocksDragTargetDebug } from '../pm-plugins/utils/drag-target-debug';
20
19
  import { getInsertLayoutStep, updateSelection } from '../pm-plugins/utils/update-selection';
21
20
  const HOVER_ZONE_WIDTH = '--editor-blocks-inline-hover-zone-width';
22
21
  const HOVER_ZONE_HEIGHT = '--editor-blocks-inline-hover-zone-height';
@@ -252,7 +251,7 @@ export const InlineDropTarget = ({
252
251
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
253
252
  ,
254
253
  style: hoverZoneRectStyle
255
- }, isDraggedOver || isBlocksDragTargetDebug() ? jsx(DropIndicator, {
254
+ }, isDraggedOver ? jsx(DropIndicator, {
256
255
  edge: dropIndicatorPos
257
256
  }) : isActiveAnchor && jsx("div", {
258
257
  "data-testid": "block-ctrl-drop-hint",
@@ -13,7 +13,6 @@ import { DropTarget, EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_GAP, EDITOR_BLOCK_CONT
13
13
  import { DropTargetLayout } from '../ui/drop-target-layout';
14
14
  import { getNestedDepth, TYPE_DROP_TARGET_DEC, unmountDecorations } from './decorations-common';
15
15
  import { maxLayoutColumnSupported } from './utils/consts';
16
- import { isBlocksDragTargetDebug } from './utils/drag-target-debug';
17
16
  import { canMoveNodeToIndex, isInSameLayout } from './utils/validation';
18
17
  var IGNORE_NODES = ['tableCell', 'tableHeader', 'tableRow', 'layoutColumn', 'listItem', 'caption'];
19
18
  var PARENT_WITH_END_DROP_TARGET = ['tableCell', 'tableHeader', 'panel', 'layoutColumn', 'expand', 'nestedExpand', 'bodiedExtension'];
@@ -220,7 +219,7 @@ export var dropTargetDecorations = function dropTargetDecorations(newState, api,
220
219
  var canDrop = activePMNode && canMoveNodeToIndex(parent, index, activePMNode, $pos, node);
221
220
 
222
221
  //NOTE: This will block drop targets showing for nodes that are valid after transformation (i.e. expand -> nestedExpand)
223
- if (!canDrop && !isBlocksDragTargetDebug()) {
222
+ if (!canDrop) {
224
223
  pushNodeStack(node, depth);
225
224
  return false; //not valid pos, so nested not valid either
226
225
  }
@@ -20,7 +20,6 @@ import { handleMouseOver } from './handle-mouse-over';
20
20
  import { boundKeydownHandler } from './keymap';
21
21
  import { defaultActiveAnchorTracker } from './utils/active-anchor-tracker';
22
22
  import { AnchorRectCache, isAnchorSupported } from './utils/anchor-utils';
23
- import { isBlocksDragTargetDebug } from './utils/drag-target-debug';
24
23
  import { getTrMetadata } from './utils/transactions';
25
24
  export var key = new PluginKey('blockControls');
26
25
  var EDITOR_BLOCKS_DRAG_INIT = 'Editor Blocks Drag Initialization Time';
@@ -212,14 +211,14 @@ export var newApply = function newApply(api, formatMessage, tr, currentState, ne
212
211
  var isDropTargetsMissing = ((_meta$isDragging = meta === null || meta === void 0 ? void 0 : meta.isDragging) !== null && _meta$isDragging !== void 0 ? _meta$isDragging : isDragging) && maybeNodeCountChanged && !(meta !== null && meta !== void 0 && meta.nodeMoved);
213
212
 
214
213
  // Remove drop target decorations when dragging stops or they need to be redrawn
215
- if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing || isBlocksDragTargetDebug()) {
214
+ if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing) {
216
215
  var dropTargetDecs = findDropTargetDecs(decorations);
217
216
  decorations = decorations.remove(dropTargetDecs);
218
217
  }
219
218
 
220
219
  // Add drop targets when dragging starts or some are missing
221
220
  if (api) {
222
- if (meta !== null && meta !== void 0 && meta.isDragging || isDropTargetsMissing || isBlocksDragTargetDebug()) {
221
+ if (meta !== null && meta !== void 0 && meta.isDragging || isDropTargetsMissing) {
223
222
  var decs = dropTargetDecorations(newState, api, formatMessage, nodeViewPortalProviderAPI, latestActiveNode, anchorRectCache);
224
223
  decorations = decorations.add(newState.doc, decs);
225
224
  }
@@ -361,7 +360,7 @@ export var oldApply = function oldApply(api, formatMessage, tr, currentState, ol
361
360
  var decs = dragHandleDecoration(api, formatMessage, meta.activeNode.pos, meta.activeNode.anchorName, meta.activeNode.nodeType, nodeViewPortalProviderAPI, meta.activeNode.handleOptions);
362
361
  decorations = decorations.add(newState.doc, [decs]);
363
362
  }
364
- if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing || isBlocksDragTargetDebug()) {
363
+ if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing) {
365
364
  // Remove drop target decoration when dragging stops
366
365
  var dropTargetDecs = decorations.find(undefined, undefined, function (spec) {
367
366
  return spec.type === 'drop-target-decoration';
@@ -379,7 +378,7 @@ export var oldApply = function oldApply(api, formatMessage, tr, currentState, ol
379
378
  if (api) {
380
379
  // Add drop targets when node is being dragged
381
380
  // if the transaction is only for analytics and user is dragging, continue to draw drop targets
382
- if (shouldCreateDropTargets || isBlocksDragTargetDebug()) {
381
+ if (shouldCreateDropTargets) {
383
382
  var _meta$activeNode7;
384
383
  var _decs = dropTargetDecorations(newState, api, formatMessage, nodeViewPortalProviderAPI, isNestedEnabled ? (_meta$activeNode7 = meta === null || meta === void 0 ? void 0 : meta.activeNode) !== null && _meta$activeNode7 !== void 0 ? _meta$activeNode7 : mappedActiveNodePos : meta === null || meta === void 0 ? void 0 : meta.activeNode, anchorRectCache);
385
384
  decorations = decorations.add(newState.doc, _decs);
@@ -16,7 +16,6 @@ import { B200 } from '@atlaskit/theme/colors';
16
16
  import { getNodeAnchor } from '../pm-plugins/decorations-common';
17
17
  import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
18
18
  import { isAnchorSupported } from '../pm-plugins/utils/anchor-utils';
19
- import { isBlocksDragTargetDebug } from '../pm-plugins/utils/drag-target-debug';
20
19
  import { getInsertLayoutStep, updateSelection } from '../pm-plugins/utils/update-selection';
21
20
 
22
21
  // 8px gap + 16px on left and right
@@ -124,7 +123,7 @@ export var DropTargetLayout = function DropTargetLayout(props) {
124
123
  ,
125
124
  css: [dropTargetLayoutStyle, dropTargetStackLayoutHintStyle],
126
125
  "data-testid": "block-ctrl-drop-indicator"
127
- }, isDraggedOver || isBlocksDragTargetDebug() ? jsx(DropIndicator, {
126
+ }, isDraggedOver ? jsx(DropIndicator, {
128
127
  edge: "right",
129
128
  gap: "-".concat(DROP_TARGET_LAYOUT_DROP_ZONE_WIDTH, "px")
130
129
  }) : isActiveAnchor && jsx("div", {
@@ -17,7 +17,6 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
17
17
  import { getNodeAnchor } from '../pm-plugins/decorations-common';
18
18
  import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
19
19
  import { isAnchorSupported } from '../pm-plugins/utils/anchor-utils';
20
- import { isBlocksDragTargetDebug } from '../pm-plugins/utils/drag-target-debug';
21
20
  import { shouldAllowInlineDropTarget } from '../pm-plugins/utils/inline-drop-target';
22
21
  import { getNestedNodeLeftPaddingMargin } from './consts';
23
22
  import { InlineDropTarget } from './inline-drop-target';
@@ -40,7 +39,11 @@ var styleDropIndicator = css({
40
39
  height: '100%',
41
40
  margin: '0 auto',
42
41
  position: 'relative',
43
- width: "var(".concat(EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH, ", 100%)")
42
+ width: "var(".concat(EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH, ", 100%)"),
43
+ display: 'none'
44
+ });
45
+ var styleDropIndicatorVisible = css({
46
+ display: 'block'
44
47
  });
45
48
  var nestedDropIndicatorStyle = css({
46
49
  position: 'relative'
@@ -224,10 +227,8 @@ export var DropTarget = function DropTarget(props) {
224
227
  ,
225
228
  style: dynamicStyle,
226
229
  "data-testid": "block-ctrl-drop-target"
227
- },
228
- // 4px gap to clear expand node border
229
- (isDraggedOver || isBlocksDragTargetDebug()) && jsx("div", {
230
- css: styleDropIndicator,
230
+ }, jsx("div", {
231
+ css: [styleDropIndicator, isDraggedOver && styleDropIndicatorVisible],
231
232
  "data-testid": "block-ctrl-drop-indicator"
232
233
  }, jsx(DropIndicator, {
233
234
  edge: "bottom"
@@ -18,7 +18,6 @@ import { B200 } from '@atlaskit/theme/colors';
18
18
  import { getNodeAnchor } from '../pm-plugins/decorations-common';
19
19
  import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
20
20
  import { isAnchorSupported } from '../pm-plugins/utils/anchor-utils';
21
- import { isBlocksDragTargetDebug } from '../pm-plugins/utils/drag-target-debug';
22
21
  import { getInsertLayoutStep, updateSelection } from '../pm-plugins/utils/update-selection';
23
22
  var HOVER_ZONE_WIDTH = '--editor-blocks-inline-hover-zone-width';
24
23
  var HOVER_ZONE_HEIGHT = '--editor-blocks-inline-hover-zone-height';
@@ -247,7 +246,7 @@ export var InlineDropTarget = function InlineDropTarget(_ref) {
247
246
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
248
247
  ,
249
248
  style: hoverZoneRectStyle
250
- }, isDraggedOver || isBlocksDragTargetDebug() ? jsx(DropIndicator, {
249
+ }, isDraggedOver ? jsx(DropIndicator, {
251
250
  edge: dropIndicatorPos
252
251
  }) : isActiveAnchor && jsx("div", {
253
252
  "data-testid": "block-ctrl-drop-hint",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "2.21.4",
3
+ "version": "2.21.5",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@atlaskit/adf-schema": "^46.1.0",
34
- "@atlaskit/editor-common": "^99.3.0",
34
+ "@atlaskit/editor-common": "^99.4.0",
35
35
  "@atlaskit/editor-plugin-accessibility-utils": "^1.2.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
37
37
  "@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.1.0",
49
49
  "@atlaskit/primitives": "^13.3.0",
50
50
  "@atlaskit/theme": "^14.0.0",
51
- "@atlaskit/tmp-editor-statsig": "^2.37.0",
51
+ "@atlaskit/tmp-editor-statsig": "^2.38.0",
52
52
  "@atlaskit/tokens": "^3.1.0",
53
53
  "@atlaskit/tooltip": "^19.0.0",
54
54
  "@babel/runtime": "^7.0.0",
@@ -115,9 +115,6 @@
115
115
  "platform_editor_element_drag_and_drop_ed_24321": {
116
116
  "type": "boolean"
117
117
  },
118
- "platform_editor_element_drag_and_drop_debug": {
119
- "type": "boolean"
120
- },
121
118
  "platform_editor_element_dnd_nested_fix_patch_6": {
122
119
  "type": "boolean"
123
120
  },
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isBlocksDragTargetDebug = void 0;
7
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
- var IS_GEMINI_TEST_ENV = Boolean(process.env.NODE_ENV === 'development') && Boolean(window.__gemini_set_feature_flag__);
9
- var isBlocksDragTargetDebug = exports.isBlocksDragTargetDebug = function isBlocksDragTargetDebug() {
10
- return IS_GEMINI_TEST_ENV && (0, _platformFeatureFlags.fg)('platform_editor_element_drag_and_drop_debug');
11
- };
@@ -1,5 +0,0 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
- const IS_GEMINI_TEST_ENV = Boolean(process.env.NODE_ENV === 'development') && Boolean(window.__gemini_set_feature_flag__);
3
- export const isBlocksDragTargetDebug = () => {
4
- return IS_GEMINI_TEST_ENV && fg('platform_editor_element_drag_and_drop_debug');
5
- };
@@ -1,5 +0,0 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
- var IS_GEMINI_TEST_ENV = Boolean(process.env.NODE_ENV === 'development') && Boolean(window.__gemini_set_feature_flag__);
3
- export var isBlocksDragTargetDebug = function isBlocksDragTargetDebug() {
4
- return IS_GEMINI_TEST_ENV && fg('platform_editor_element_drag_and_drop_debug');
5
- };
@@ -1 +0,0 @@
1
- export declare const isBlocksDragTargetDebug: () => boolean;
@@ -1 +0,0 @@
1
- export declare const isBlocksDragTargetDebug: () => boolean;