@atlaskit/editor-plugin-block-controls 6.0.1 → 6.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,13 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 6.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5de213b733131`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5de213b733131) -
8
+ [ux] ED-29123 fix paragraph shifting on hover when next to image with wrap-right/left
9
+ - Updated dependencies
10
+
3
11
  ## 6.0.1
4
12
 
5
13
  ### Patch Changes
@@ -9,6 +9,7 @@ var _react = require("react");
9
9
  var _uuid = _interopRequireDefault(require("uuid"));
10
10
  var _view = require("@atlaskit/editor-prosemirror/view");
11
11
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
13
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
13
14
  var _quickInsertButton = require("../ui/quick-insert-button");
14
15
  var _marks = require("./utils/marks");
@@ -67,6 +68,10 @@ var quickInsertButtonDecoration = exports.quickInsertButtonDecoration = function
67
68
  if ((0, _platformFeatureFlags.fg)('platform_editor_controls_patch_15')) {
68
69
  // inline decoration causes cursor disappear when focusing editor at the first line (e.g. press Tab when title is focused)
69
70
  element.style.display = 'block';
71
+ if ((0, _expValEquals.expValEquals)('platform_editor_quick_insert_image_wrap_right_fix', 'isEnabled', true)) {
72
+ // make sure it does not interfere with elements floating next to each other e.g. paragraph next to image with wrap-right
73
+ element.style.clear = 'unset';
74
+ }
70
75
  }
71
76
  element.contentEditable = 'false';
72
77
  element.setAttribute('data-blocks-quick-insert-container', 'true');
@@ -2,6 +2,7 @@ import { createElement } from 'react';
2
2
  import uuid from 'uuid';
3
3
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
4
4
  import { fg } from '@atlaskit/platform-feature-flags';
5
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
7
  import { QuickInsertWithVisibility } from '../ui/quick-insert-button';
7
8
  import { getActiveBlockMarks } from './utils/marks';
@@ -59,6 +60,10 @@ export const quickInsertButtonDecoration = ({
59
60
  if (fg('platform_editor_controls_patch_15')) {
60
61
  // inline decoration causes cursor disappear when focusing editor at the first line (e.g. press Tab when title is focused)
61
62
  element.style.display = 'block';
63
+ if (expValEquals('platform_editor_quick_insert_image_wrap_right_fix', 'isEnabled', true)) {
64
+ // make sure it does not interfere with elements floating next to each other e.g. paragraph next to image with wrap-right
65
+ element.style.clear = 'unset';
66
+ }
62
67
  }
63
68
  element.contentEditable = 'false';
64
69
  element.setAttribute('data-blocks-quick-insert-container', 'true');
@@ -2,6 +2,7 @@ import { createElement } from 'react';
2
2
  import uuid from 'uuid';
3
3
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
4
4
  import { fg } from '@atlaskit/platform-feature-flags';
5
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
7
  import { QuickInsertWithVisibility } from '../ui/quick-insert-button';
7
8
  import { getActiveBlockMarks } from './utils/marks';
@@ -60,6 +61,10 @@ export var quickInsertButtonDecoration = function quickInsertButtonDecoration(_r
60
61
  if (fg('platform_editor_controls_patch_15')) {
61
62
  // inline decoration causes cursor disappear when focusing editor at the first line (e.g. press Tab when title is focused)
62
63
  element.style.display = 'block';
64
+ if (expValEquals('platform_editor_quick_insert_image_wrap_right_fix', 'isEnabled', true)) {
65
+ // make sure it does not interfere with elements floating next to each other e.g. paragraph next to image with wrap-right
66
+ element.style.clear = 'unset';
67
+ }
63
68
  }
64
69
  element.contentEditable = 'false';
65
70
  element.setAttribute('data-blocks-quick-insert-container', 'true');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "6.0.1",
3
+ "version": "6.0.2",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -52,7 +52,7 @@
52
52
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
53
53
  "@atlaskit/primitives": "^14.14.0",
54
54
  "@atlaskit/theme": "^21.0.0",
55
- "@atlaskit/tmp-editor-statsig": "^12.10.0",
55
+ "@atlaskit/tmp-editor-statsig": "^12.12.0",
56
56
  "@atlaskit/tokens": "^6.3.0",
57
57
  "@atlaskit/tooltip": "^20.4.0",
58
58
  "@babel/runtime": "^7.0.0",