@atlaskit/editor-plugin-block-controls 7.5.3 → 7.5.4
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
|
+
## 7.5.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`13e78771cb389`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/13e78771cb389) -
|
|
8
|
+
ED-29600 gate unnecessary decoration operations in apply function
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 7.5.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -355,7 +355,9 @@ var _apply = exports.apply = function apply(api, formatMessage, tr, currentState
|
|
|
355
355
|
// Re-create node decorations
|
|
356
356
|
var isDecSetEmpty = decorations === _view.DecorationSet.empty;
|
|
357
357
|
var isNodeDecsMissing = isDecSetEmpty || maybeNodeCountChanged || (0, _experiments.editorExperiment)('platform_editor_breakout_resizing', true) && hasJustFinishedResizing;
|
|
358
|
-
var shouldRedrawNodeDecs = !isResizerResizing && (isNodeDecsMissing || (meta === null || meta === void 0 ? void 0 : meta.isDragging))
|
|
358
|
+
var shouldRedrawNodeDecs = !isResizerResizing && (isNodeDecsMissing || (meta === null || meta === void 0 ? void 0 : meta.isDragging)) &&
|
|
359
|
+
// Skip expensive anchor node decoration recalculations when native anchor support is enabled
|
|
360
|
+
!((0, _expValEquals.expValEquals)('platform_editor_native_anchor_support', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('editor_native_anchor_remove_decoration_in_apply'));
|
|
359
361
|
var isActiveNodeModified = false;
|
|
360
362
|
if (api && shouldRedrawNodeDecs) {
|
|
361
363
|
var oldNodeDecs = (0, _decorationsAnchor.findNodeDecs)(newState, decorations, from, to);
|
|
@@ -354,7 +354,9 @@ export const apply = (api, formatMessage, tr, currentState, newState, flags, nod
|
|
|
354
354
|
// Re-create node decorations
|
|
355
355
|
const isDecSetEmpty = decorations === DecorationSet.empty;
|
|
356
356
|
const isNodeDecsMissing = isDecSetEmpty || maybeNodeCountChanged || editorExperiment('platform_editor_breakout_resizing', true) && hasJustFinishedResizing;
|
|
357
|
-
const shouldRedrawNodeDecs = !isResizerResizing && (isNodeDecsMissing || (meta === null || meta === void 0 ? void 0 : meta.isDragging))
|
|
357
|
+
const shouldRedrawNodeDecs = !isResizerResizing && (isNodeDecsMissing || (meta === null || meta === void 0 ? void 0 : meta.isDragging)) &&
|
|
358
|
+
// Skip expensive anchor node decoration recalculations when native anchor support is enabled
|
|
359
|
+
!(expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) && fg('editor_native_anchor_remove_decoration_in_apply'));
|
|
358
360
|
let isActiveNodeModified = false;
|
|
359
361
|
if (api && shouldRedrawNodeDecs) {
|
|
360
362
|
const oldNodeDecs = findNodeDecs(newState, decorations, from, to);
|
|
@@ -348,7 +348,9 @@ var _apply = function apply(api, formatMessage, tr, currentState, newState, flag
|
|
|
348
348
|
// Re-create node decorations
|
|
349
349
|
var isDecSetEmpty = decorations === DecorationSet.empty;
|
|
350
350
|
var isNodeDecsMissing = isDecSetEmpty || maybeNodeCountChanged || editorExperiment('platform_editor_breakout_resizing', true) && hasJustFinishedResizing;
|
|
351
|
-
var shouldRedrawNodeDecs = !isResizerResizing && (isNodeDecsMissing || (meta === null || meta === void 0 ? void 0 : meta.isDragging))
|
|
351
|
+
var shouldRedrawNodeDecs = !isResizerResizing && (isNodeDecsMissing || (meta === null || meta === void 0 ? void 0 : meta.isDragging)) &&
|
|
352
|
+
// Skip expensive anchor node decoration recalculations when native anchor support is enabled
|
|
353
|
+
!(expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) && fg('editor_native_anchor_remove_decoration_in_apply'));
|
|
352
354
|
var isActiveNodeModified = false;
|
|
353
355
|
if (api && shouldRedrawNodeDecs) {
|
|
354
356
|
var oldNodeDecs = findNodeDecs(newState, decorations, from, to);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.4",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
54
54
|
"@atlaskit/primitives": "^16.1.0",
|
|
55
55
|
"@atlaskit/theme": "^21.0.0",
|
|
56
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
56
|
+
"@atlaskit/tmp-editor-statsig": "^13.29.0",
|
|
57
57
|
"@atlaskit/tokens": "^7.1.0",
|
|
58
58
|
"@atlaskit/tooltip": "^20.7.0",
|
|
59
59
|
"@babel/runtime": "^7.0.0",
|
|
@@ -145,6 +145,9 @@
|
|
|
145
145
|
"platform_editor_block_menu_patch_1": {
|
|
146
146
|
"type": "boolean"
|
|
147
147
|
},
|
|
148
|
+
"editor_native_anchor_remove_decoration_in_apply": {
|
|
149
|
+
"type": "boolean"
|
|
150
|
+
},
|
|
148
151
|
"platform_editor_breakout_resizing_widget_fix": {
|
|
149
152
|
"type": "boolean"
|
|
150
153
|
},
|