@atlaskit/editor-plugin-expand 3.2.5 → 3.2.6

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-expand
2
2
 
3
+ ## 3.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#141513](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/141513)
8
+ [`15ae5c8a85a20`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/15ae5c8a85a20) -
9
+ Do not re-render on every transaction in single player expand.
10
+ - Updated dependencies
11
+
3
12
  ## 3.2.5
4
13
 
5
14
  ### Patch Changes
@@ -12,7 +12,6 @@ var _messages = require("@atlaskit/editor-common/messages");
12
12
  var _quickInsert = require("@atlaskit/editor-common/quick-insert");
13
13
  var _utils = require("@atlaskit/editor-common/utils");
14
14
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
16
15
  var _commands = require("./commands");
17
16
  var _keymap = require("./pm-plugins/keymap");
18
17
  var _main = require("./pm-plugins/main");
@@ -27,7 +26,6 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
27
26
  // Confluence is injecting the FF through editor props, from an experiment
28
27
  // Jira is pulling it in through platform feature flags, from a feature gate
29
28
  var isNestingExpandsSupported = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 || (_api$featureFlags = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.nestedExpandInExpandEx) || (0, _platformFeatureFlags.fg)('platform_editor_nest_nested_expand_in_expand_jira');
30
- var nestedExpandNode = (0, _experiments.editorExperiment)('platform_editor_nested_non_bodied_macros', 'test') ? _adfSchema.nestedExpand : _adfSchema.nestedExpandWithoutNonBodiedMacros;
31
29
  return {
32
30
  name: 'expand',
33
31
  nodes: function nodes() {
@@ -36,7 +34,7 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
36
34
  node: _adfSchema.expandWithNestedExpand
37
35
  }, {
38
36
  name: 'nestedExpand',
39
- node: nestedExpandNode
37
+ node: _adfSchema.nestedExpand
40
38
  }];
41
39
  },
42
40
  actions: {
@@ -19,6 +19,7 @@ var _utils = require("@atlaskit/editor-common/utils");
19
19
  var _history = require("@atlaskit/editor-prosemirror/history");
20
20
  var _model = require("@atlaskit/editor-prosemirror/model");
21
21
  var _state = require("@atlaskit/editor-prosemirror/state");
22
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
22
23
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
23
24
  var _commands = require("../commands");
24
25
  var _ExpandButton = require("../ui/ExpandButton");
@@ -494,7 +495,9 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
494
495
  }
495
496
  }
496
497
  this.node = node;
497
- this.updateExpandToggleIcon(this.node);
498
+ if (!(0, _platformFeatureFlags.fg)('platform_editor_disable_unnecessary_expand_renders')) {
499
+ this.updateExpandToggleIcon(this.node);
500
+ }
498
501
  return true;
499
502
  }
500
503
  return false;
@@ -12,7 +12,6 @@ var _messages = require("@atlaskit/editor-common/messages");
12
12
  var _quickInsert = require("@atlaskit/editor-common/quick-insert");
13
13
  var _utils = require("@atlaskit/editor-common/utils");
14
14
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
16
15
  var _commands = require("./commands");
17
16
  var _keymap = require("./pm-plugins/keymap");
18
17
  var _main = require("./pm-plugins/main");
@@ -27,7 +26,6 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
27
26
  // Confluence is injecting the FF through editor props, from an experiment
28
27
  // Jira is pulling it in through platform feature flags, from a feature gate
29
28
  var isNestingExpandsSupported = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 || (_api$featureFlags = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.nestedExpandInExpandEx) || (0, _platformFeatureFlags.fg)('platform_editor_nest_nested_expand_in_expand_jira');
30
- var nestedExpandNode = (0, _experiments.editorExperiment)('platform_editor_nested_non_bodied_macros', 'test') ? _adfSchema.nestedExpand : _adfSchema.nestedExpandWithoutNonBodiedMacros;
31
29
  return {
32
30
  name: 'expand',
33
31
  nodes: function nodes() {
@@ -36,7 +34,7 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
36
34
  node: _adfSchema.expandWithNestedExpand
37
35
  }, {
38
36
  name: 'nestedExpand',
39
- node: nestedExpandNode
37
+ node: _adfSchema.nestedExpand
40
38
  }];
41
39
  },
42
40
  actions: {
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
- import { expandWithNestedExpand, nestedExpand, nestedExpandWithoutNonBodiedMacros } from '@atlaskit/adf-schema';
2
+ import { expandWithNestedExpand, nestedExpand } from '@atlaskit/adf-schema';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
6
6
  import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
7
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
8
  import { createExpandNode, insertExpand, insertExpandWithInputMethod } from './commands';
10
9
  import { expandKeymap } from './pm-plugins/keymap';
11
10
  import { createPlugin } from './pm-plugins/main';
@@ -21,7 +20,6 @@ export let expandPlugin = ({
21
20
  // Confluence is injecting the FF through editor props, from an experiment
22
21
  // Jira is pulling it in through platform feature flags, from a feature gate
23
22
  const isNestingExpandsSupported = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : (_api$featureFlags$sha = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags$sha === void 0 ? void 0 : _api$featureFlags$sha.nestedExpandInExpandEx) || fg('platform_editor_nest_nested_expand_in_expand_jira');
24
- const nestedExpandNode = editorExperiment('platform_editor_nested_non_bodied_macros', 'test') ? nestedExpand : nestedExpandWithoutNonBodiedMacros;
25
23
  return {
26
24
  name: 'expand',
27
25
  nodes() {
@@ -30,7 +28,7 @@ export let expandPlugin = ({
30
28
  node: expandWithNestedExpand
31
29
  }, {
32
30
  name: 'nestedExpand',
33
- node: nestedExpandNode
31
+ node: nestedExpand
34
32
  }];
35
33
  },
36
34
  actions: {
@@ -9,6 +9,7 @@ import { closestElement, isEmptyNode } from '@atlaskit/editor-common/utils';
9
9
  import { redo, undo } from '@atlaskit/editor-prosemirror/history';
10
10
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
11
11
  import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
12
13
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
13
14
  import { deleteExpand, setSelectionInsideExpand, toggleExpandExpanded, updateExpandTitle } from '../commands';
14
15
  import { ExpandButton } from '../ui/ExpandButton';
@@ -487,7 +488,9 @@ export class ExpandNodeView {
487
488
  }
488
489
  }
489
490
  this.node = node;
490
- this.updateExpandToggleIcon(this.node);
491
+ if (!fg('platform_editor_disable_unnecessary_expand_renders')) {
492
+ this.updateExpandToggleIcon(this.node);
493
+ }
491
494
  return true;
492
495
  }
493
496
  return false;
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
- import { expandWithNestedExpand, nestedExpand, nestedExpandWithoutNonBodiedMacros } from '@atlaskit/adf-schema';
2
+ import { expandWithNestedExpand, nestedExpand } from '@atlaskit/adf-schema';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
6
6
  import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
7
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
8
  import { createExpandNode, insertExpand, insertExpandWithInputMethod } from './commands';
10
9
  import { expandKeymap } from './pm-plugins/keymap';
11
10
  import { createPlugin } from './pm-plugins/main';
@@ -21,7 +20,6 @@ export let expandPlugin = ({
21
20
  // Confluence is injecting the FF through editor props, from an experiment
22
21
  // Jira is pulling it in through platform feature flags, from a feature gate
23
22
  const isNestingExpandsSupported = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : (_api$featureFlags$sha = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags$sha === void 0 ? void 0 : _api$featureFlags$sha.nestedExpandInExpandEx) || fg('platform_editor_nest_nested_expand_in_expand_jira');
24
- const nestedExpandNode = editorExperiment('platform_editor_nested_non_bodied_macros', 'test') ? nestedExpand : nestedExpandWithoutNonBodiedMacros;
25
23
  return {
26
24
  name: 'expand',
27
25
  nodes() {
@@ -30,7 +28,7 @@ export let expandPlugin = ({
30
28
  node: expandWithNestedExpand
31
29
  }, {
32
30
  name: 'nestedExpand',
33
- node: nestedExpandNode
31
+ node: nestedExpand
34
32
  }];
35
33
  },
36
34
  actions: {
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
- import { expandWithNestedExpand, nestedExpand, nestedExpandWithoutNonBodiedMacros } from '@atlaskit/adf-schema';
2
+ import { expandWithNestedExpand, nestedExpand } from '@atlaskit/adf-schema';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
6
6
  import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
7
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
8
  import { createExpandNode, insertExpand, insertExpandWithInputMethod } from './commands';
10
9
  import { expandKeymap } from './pm-plugins/keymap';
11
10
  import { createPlugin } from './pm-plugins/main';
@@ -21,7 +20,6 @@ export var expandPlugin = function expandPlugin(_ref) {
21
20
  // Confluence is injecting the FF through editor props, from an experiment
22
21
  // Jira is pulling it in through platform feature flags, from a feature gate
23
22
  var isNestingExpandsSupported = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 || (_api$featureFlags = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.nestedExpandInExpandEx) || fg('platform_editor_nest_nested_expand_in_expand_jira');
24
- var nestedExpandNode = editorExperiment('platform_editor_nested_non_bodied_macros', 'test') ? nestedExpand : nestedExpandWithoutNonBodiedMacros;
25
23
  return {
26
24
  name: 'expand',
27
25
  nodes: function nodes() {
@@ -30,7 +28,7 @@ export var expandPlugin = function expandPlugin(_ref) {
30
28
  node: expandWithNestedExpand
31
29
  }, {
32
30
  name: 'nestedExpand',
33
- node: nestedExpandNode
31
+ node: nestedExpand
34
32
  }];
35
33
  },
36
34
  actions: {
@@ -11,6 +11,7 @@ import { closestElement, isEmptyNode } from '@atlaskit/editor-common/utils';
11
11
  import { redo, undo } from '@atlaskit/editor-prosemirror/history';
12
12
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
13
13
  import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
14
+ import { fg } from '@atlaskit/platform-feature-flags';
14
15
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
16
  import { deleteExpand, setSelectionInsideExpand, toggleExpandExpanded, updateExpandTitle } from '../commands';
16
17
  import { ExpandButton } from '../ui/ExpandButton';
@@ -486,7 +487,9 @@ export var ExpandNodeView = /*#__PURE__*/function () {
486
487
  }
487
488
  }
488
489
  this.node = node;
489
- this.updateExpandToggleIcon(this.node);
490
+ if (!fg('platform_editor_disable_unnecessary_expand_renders')) {
491
+ this.updateExpandToggleIcon(this.node);
492
+ }
490
493
  return true;
491
494
  }
492
495
  return false;
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
- import { expandWithNestedExpand, nestedExpand, nestedExpandWithoutNonBodiedMacros } from '@atlaskit/adf-schema';
2
+ import { expandWithNestedExpand, nestedExpand } from '@atlaskit/adf-schema';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
6
6
  import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
7
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
8
  import { createExpandNode, insertExpand, insertExpandWithInputMethod } from './commands';
10
9
  import { expandKeymap } from './pm-plugins/keymap';
11
10
  import { createPlugin } from './pm-plugins/main';
@@ -21,7 +20,6 @@ export var expandPlugin = function expandPlugin(_ref) {
21
20
  // Confluence is injecting the FF through editor props, from an experiment
22
21
  // Jira is pulling it in through platform feature flags, from a feature gate
23
22
  var isNestingExpandsSupported = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 || (_api$featureFlags = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.nestedExpandInExpandEx) || fg('platform_editor_nest_nested_expand_in_expand_jira');
24
- var nestedExpandNode = editorExperiment('platform_editor_nested_non_bodied_macros', 'test') ? nestedExpand : nestedExpandWithoutNonBodiedMacros;
25
23
  return {
26
24
  name: 'expand',
27
25
  nodes: function nodes() {
@@ -30,7 +28,7 @@ export var expandPlugin = function expandPlugin(_ref) {
30
28
  node: expandWithNestedExpand
31
29
  }, {
32
30
  name: 'nestedExpand',
33
- node: nestedExpandNode
31
+ node: nestedExpand
34
32
  }];
35
33
  },
36
34
  actions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-expand",
3
- "version": "3.2.5",
3
+ "version": "3.2.6",
4
4
  "description": "Expand plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,20 +35,20 @@
35
35
  "dependencies": {
36
36
  "@atlaskit/adf-schema": "^47.6.0",
37
37
  "@atlaskit/button": "^23.0.0",
38
- "@atlaskit/editor-common": "^103.0.0",
38
+ "@atlaskit/editor-common": "^103.8.0",
39
39
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
40
40
  "@atlaskit/editor-plugin-decorations": "^2.0.0",
41
41
  "@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
42
- "@atlaskit/editor-plugin-editor-viewmode": "^3.0.0",
42
+ "@atlaskit/editor-plugin-editor-viewmode": "^3.1.0",
43
43
  "@atlaskit/editor-plugin-selection": "^2.1.0",
44
- "@atlaskit/editor-plugin-selection-marker": "^2.1.0",
44
+ "@atlaskit/editor-plugin-selection-marker": "^2.2.0",
45
45
  "@atlaskit/editor-prosemirror": "7.0.0",
46
46
  "@atlaskit/editor-shared-styles": "^3.4.0",
47
47
  "@atlaskit/editor-tables": "^2.9.0",
48
- "@atlaskit/icon": "^25.5.0",
48
+ "@atlaskit/icon": "^25.6.0",
49
49
  "@atlaskit/platform-feature-flags": "^1.1.0",
50
- "@atlaskit/tmp-editor-statsig": "^4.6.0",
51
- "@atlaskit/tokens": "^4.7.0",
50
+ "@atlaskit/tmp-editor-statsig": "^4.9.0",
51
+ "@atlaskit/tokens": "^4.8.0",
52
52
  "@atlaskit/tooltip": "^20.0.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "@emotion/react": "^11.7.1",
@@ -64,9 +64,9 @@
64
64
  "@atlaskit/analytics-next": "^11.0.0",
65
65
  "@atlaskit/editor-plugin-content-insertion": "^2.1.0",
66
66
  "@atlaskit/editor-plugin-guideline": "^2.0.0",
67
- "@atlaskit/editor-plugin-quick-insert": "^2.2.0",
68
- "@atlaskit/editor-plugin-table": "^10.6.0",
69
- "@atlaskit/editor-plugin-type-ahead": "^2.3.0",
67
+ "@atlaskit/editor-plugin-quick-insert": "^2.3.0",
68
+ "@atlaskit/editor-plugin-table": "^10.8.0",
69
+ "@atlaskit/editor-plugin-type-ahead": "^2.4.0",
70
70
  "@atlaskit/editor-plugin-width": "^3.0.0",
71
71
  "@testing-library/react": "^13.4.0",
72
72
  "react-test-renderer": "^18.2.0",
@@ -112,6 +112,9 @@
112
112
  "platform-editor-single-player-expand": {
113
113
  "type": "boolean"
114
114
  },
115
+ "platform_editor_disable_unnecessary_expand_renders": {
116
+ "type": "boolean"
117
+ },
115
118
  "platform_editor_nest_nested_expand_in_expand_jira": {
116
119
  "type": "boolean"
117
120
  },