@atlaskit/editor-plugin-annotation 27.0.5 → 27.0.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-annotation
|
|
2
2
|
|
|
3
|
+
## 27.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`38bcbb3966a67`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/38bcbb3966a67) -
|
|
8
|
+
Prevent Remix Edit from opening inline comments when it collapses the chart selection. Explicit
|
|
9
|
+
comment actions remain supported with cc_maui_annotations_on_extensions enabled; rollback behavior
|
|
10
|
+
is unchanged.
|
|
11
|
+
|
|
3
12
|
## 27.0.5
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -146,10 +146,13 @@ var getAnnotationViewKey = exports.getAnnotationViewKey = function getAnnotation
|
|
|
146
146
|
}).join('_');
|
|
147
147
|
return "view-annotation-wrapper_".concat(keys);
|
|
148
148
|
};
|
|
149
|
+
var isRemixExtension = function isRemixExtension(node) {
|
|
150
|
+
return node.type.name === 'extension' && node.attrs.extensionKey === 'native-embed:maui';
|
|
151
|
+
};
|
|
149
152
|
|
|
150
153
|
// During rollback, hide chart highlights and automatic comment opening, not saved marks.
|
|
151
154
|
var shouldHideRemixAnnotation = exports.shouldHideRemixAnnotation = function shouldHideRemixAnnotation(node) {
|
|
152
|
-
return node
|
|
155
|
+
return isRemixExtension(node) && !(0, _fg.fg)('cc_maui_annotations_on_extensions');
|
|
153
156
|
};
|
|
154
157
|
var findAnnotationsInSelection = exports.findAnnotationsInSelection = function findAnnotationsInSelection(selection, doc) {
|
|
155
158
|
var empty = selection.empty,
|
|
@@ -181,12 +184,14 @@ var findAnnotationsInSelection = exports.findAnnotationsInSelection = function f
|
|
|
181
184
|
return [];
|
|
182
185
|
}
|
|
183
186
|
var annotationMark = doc.type.schema.marks.annotation;
|
|
184
|
-
|
|
187
|
+
// Opening Remix Edit moves the selection beside the chart. Only explicit comment
|
|
188
|
+
// actions should open its threads; a nearby caret must not select its annotations.
|
|
189
|
+
var anchorAnnotationMarks = node && !isRemixExtension(node) ? node.marks : [];
|
|
185
190
|
var marks = [];
|
|
186
191
|
if (annotationMark.isInSet(anchorAnnotationMarks)) {
|
|
187
192
|
marks = anchorAnnotationMarks;
|
|
188
193
|
}
|
|
189
|
-
if (nodeBefore && !
|
|
194
|
+
if (nodeBefore && !isRemixExtension(nodeBefore) && annotationMark.isInSet(nodeBefore.marks)) {
|
|
190
195
|
var _marks;
|
|
191
196
|
var existingMarkIds = marks.map(function (m) {
|
|
192
197
|
return m.attrs.id;
|
|
@@ -114,9 +114,10 @@ export const getAnnotationViewKey = annotations => {
|
|
|
114
114
|
const keys = annotations.map(mark => mark.id).join('_');
|
|
115
115
|
return `view-annotation-wrapper_${keys}`;
|
|
116
116
|
};
|
|
117
|
+
const isRemixExtension = node => node.type.name === 'extension' && node.attrs.extensionKey === 'native-embed:maui';
|
|
117
118
|
|
|
118
119
|
// During rollback, hide chart highlights and automatic comment opening, not saved marks.
|
|
119
|
-
export const shouldHideRemixAnnotation = node => node
|
|
120
|
+
export const shouldHideRemixAnnotation = node => isRemixExtension(node) && !fg('cc_maui_annotations_on_extensions');
|
|
120
121
|
export const findAnnotationsInSelection = (selection, doc) => {
|
|
121
122
|
const {
|
|
122
123
|
empty,
|
|
@@ -147,12 +148,14 @@ export const findAnnotationsInSelection = (selection, doc) => {
|
|
|
147
148
|
return [];
|
|
148
149
|
}
|
|
149
150
|
const annotationMark = doc.type.schema.marks.annotation;
|
|
150
|
-
|
|
151
|
+
// Opening Remix Edit moves the selection beside the chart. Only explicit comment
|
|
152
|
+
// actions should open its threads; a nearby caret must not select its annotations.
|
|
153
|
+
const anchorAnnotationMarks = node && !isRemixExtension(node) ? node.marks : [];
|
|
151
154
|
let marks = [];
|
|
152
155
|
if (annotationMark.isInSet(anchorAnnotationMarks)) {
|
|
153
156
|
marks = anchorAnnotationMarks;
|
|
154
157
|
}
|
|
155
|
-
if (nodeBefore && !
|
|
158
|
+
if (nodeBefore && !isRemixExtension(nodeBefore) && annotationMark.isInSet(nodeBefore.marks)) {
|
|
156
159
|
const existingMarkIds = marks.map(m => m.attrs.id);
|
|
157
160
|
marks = marks.concat(...nodeBefore.marks.filter(m => !existingMarkIds.includes(m.attrs.id)));
|
|
158
161
|
}
|
|
@@ -129,10 +129,13 @@ export var getAnnotationViewKey = function getAnnotationViewKey(annotations) {
|
|
|
129
129
|
}).join('_');
|
|
130
130
|
return "view-annotation-wrapper_".concat(keys);
|
|
131
131
|
};
|
|
132
|
+
var isRemixExtension = function isRemixExtension(node) {
|
|
133
|
+
return node.type.name === 'extension' && node.attrs.extensionKey === 'native-embed:maui';
|
|
134
|
+
};
|
|
132
135
|
|
|
133
136
|
// During rollback, hide chart highlights and automatic comment opening, not saved marks.
|
|
134
137
|
export var shouldHideRemixAnnotation = function shouldHideRemixAnnotation(node) {
|
|
135
|
-
return node
|
|
138
|
+
return isRemixExtension(node) && !fg('cc_maui_annotations_on_extensions');
|
|
136
139
|
};
|
|
137
140
|
export var findAnnotationsInSelection = function findAnnotationsInSelection(selection, doc) {
|
|
138
141
|
var empty = selection.empty,
|
|
@@ -164,12 +167,14 @@ export var findAnnotationsInSelection = function findAnnotationsInSelection(sele
|
|
|
164
167
|
return [];
|
|
165
168
|
}
|
|
166
169
|
var annotationMark = doc.type.schema.marks.annotation;
|
|
167
|
-
|
|
170
|
+
// Opening Remix Edit moves the selection beside the chart. Only explicit comment
|
|
171
|
+
// actions should open its threads; a nearby caret must not select its annotations.
|
|
172
|
+
var anchorAnnotationMarks = node && !isRemixExtension(node) ? node.marks : [];
|
|
168
173
|
var marks = [];
|
|
169
174
|
if (annotationMark.isInSet(anchorAnnotationMarks)) {
|
|
170
175
|
marks = anchorAnnotationMarks;
|
|
171
176
|
}
|
|
172
|
-
if (nodeBefore && !
|
|
177
|
+
if (nodeBefore && !isRemixExtension(nodeBefore) && annotationMark.isInSet(nodeBefore.marks)) {
|
|
173
178
|
var _marks;
|
|
174
179
|
var existingMarkIds = marks.map(function (m) {
|
|
175
180
|
return m.attrs.id;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-annotation",
|
|
3
|
-
"version": "27.0.
|
|
3
|
+
"version": "27.0.6",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@babel/runtime": "^7.0.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@atlaskit/editor-common": "^131.
|
|
38
|
+
"@atlaskit/editor-common": "^131.4.0",
|
|
39
39
|
"react": "^18.2.0 || ^19.2.0",
|
|
40
40
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
41
41
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|