@atlaskit/editor-plugin-layout 3.1.1 → 3.1.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,15 @@
1
1
  # @atlaskit/editor-plugin-layout
2
2
 
3
+ ## 3.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#193468](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/193468)
8
+ [`e626b68cc9c4c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e626b68cc9c4c) -
9
+ [ux] [CONFCLOUD-82368] Hide layout resize handles until interaction instead of unrendering to
10
+ prevent rerenders of content inside layouts
11
+ - Updated dependencies
12
+
3
13
  ## 3.1.1
4
14
 
5
15
  ### Patch Changes
@@ -17,6 +17,7 @@ var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/rea
17
17
  var _resizer = require("@atlaskit/editor-common/resizer");
18
18
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
19
19
  var _model = require("@atlaskit/editor-prosemirror/model");
20
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
20
21
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
21
22
  var _utils = require("../pm-plugins/utils");
22
23
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
@@ -97,7 +98,7 @@ var LayoutBreakoutResizer = function LayoutBreakoutResizer(_ref) {
97
98
  // put the selection into the first column of the layout
98
99
  (0, _utils.selectIntoLayout)(view, pos, 0);
99
100
  }, [getPos, view]);
100
- if (interactionState === 'hasNotHadInteraction') {
101
+ if (interactionState === 'hasNotHadInteraction' && !(0, _expValEquals.expValEquals)('platform_editor_breakout_interaction_rerender', 'isEnabled', true)) {
101
102
  return null;
102
103
  }
103
104
  return /*#__PURE__*/_react.default.createElement(_resizer.BreakoutResizer, {
@@ -107,6 +108,7 @@ var LayoutBreakoutResizer = function LayoutBreakoutResizer(_ref) {
107
108
  nodeType: "layoutSection",
108
109
  getEditorWidth: getEditorWidth,
109
110
  disabled: (0, _experiments.editorExperiment)('platform_editor_breakout_resizing', true) ? true : editorDisabled === true || !isBreakoutAvailable(view.state.schema),
111
+ hidden: interactionState === 'hasNotHadInteraction' && (0, _expValEquals.expValEquals)('platform_editor_breakout_interaction_rerender', 'isEnabled', true),
110
112
  parentRef: parentRef,
111
113
  editorAnalyticsApi: pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions,
112
114
  displayGuidelines: (0, _experiments.editorExperiment)('single_column_layouts', true) ? displayGuidelines : undefined,
@@ -4,6 +4,7 @@ import ReactNodeView from '@atlaskit/editor-common/react-node-view';
4
4
  import { BreakoutResizer, ignoreResizerMutations } from '@atlaskit/editor-common/resizer';
5
5
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
6
6
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
7
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
8
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
8
9
  import { selectIntoLayout } from '../pm-plugins/utils';
9
10
  const layoutDynamicFullWidthGuidelineOffset = 16;
@@ -84,7 +85,7 @@ const LayoutBreakoutResizer = ({
84
85
  // put the selection into the first column of the layout
85
86
  selectIntoLayout(view, pos, 0);
86
87
  }, [getPos, view]);
87
- if (interactionState === 'hasNotHadInteraction') {
88
+ if (interactionState === 'hasNotHadInteraction' && !expValEquals('platform_editor_breakout_interaction_rerender', 'isEnabled', true)) {
88
89
  return null;
89
90
  }
90
91
  return /*#__PURE__*/React.createElement(BreakoutResizer, {
@@ -94,6 +95,7 @@ const LayoutBreakoutResizer = ({
94
95
  nodeType: "layoutSection",
95
96
  getEditorWidth: getEditorWidth,
96
97
  disabled: editorExperiment('platform_editor_breakout_resizing', true) ? true : editorDisabled === true || !isBreakoutAvailable(view.state.schema),
98
+ hidden: interactionState === 'hasNotHadInteraction' && expValEquals('platform_editor_breakout_interaction_rerender', 'isEnabled', true),
97
99
  parentRef: parentRef,
98
100
  editorAnalyticsApi: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions,
99
101
  displayGuidelines: editorExperiment('single_column_layouts', true) ? displayGuidelines : undefined,
@@ -11,6 +11,7 @@ import ReactNodeView from '@atlaskit/editor-common/react-node-view';
11
11
  import { BreakoutResizer, ignoreResizerMutations } from '@atlaskit/editor-common/resizer';
12
12
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
13
13
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
14
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
14
15
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
16
  import { selectIntoLayout } from '../pm-plugins/utils';
16
17
  var layoutDynamicFullWidthGuidelineOffset = 16;
@@ -88,7 +89,7 @@ var LayoutBreakoutResizer = function LayoutBreakoutResizer(_ref) {
88
89
  // put the selection into the first column of the layout
89
90
  selectIntoLayout(view, pos, 0);
90
91
  }, [getPos, view]);
91
- if (interactionState === 'hasNotHadInteraction') {
92
+ if (interactionState === 'hasNotHadInteraction' && !expValEquals('platform_editor_breakout_interaction_rerender', 'isEnabled', true)) {
92
93
  return null;
93
94
  }
94
95
  return /*#__PURE__*/React.createElement(BreakoutResizer, {
@@ -98,6 +99,7 @@ var LayoutBreakoutResizer = function LayoutBreakoutResizer(_ref) {
98
99
  nodeType: "layoutSection",
99
100
  getEditorWidth: getEditorWidth,
100
101
  disabled: editorExperiment('platform_editor_breakout_resizing', true) ? true : editorDisabled === true || !isBreakoutAvailable(view.state.schema),
102
+ hidden: interactionState === 'hasNotHadInteraction' && expValEquals('platform_editor_breakout_interaction_rerender', 'isEnabled', true),
101
103
  parentRef: parentRef,
102
104
  editorAnalyticsApi: pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions,
103
105
  displayGuidelines: editorExperiment('single_column_layouts', true) ? displayGuidelines : undefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-layout",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "Layout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -42,16 +42,16 @@
42
42
  "@atlaskit/editor-plugin-width": "^4.0.0",
43
43
  "@atlaskit/editor-prosemirror": "7.0.0",
44
44
  "@atlaskit/editor-shared-styles": "^3.5.0",
45
- "@atlaskit/icon": "^27.7.0",
45
+ "@atlaskit/icon": "^27.8.0",
46
46
  "@atlaskit/icon-lab": "^5.2.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
- "@atlaskit/tmp-editor-statsig": "^9.17.0",
48
+ "@atlaskit/tmp-editor-statsig": "^9.20.0",
49
49
  "@atlaskit/tokens": "^5.6.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1"
52
52
  },
53
53
  "peerDependencies": {
54
- "@atlaskit/editor-common": "^107.12.0",
54
+ "@atlaskit/editor-common": "^107.15.0",
55
55
  "react": "^18.2.0",
56
56
  "react-intl-next": "npm:react-intl@^5.18.1"
57
57
  },