@atlaskit/editor-plugin-block-controls 35.0.0 → 35.0.2

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,19 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 35.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 35.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`05db07714a6a4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/05db07714a6a4) -
14
+ Remove the fully rolled-out selection toolbar block-handle experiment.
15
+ - Updated dependencies
16
+
3
17
  ## 35.0.0
4
18
 
5
19
  ### Patch Changes
@@ -29,7 +29,6 @@ var _box = require("@atlaskit/primitives/box");
29
29
  var _xcss = require("@atlaskit/primitives/xcss/xcss");
30
30
  var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
31
31
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
32
- var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
33
32
  var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
34
33
  var _decorationsCommon = require("../pm-plugins/decorations-common");
35
34
  var _main = require("../pm-plugins/main");
@@ -362,9 +361,6 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
362
361
  }
363
362
  }, [anchorName, nodeType, view.dom]);
364
363
  (0, _react.useEffect)(function () {
365
- if (!(0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_selection_toolbar_block_handle', 'isEnabled', true)) {
366
- return;
367
- }
368
364
  var unbind = (0, _bindEventListener.bind)(window, {
369
365
  type: 'mouseUp',
370
366
  listener: function listener() {
@@ -379,13 +375,6 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
379
375
  mouseDownRef.current = true;
380
376
  }, []);
381
377
  var handleMouseUp = (0, _react.useCallback)(function (e) {
382
- // Stop propagation so that for drag handles in nested scenarios the click is captured
383
- // and doesn't propagate to the edge of the element and trigger a node selection
384
- // on the parent element
385
- if (!(0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_selection_toolbar_block_handle', 'isEnabled', true)) {
386
- e.stopPropagation();
387
- }
388
-
389
378
  // Fixes bug where selection toolbar is blocked when mouse is released on drag handle
390
379
  if (mouseDownRef.current) {
391
380
  e.stopPropagation();
@@ -904,7 +893,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
904
893
  // See https://product-fabric.atlassian.net/browse/ED-26266
905
894
  browser.gecko && dragHandleMultiLineSelectionFixFirefox, (0, _editorExperiment.editorExperiment)('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles, isFocused && keyboardFocusedDragHandleStyles, focusedStyles, dragHandleButtonScaledStyles],
906
895
  ref: buttonRef,
907
- onMouseDown: (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_selection_toolbar_block_handle', 'isEnabled', true) ? handleMouseDown : undefined,
896
+ onMouseDown: handleMouseDown,
908
897
  onMouseUp: handleMouseUp,
909
898
  onClick: handleOnClickNew,
910
899
  onKeyDown: handleKeyDownNew
@@ -28,7 +28,6 @@ import { Box } from '@atlaskit/primitives/box';
28
28
  import { xcss } from '@atlaskit/primitives/xcss/xcss';
29
29
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
30
30
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
31
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
32
31
  import Tooltip from '@atlaskit/tooltip/Tooltip';
33
32
  import { getNodeTypeWithLevel } from '../pm-plugins/decorations-common';
34
33
  import { key } from '../pm-plugins/main';
@@ -341,9 +340,6 @@ export const DragHandle = ({
341
340
  }
342
341
  }, [anchorName, nodeType, view.dom]);
343
342
  useEffect(() => {
344
- if (!expValEqualsNoExposure('platform_editor_selection_toolbar_block_handle', 'isEnabled', true)) {
345
- return;
346
- }
347
343
  const unbind = bind(window, {
348
344
  type: 'mouseUp',
349
345
  listener: () => mouseDownRef.current = false
@@ -354,13 +350,6 @@ export const DragHandle = ({
354
350
  mouseDownRef.current = true;
355
351
  }, []);
356
352
  const handleMouseUp = useCallback(e => {
357
- // Stop propagation so that for drag handles in nested scenarios the click is captured
358
- // and doesn't propagate to the edge of the element and trigger a node selection
359
- // on the parent element
360
- if (!expValEqualsNoExposure('platform_editor_selection_toolbar_block_handle', 'isEnabled', true)) {
361
- e.stopPropagation();
362
- }
363
-
364
353
  // Fixes bug where selection toolbar is blocked when mouse is released on drag handle
365
354
  if (mouseDownRef.current) {
366
355
  e.stopPropagation();
@@ -884,7 +873,7 @@ export const DragHandle = ({
884
873
  // See https://product-fabric.atlassian.net/browse/ED-26266
885
874
  browser.gecko && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles, isFocused && keyboardFocusedDragHandleStyles, focusedStyles, dragHandleButtonScaledStyles],
886
875
  ref: buttonRef,
887
- onMouseDown: expValEqualsNoExposure('platform_editor_selection_toolbar_block_handle', 'isEnabled', true) ? handleMouseDown : undefined,
876
+ onMouseDown: handleMouseDown,
888
877
  onMouseUp: handleMouseUp,
889
878
  onClick: handleOnClickNew,
890
879
  onKeyDown: handleKeyDownNew
@@ -32,7 +32,6 @@ import { Box } from '@atlaskit/primitives/box';
32
32
  import { xcss } from '@atlaskit/primitives/xcss/xcss';
33
33
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
34
34
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
35
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
36
35
  import Tooltip from '@atlaskit/tooltip/Tooltip';
37
36
  import { getNodeTypeWithLevel } from '../pm-plugins/decorations-common';
38
37
  import { key } from '../pm-plugins/main';
@@ -358,9 +357,6 @@ export var DragHandle = function DragHandle(_ref2) {
358
357
  }
359
358
  }, [anchorName, nodeType, view.dom]);
360
359
  useEffect(function () {
361
- if (!expValEqualsNoExposure('platform_editor_selection_toolbar_block_handle', 'isEnabled', true)) {
362
- return;
363
- }
364
360
  var unbind = bind(window, {
365
361
  type: 'mouseUp',
366
362
  listener: function listener() {
@@ -375,13 +371,6 @@ export var DragHandle = function DragHandle(_ref2) {
375
371
  mouseDownRef.current = true;
376
372
  }, []);
377
373
  var handleMouseUp = useCallback(function (e) {
378
- // Stop propagation so that for drag handles in nested scenarios the click is captured
379
- // and doesn't propagate to the edge of the element and trigger a node selection
380
- // on the parent element
381
- if (!expValEqualsNoExposure('platform_editor_selection_toolbar_block_handle', 'isEnabled', true)) {
382
- e.stopPropagation();
383
- }
384
-
385
374
  // Fixes bug where selection toolbar is blocked when mouse is released on drag handle
386
375
  if (mouseDownRef.current) {
387
376
  e.stopPropagation();
@@ -900,7 +889,7 @@ export var DragHandle = function DragHandle(_ref2) {
900
889
  // See https://product-fabric.atlassian.net/browse/ED-26266
901
890
  browser.gecko && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles, isFocused && keyboardFocusedDragHandleStyles, focusedStyles, dragHandleButtonScaledStyles],
902
891
  ref: buttonRef,
903
- onMouseDown: expValEqualsNoExposure('platform_editor_selection_toolbar_block_handle', 'isEnabled', true) ? handleMouseDown : undefined,
892
+ onMouseDown: handleMouseDown,
904
893
  onMouseUp: handleMouseUp,
905
894
  onClick: handleOnClickNew,
906
895
  onKeyDown: handleKeyDownNew
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "35.0.0",
3
+ "version": "35.0.2",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -60,7 +60,7 @@
60
60
  "@atlaskit/primitives": "^22.8.0",
61
61
  "@atlaskit/section-message": "^10.3.0",
62
62
  "@atlaskit/theme": "^28.2.0",
63
- "@atlaskit/tmp-editor-statsig": "^270.0.0",
63
+ "@atlaskit/tmp-editor-statsig": "^272.0.0",
64
64
  "@atlaskit/tokens": "^20.14.0",
65
65
  "@atlaskit/tooltip": "^24.4.0",
66
66
  "@babel/runtime": "^7.0.0",
@@ -72,7 +72,7 @@
72
72
  "uuid": "^11.1.1"
73
73
  },
74
74
  "peerDependencies": {
75
- "@atlaskit/editor-common": "^138.0.0",
75
+ "@atlaskit/editor-common": "^138.2.0",
76
76
  "react": "^18.2.0 || ^19.2.0",
77
77
  "react-dom": "^18.2.0 || ^19.2.0",
78
78
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
@@ -97,7 +97,7 @@
97
97
  },
98
98
  "devDependencies": {
99
99
  "@af/editor-examples-helpers": "workspace:^",
100
- "@atlaskit/editor-common": "^138.0.0",
100
+ "@atlaskit/editor-common": "^138.2.0",
101
101
  "@atlaskit/editor-plugins": "^17.0.0",
102
102
  "@atlaskit/synchrony-test-helpers": "workspace:^",
103
103
  "@atlassian/structured-docs-types": "workspace:^",