@atlaskit/editor-plugin-layout 2.6.0 → 2.7.0

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,26 @@
1
1
  # @atlaskit/editor-plugin-layout
2
2
 
3
+ ## 2.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#146198](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/146198)
8
+ [`86a786e83342d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/86a786e83342d) -
9
+ ED-27730 update layout analytics to include layout column count
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 2.6.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [#145340](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/145340)
20
+ [`21717a29553b2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/21717a29553b2) -
21
+ Switching from 5, 4, 3 empty columns layout to 1 column should work
22
+ - Updated dependencies
23
+
3
24
  ## 2.6.0
4
25
 
5
26
  ### Minor Changes
@@ -13,6 +13,7 @@ var _messages = require("@atlaskit/editor-common/messages");
13
13
  var _quickInsert = require("@atlaskit/editor-common/quick-insert");
14
14
  var _state = require("@atlaskit/editor-prosemirror/state");
15
15
  var _utils = require("@atlaskit/editor-prosemirror/utils");
16
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
17
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
17
18
  var _actions = require("./pm-plugins/actions");
18
19
  var _main = _interopRequireDefault(require("./pm-plugins/main"));
@@ -102,14 +103,15 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
102
103
  },
103
104
  quickInsert: function quickInsert(_ref4) {
104
105
  var formatMessage = _ref4.formatMessage;
105
- var withInsertLayoutAnalytics = function withInsertLayoutAnalytics(tr) {
106
+ var withInsertLayoutAnalytics = function withInsertLayoutAnalytics(tr, columnCount) {
106
107
  var _api$analytics2;
107
108
  api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || (_api$analytics2 = _api$analytics2.actions) === null || _api$analytics2 === void 0 || _api$analytics2.attachAnalyticsEvent({
108
109
  action: _analytics.ACTION.INSERTED,
109
110
  actionSubject: _analytics.ACTION_SUBJECT.DOCUMENT,
110
111
  actionSubjectId: _analytics.ACTION_SUBJECT_ID.LAYOUT,
111
112
  attributes: {
112
- inputMethod: _analytics.INPUT_METHOD.QUICK_INSERT
113
+ inputMethod: _analytics.INPUT_METHOD.QUICK_INSERT,
114
+ columnCount: columnCount
113
115
  },
114
116
  eventType: _analytics.EVENT_TYPE.TRACK
115
117
  })(tr);
@@ -126,7 +128,11 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
126
128
  },
127
129
  action: function action(insert, state, _source) {
128
130
  var tr = insert((0, _actions.createMultiColumnLayoutSection)(state, 1));
129
- withInsertLayoutAnalytics(tr);
131
+ if ((0, _platformFeatureFlags.fg)('platform_editor_column_count_analytics')) {
132
+ withInsertLayoutAnalytics(tr, 1);
133
+ } else {
134
+ withInsertLayoutAnalytics(tr);
135
+ }
130
136
  selectIntoLayoutSection(tr);
131
137
  return tr;
132
138
  }
@@ -146,7 +152,11 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
146
152
  },
147
153
  action: function action(insert, state) {
148
154
  var tr = insert((0, _actions.createMultiColumnLayoutSection)(state, 3));
149
- withInsertLayoutAnalytics(tr);
155
+ if ((0, _platformFeatureFlags.fg)('platform_editor_column_count_analytics')) {
156
+ withInsertLayoutAnalytics(tr, 3);
157
+ } else {
158
+ withInsertLayoutAnalytics(tr);
159
+ }
150
160
  selectIntoLayoutSection(tr);
151
161
  return tr;
152
162
  }
@@ -165,7 +175,11 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
165
175
  },
166
176
  action: function action(insert, state) {
167
177
  var tr = insert((0, _actions.createMultiColumnLayoutSection)(state, 2));
168
- withInsertLayoutAnalytics(tr);
178
+ if ((0, _platformFeatureFlags.fg)('platform_editor_column_count_analytics')) {
179
+ withInsertLayoutAnalytics(tr, 2);
180
+ } else {
181
+ withInsertLayoutAnalytics(tr);
182
+ }
169
183
  selectIntoLayoutSection(tr);
170
184
  return tr;
171
185
  }
@@ -182,7 +196,11 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
182
196
  },
183
197
  action: function action(insert, state) {
184
198
  var tr = insert((0, _actions.createMultiColumnLayoutSection)(state, 3));
185
- withInsertLayoutAnalytics(tr);
199
+ if ((0, _platformFeatureFlags.fg)('platform_editor_column_count_analytics')) {
200
+ withInsertLayoutAnalytics(tr, 3);
201
+ } else {
202
+ withInsertLayoutAnalytics(tr);
203
+ }
186
204
  selectIntoLayoutSection(tr);
187
205
  return tr;
188
206
  }
@@ -199,7 +217,11 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
199
217
  },
200
218
  action: function action(insert, state) {
201
219
  var tr = insert((0, _actions.createMultiColumnLayoutSection)(state, 4));
202
- withInsertLayoutAnalytics(tr);
220
+ if ((0, _platformFeatureFlags.fg)('platform_editor_column_count_analytics')) {
221
+ withInsertLayoutAnalytics(tr, 4);
222
+ } else {
223
+ withInsertLayoutAnalytics(tr);
224
+ }
203
225
  selectIntoLayoutSection(tr);
204
226
  return tr;
205
227
  }
@@ -216,7 +238,11 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
216
238
  },
217
239
  action: function action(insert, state) {
218
240
  var tr = insert((0, _actions.createMultiColumnLayoutSection)(state, 5));
219
- withInsertLayoutAnalytics(tr);
241
+ if ((0, _platformFeatureFlags.fg)('platform_editor_column_count_analytics')) {
242
+ withInsertLayoutAnalytics(tr, 5);
243
+ } else {
244
+ withInsertLayoutAnalytics(tr);
245
+ }
220
246
  selectIntoLayoutSection(tr);
221
247
  return tr;
222
248
  }
@@ -14,6 +14,7 @@ var _utils = require("@atlaskit/editor-common/utils");
14
14
  var _model = require("@atlaskit/editor-prosemirror/model");
15
15
  var _state = require("@atlaskit/editor-prosemirror/state");
16
16
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
17
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
18
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
18
19
  var _consts = require("./consts");
19
20
  var _pluginKey = require("./plugin-key");
@@ -179,7 +180,8 @@ var insertLayoutColumnsWithAnalytics = exports.insertLayoutColumnsWithAnalytics
179
180
  actionSubject: _analytics.ACTION_SUBJECT.DOCUMENT,
180
181
  actionSubjectId: _analytics.ACTION_SUBJECT_ID.LAYOUT,
181
182
  attributes: {
182
- inputMethod: inputMethod
183
+ inputMethod: inputMethod,
184
+ columnCount: (0, _platformFeatureFlags.fg)('platform_editor_column_count_analytics') ? 2 : undefined
183
185
  },
184
186
  eventType: _analytics.EVENT_TYPE.TRACK
185
187
  })(function (state, dispatch) {
@@ -209,7 +211,8 @@ function removeLastColumnInLayout(column, columnPos, insideRightEdgePos) {
209
211
  // check if the column only contains a paragraph with a placeholder text
210
212
  // if so, remove the whole column, otherwise just remove the paragraph
211
213
  if ((0, _utils.isEmptyDocument)(column)) {
212
- tr.replaceRange(tr.mapping.map(columnPos - 1), tr.mapping.map(insideRightEdgePos), _model.Slice.empty);
214
+ var fromPos = (0, _platformFeatureFlags.fg)('platform_editor_convert_multiple_columns_to_single') ? columnPos : columnPos - 1;
215
+ tr.replaceRange(tr.mapping.map(fromPos), tr.mapping.map(insideRightEdgePos), _model.Slice.empty);
213
216
  } else {
214
217
  tr.replaceRange(tr.mapping.map(columnPos - 1), tr.mapping.map(columnPos + 1), _model.Slice.empty);
215
218
  }
@@ -6,6 +6,7 @@ import { layoutMessages, toolbarInsertBlockMessages as messages } from '@atlaski
6
6
  import { IconFiveColumnLayout, IconFourColumnLayout, IconLayout, IconOneColumnLayout, IconThreeColumnLayout, IconTwoColumnLayout } from '@atlaskit/editor-common/quick-insert';
7
7
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
8
8
  import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
9
10
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
11
  import { createDefaultLayoutSection, createMultiColumnLayoutSection, insertLayoutColumnsWithAnalytics } from './pm-plugins/actions';
11
12
  import { default as createLayoutPlugin } from './pm-plugins/main';
@@ -94,14 +95,15 @@ export const layoutPlugin = ({
94
95
  quickInsert: ({
95
96
  formatMessage
96
97
  }) => {
97
- const withInsertLayoutAnalytics = tr => {
98
+ const withInsertLayoutAnalytics = (tr, columnCount) => {
98
99
  var _api$analytics2, _api$analytics2$actio;
99
100
  api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : (_api$analytics2$actio = _api$analytics2.actions) === null || _api$analytics2$actio === void 0 ? void 0 : _api$analytics2$actio.attachAnalyticsEvent({
100
101
  action: ACTION.INSERTED,
101
102
  actionSubject: ACTION_SUBJECT.DOCUMENT,
102
103
  actionSubjectId: ACTION_SUBJECT_ID.LAYOUT,
103
104
  attributes: {
104
- inputMethod: INPUT_METHOD.QUICK_INSERT
105
+ inputMethod: INPUT_METHOD.QUICK_INSERT,
106
+ columnCount
105
107
  },
106
108
  eventType: EVENT_TYPE.TRACK
107
109
  })(tr);
@@ -116,7 +118,11 @@ export const layoutPlugin = ({
116
118
  icon: () => /*#__PURE__*/React.createElement(IconOneColumnLayout, null),
117
119
  action(insert, state, _source) {
118
120
  const tr = insert(createMultiColumnLayoutSection(state, 1));
119
- withInsertLayoutAnalytics(tr);
121
+ if (fg('platform_editor_column_count_analytics')) {
122
+ withInsertLayoutAnalytics(tr, 1);
123
+ } else {
124
+ withInsertLayoutAnalytics(tr);
125
+ }
120
126
  selectIntoLayoutSection(tr);
121
127
  return tr;
122
128
  }
@@ -134,7 +140,11 @@ export const layoutPlugin = ({
134
140
  icon: () => /*#__PURE__*/React.createElement(IconThreeColumnLayout, null),
135
141
  action(insert, state) {
136
142
  const tr = insert(createMultiColumnLayoutSection(state, 3));
137
- withInsertLayoutAnalytics(tr);
143
+ if (fg('platform_editor_column_count_analytics')) {
144
+ withInsertLayoutAnalytics(tr, 3);
145
+ } else {
146
+ withInsertLayoutAnalytics(tr);
147
+ }
138
148
  selectIntoLayoutSection(tr);
139
149
  return tr;
140
150
  }
@@ -151,7 +161,11 @@ export const layoutPlugin = ({
151
161
  icon: () => /*#__PURE__*/React.createElement(IconTwoColumnLayout, null),
152
162
  action(insert, state) {
153
163
  const tr = insert(createMultiColumnLayoutSection(state, 2));
154
- withInsertLayoutAnalytics(tr);
164
+ if (fg('platform_editor_column_count_analytics')) {
165
+ withInsertLayoutAnalytics(tr, 2);
166
+ } else {
167
+ withInsertLayoutAnalytics(tr);
168
+ }
155
169
  selectIntoLayoutSection(tr);
156
170
  return tr;
157
171
  }
@@ -166,7 +180,11 @@ export const layoutPlugin = ({
166
180
  icon: () => /*#__PURE__*/React.createElement(IconThreeColumnLayout, null),
167
181
  action(insert, state) {
168
182
  const tr = insert(createMultiColumnLayoutSection(state, 3));
169
- withInsertLayoutAnalytics(tr);
183
+ if (fg('platform_editor_column_count_analytics')) {
184
+ withInsertLayoutAnalytics(tr, 3);
185
+ } else {
186
+ withInsertLayoutAnalytics(tr);
187
+ }
170
188
  selectIntoLayoutSection(tr);
171
189
  return tr;
172
190
  }
@@ -181,7 +199,11 @@ export const layoutPlugin = ({
181
199
  icon: () => /*#__PURE__*/React.createElement(IconFourColumnLayout, null),
182
200
  action(insert, state) {
183
201
  const tr = insert(createMultiColumnLayoutSection(state, 4));
184
- withInsertLayoutAnalytics(tr);
202
+ if (fg('platform_editor_column_count_analytics')) {
203
+ withInsertLayoutAnalytics(tr, 4);
204
+ } else {
205
+ withInsertLayoutAnalytics(tr);
206
+ }
185
207
  selectIntoLayoutSection(tr);
186
208
  return tr;
187
209
  }
@@ -196,7 +218,11 @@ export const layoutPlugin = ({
196
218
  icon: () => /*#__PURE__*/React.createElement(IconFiveColumnLayout, null),
197
219
  action(insert, state) {
198
220
  const tr = insert(createMultiColumnLayoutSection(state, 5));
199
- withInsertLayoutAnalytics(tr);
221
+ if (fg('platform_editor_column_count_analytics')) {
222
+ withInsertLayoutAnalytics(tr, 5);
223
+ } else {
224
+ withInsertLayoutAnalytics(tr);
225
+ }
200
226
  selectIntoLayoutSection(tr);
201
227
  return tr;
202
228
  }
@@ -4,6 +4,7 @@ import { flatmap, getStepRange, isEmptyDocument, mapChildren } from '@atlaskit/e
4
4
  import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
5
5
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
6
6
  import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
8
9
  import { EVEN_DISTRIBUTED_COL_WIDTHS } from './consts';
9
10
  import { pluginKey } from './plugin-key';
@@ -160,7 +161,8 @@ export const insertLayoutColumnsWithAnalytics = editorAnalyticsAPI => inputMetho
160
161
  actionSubject: ACTION_SUBJECT.DOCUMENT,
161
162
  actionSubjectId: ACTION_SUBJECT_ID.LAYOUT,
162
163
  attributes: {
163
- inputMethod
164
+ inputMethod,
165
+ columnCount: fg('platform_editor_column_count_analytics') ? 2 : undefined
164
166
  },
165
167
  eventType: EVENT_TYPE.TRACK
166
168
  })((state, dispatch) => {
@@ -188,7 +190,8 @@ function removeLastColumnInLayout(column, columnPos, insideRightEdgePos) {
188
190
  // check if the column only contains a paragraph with a placeholder text
189
191
  // if so, remove the whole column, otherwise just remove the paragraph
190
192
  if (isEmptyDocument(column)) {
191
- tr.replaceRange(tr.mapping.map(columnPos - 1), tr.mapping.map(insideRightEdgePos), Slice.empty);
193
+ const fromPos = fg('platform_editor_convert_multiple_columns_to_single') ? columnPos : columnPos - 1;
194
+ tr.replaceRange(tr.mapping.map(fromPos), tr.mapping.map(insideRightEdgePos), Slice.empty);
192
195
  } else {
193
196
  tr.replaceRange(tr.mapping.map(columnPos - 1), tr.mapping.map(columnPos + 1), Slice.empty);
194
197
  }
@@ -6,6 +6,7 @@ import { layoutMessages, toolbarInsertBlockMessages as messages } from '@atlaski
6
6
  import { IconFiveColumnLayout, IconFourColumnLayout, IconLayout, IconOneColumnLayout, IconThreeColumnLayout, IconTwoColumnLayout } from '@atlaskit/editor-common/quick-insert';
7
7
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
8
8
  import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
9
10
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
11
  import { createDefaultLayoutSection, createMultiColumnLayoutSection, insertLayoutColumnsWithAnalytics } from './pm-plugins/actions';
11
12
  import { default as createLayoutPlugin } from './pm-plugins/main';
@@ -96,14 +97,15 @@ export var layoutPlugin = function layoutPlugin(_ref) {
96
97
  },
97
98
  quickInsert: function quickInsert(_ref4) {
98
99
  var formatMessage = _ref4.formatMessage;
99
- var withInsertLayoutAnalytics = function withInsertLayoutAnalytics(tr) {
100
+ var withInsertLayoutAnalytics = function withInsertLayoutAnalytics(tr, columnCount) {
100
101
  var _api$analytics2;
101
102
  api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || (_api$analytics2 = _api$analytics2.actions) === null || _api$analytics2 === void 0 || _api$analytics2.attachAnalyticsEvent({
102
103
  action: ACTION.INSERTED,
103
104
  actionSubject: ACTION_SUBJECT.DOCUMENT,
104
105
  actionSubjectId: ACTION_SUBJECT_ID.LAYOUT,
105
106
  attributes: {
106
- inputMethod: INPUT_METHOD.QUICK_INSERT
107
+ inputMethod: INPUT_METHOD.QUICK_INSERT,
108
+ columnCount: columnCount
107
109
  },
108
110
  eventType: EVENT_TYPE.TRACK
109
111
  })(tr);
@@ -120,7 +122,11 @@ export var layoutPlugin = function layoutPlugin(_ref) {
120
122
  },
121
123
  action: function action(insert, state, _source) {
122
124
  var tr = insert(createMultiColumnLayoutSection(state, 1));
123
- withInsertLayoutAnalytics(tr);
125
+ if (fg('platform_editor_column_count_analytics')) {
126
+ withInsertLayoutAnalytics(tr, 1);
127
+ } else {
128
+ withInsertLayoutAnalytics(tr);
129
+ }
124
130
  selectIntoLayoutSection(tr);
125
131
  return tr;
126
132
  }
@@ -140,7 +146,11 @@ export var layoutPlugin = function layoutPlugin(_ref) {
140
146
  },
141
147
  action: function action(insert, state) {
142
148
  var tr = insert(createMultiColumnLayoutSection(state, 3));
143
- withInsertLayoutAnalytics(tr);
149
+ if (fg('platform_editor_column_count_analytics')) {
150
+ withInsertLayoutAnalytics(tr, 3);
151
+ } else {
152
+ withInsertLayoutAnalytics(tr);
153
+ }
144
154
  selectIntoLayoutSection(tr);
145
155
  return tr;
146
156
  }
@@ -159,7 +169,11 @@ export var layoutPlugin = function layoutPlugin(_ref) {
159
169
  },
160
170
  action: function action(insert, state) {
161
171
  var tr = insert(createMultiColumnLayoutSection(state, 2));
162
- withInsertLayoutAnalytics(tr);
172
+ if (fg('platform_editor_column_count_analytics')) {
173
+ withInsertLayoutAnalytics(tr, 2);
174
+ } else {
175
+ withInsertLayoutAnalytics(tr);
176
+ }
163
177
  selectIntoLayoutSection(tr);
164
178
  return tr;
165
179
  }
@@ -176,7 +190,11 @@ export var layoutPlugin = function layoutPlugin(_ref) {
176
190
  },
177
191
  action: function action(insert, state) {
178
192
  var tr = insert(createMultiColumnLayoutSection(state, 3));
179
- withInsertLayoutAnalytics(tr);
193
+ if (fg('platform_editor_column_count_analytics')) {
194
+ withInsertLayoutAnalytics(tr, 3);
195
+ } else {
196
+ withInsertLayoutAnalytics(tr);
197
+ }
180
198
  selectIntoLayoutSection(tr);
181
199
  return tr;
182
200
  }
@@ -193,7 +211,11 @@ export var layoutPlugin = function layoutPlugin(_ref) {
193
211
  },
194
212
  action: function action(insert, state) {
195
213
  var tr = insert(createMultiColumnLayoutSection(state, 4));
196
- withInsertLayoutAnalytics(tr);
214
+ if (fg('platform_editor_column_count_analytics')) {
215
+ withInsertLayoutAnalytics(tr, 4);
216
+ } else {
217
+ withInsertLayoutAnalytics(tr);
218
+ }
197
219
  selectIntoLayoutSection(tr);
198
220
  return tr;
199
221
  }
@@ -210,7 +232,11 @@ export var layoutPlugin = function layoutPlugin(_ref) {
210
232
  },
211
233
  action: function action(insert, state) {
212
234
  var tr = insert(createMultiColumnLayoutSection(state, 5));
213
- withInsertLayoutAnalytics(tr);
235
+ if (fg('platform_editor_column_count_analytics')) {
236
+ withInsertLayoutAnalytics(tr, 5);
237
+ } else {
238
+ withInsertLayoutAnalytics(tr);
239
+ }
214
240
  selectIntoLayoutSection(tr);
215
241
  return tr;
216
242
  }
@@ -7,6 +7,7 @@ import { flatmap, getStepRange, isEmptyDocument, mapChildren } from '@atlaskit/e
7
7
  import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
8
8
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
9
9
  import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
11
12
  import { EVEN_DISTRIBUTED_COL_WIDTHS } from './consts';
12
13
  import { pluginKey } from './plugin-key';
@@ -170,7 +171,8 @@ export var insertLayoutColumnsWithAnalytics = function insertLayoutColumnsWithAn
170
171
  actionSubject: ACTION_SUBJECT.DOCUMENT,
171
172
  actionSubjectId: ACTION_SUBJECT_ID.LAYOUT,
172
173
  attributes: {
173
- inputMethod: inputMethod
174
+ inputMethod: inputMethod,
175
+ columnCount: fg('platform_editor_column_count_analytics') ? 2 : undefined
174
176
  },
175
177
  eventType: EVENT_TYPE.TRACK
176
178
  })(function (state, dispatch) {
@@ -200,7 +202,8 @@ function removeLastColumnInLayout(column, columnPos, insideRightEdgePos) {
200
202
  // check if the column only contains a paragraph with a placeholder text
201
203
  // if so, remove the whole column, otherwise just remove the paragraph
202
204
  if (isEmptyDocument(column)) {
203
- tr.replaceRange(tr.mapping.map(columnPos - 1), tr.mapping.map(insideRightEdgePos), Slice.empty);
205
+ var fromPos = fg('platform_editor_convert_multiple_columns_to_single') ? columnPos : columnPos - 1;
206
+ tr.replaceRange(tr.mapping.map(fromPos), tr.mapping.map(insideRightEdgePos), Slice.empty);
204
207
  } else {
205
208
  tr.replaceRange(tr.mapping.map(columnPos - 1), tr.mapping.map(columnPos + 1), Slice.empty);
206
209
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-layout",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "Layout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@atlaskit/adf-schema": "^47.6.0",
37
- "@atlaskit/editor-common": "^103.12.0",
37
+ "@atlaskit/editor-common": "^103.20.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
39
39
  "@atlaskit/editor-plugin-decorations": "^2.0.0",
40
40
  "@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/editor-shared-styles": "^3.4.0",
46
46
  "@atlaskit/icon": "^25.6.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
- "@atlaskit/tmp-editor-statsig": "^4.12.0",
48
+ "@atlaskit/tmp-editor-statsig": "^4.15.0",
49
49
  "@atlaskit/tokens": "^4.8.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1"
@@ -101,6 +101,12 @@
101
101
  "platform-feature-flags": {
102
102
  "platform-visual-refresh-icons": {
103
103
  "type": "boolean"
104
+ },
105
+ "platform_editor_convert_multiple_columns_to_single": {
106
+ "type": "boolean"
107
+ },
108
+ "platform_editor_column_count_analytics": {
109
+ "type": "boolean"
104
110
  }
105
111
  }
106
112
  }