@atlaskit/editor-plugin-layout 13.3.21 → 13.3.23
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,33 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-layout
|
|
2
2
|
|
|
3
|
+
## 13.3.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 13.3.22
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`b90bdc71cdf99`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b90bdc71cdf99) -
|
|
14
|
+
Fix layout column delete shortcut deleting the whole column when the caret is a text selection
|
|
15
|
+
inside a column (e.g. a table nested in a layout), gated behind
|
|
16
|
+
platform_editor_layout_column_delete_shortcut_fix.
|
|
17
|
+
|
|
18
|
+
Adds a new experiment key `platform_editor_layout_column_delete_shortcut_fix` to
|
|
19
|
+
`@atlaskit/tmp-editor-statsig`. Usage:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
23
|
+
|
|
24
|
+
if (expValEquals('platform_editor_layout_column_delete_shortcut_fix', 'isEnabled', true)) {
|
|
25
|
+
// new behaviour: preserve the column when the caret is a text selection inside it
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- Updated dependencies
|
|
30
|
+
|
|
3
31
|
## 13.3.21
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
|
@@ -910,7 +910,11 @@ var deleteLayoutColumn = exports.deleteLayoutColumn = function deleteLayoutColum
|
|
|
910
910
|
if (!(0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true)) {
|
|
911
911
|
return null;
|
|
912
912
|
}
|
|
913
|
-
|
|
913
|
+
|
|
914
|
+
// Only delete columns that are explicitly selected (a column NodeSelection or a selection
|
|
915
|
+
// fully containing columns). This stops a bare caret inside a column — including inside
|
|
916
|
+
// nested content such as a table — from deleting the whole column via the delete shortcut.
|
|
917
|
+
var selectedLayoutColumnsResult = (0, _expValEquals.expValEquals)('platform_editor_layout_column_delete_shortcut_fix', 'isEnabled', true) ? (0, _layoutColumnSelection.getSelectedLayoutColumnsFromSelection)(tr.selection) : (0, _layoutColumnSelection.getLayoutColumnsFromContentSelection)(tr.selection);
|
|
914
918
|
if (!selectedLayoutColumnsResult || selectedLayoutColumnsResult.selectedLayoutColumns.length === 0) {
|
|
915
919
|
return null;
|
|
916
920
|
}
|
|
@@ -874,7 +874,11 @@ export const deleteLayoutColumn = ({
|
|
|
874
874
|
if (!expValEquals('platform_editor_layout_column_menu', 'isEnabled', true)) {
|
|
875
875
|
return null;
|
|
876
876
|
}
|
|
877
|
-
|
|
877
|
+
|
|
878
|
+
// Only delete columns that are explicitly selected (a column NodeSelection or a selection
|
|
879
|
+
// fully containing columns). This stops a bare caret inside a column — including inside
|
|
880
|
+
// nested content such as a table — from deleting the whole column via the delete shortcut.
|
|
881
|
+
const selectedLayoutColumnsResult = expValEquals('platform_editor_layout_column_delete_shortcut_fix', 'isEnabled', true) ? getSelectedLayoutColumnsFromSelection(tr.selection) : getLayoutColumnsFromContentSelection(tr.selection);
|
|
878
882
|
if (!selectedLayoutColumnsResult || selectedLayoutColumnsResult.selectedLayoutColumns.length === 0) {
|
|
879
883
|
return null;
|
|
880
884
|
}
|
|
@@ -900,7 +900,11 @@ export var deleteLayoutColumn = function deleteLayoutColumn() {
|
|
|
900
900
|
if (!expValEquals('platform_editor_layout_column_menu', 'isEnabled', true)) {
|
|
901
901
|
return null;
|
|
902
902
|
}
|
|
903
|
-
|
|
903
|
+
|
|
904
|
+
// Only delete columns that are explicitly selected (a column NodeSelection or a selection
|
|
905
|
+
// fully containing columns). This stops a bare caret inside a column — including inside
|
|
906
|
+
// nested content such as a table — from deleting the whole column via the delete shortcut.
|
|
907
|
+
var selectedLayoutColumnsResult = expValEquals('platform_editor_layout_column_delete_shortcut_fix', 'isEnabled', true) ? getSelectedLayoutColumnsFromSelection(tr.selection) : getLayoutColumnsFromContentSelection(tr.selection);
|
|
904
908
|
if (!selectedLayoutColumnsResult || selectedLayoutColumnsResult.selectedLayoutColumns.length === 0) {
|
|
905
909
|
return null;
|
|
906
910
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-layout",
|
|
3
|
-
"version": "13.3.
|
|
3
|
+
"version": "13.3.23",
|
|
4
4
|
"description": "Layout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,23 +33,23 @@
|
|
|
33
33
|
"@atlaskit/editor-plugin-selection": "^12.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-toolbar": "^9.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-ui-control-registry": "^6.0.0",
|
|
36
|
-
"@atlaskit/editor-plugin-user-intent": "^10.
|
|
36
|
+
"@atlaskit/editor-plugin-user-intent": "^10.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-width": "^13.0.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
39
39
|
"@atlaskit/editor-shared-styles": "^4.0.0",
|
|
40
40
|
"@atlaskit/editor-toolbar": "^2.3.0",
|
|
41
41
|
"@atlaskit/editor-ui-control-model": "^2.2.0",
|
|
42
|
-
"@atlaskit/icon": "^37.
|
|
42
|
+
"@atlaskit/icon": "^37.2.0",
|
|
43
43
|
"@atlaskit/icon-lab": "^7.4.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^134.0.0",
|
|
46
46
|
"@atlaskit/tokens": "^16.3.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"@emotion/react": "^11.7.1",
|
|
49
49
|
"bind-event-listener": "^3.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@atlaskit/editor-common": "^116.
|
|
52
|
+
"@atlaskit/editor-common": "^116.40.0",
|
|
53
53
|
"react": "^18.2.0",
|
|
54
54
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
55
55
|
},
|