@atlaskit/editor-plugin-annotation 1.7.0 → 1.7.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,28 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 1.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#98086](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98086)
|
|
8
|
+
[`c0151fc09063`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c0151fc09063) -
|
|
9
|
+
[ux] Disabled the scroll into view effect which occurs when an annotation is resolved, due to an
|
|
10
|
+
issue which occurs when a collab user resolves a comment. There's currently (due to how
|
|
11
|
+
annotations are built) no way to detect if the resolve action can from a remote or local user.
|
|
12
|
+
So this is a quick fix to unblock live pages from scrolling when a collab users resolves a
|
|
13
|
+
comment.
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 1.7.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [#97698](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97698)
|
|
21
|
+
[`1c7b378c0d3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c7b378c0d3b) -
|
|
22
|
+
[HOT-108999] We had an incident where the cursor jumps back a character in table headers for any
|
|
23
|
+
language triggering composition on an empty line.This was fixed in a patch bump of
|
|
24
|
+
prosemirror-view. https://github.com/ProseMirror/prosemirror-view/compare/1.33.4...1.33.5
|
|
25
|
+
|
|
3
26
|
## 1.7.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -23,10 +23,22 @@ var updateInlineCommentResolvedState = exports.updateInlineCommentResolvedState
|
|
|
23
23
|
var allResolved = Object.values(partialNewState).every(function (state) {
|
|
24
24
|
return state;
|
|
25
25
|
});
|
|
26
|
+
|
|
27
|
+
// FIXME: https://product-fabric.atlassian.net/browse/EDF-716 -- This is nuking the scroll into view which occurs
|
|
28
|
+
// when a comment is resolved. The problem is this is called when either a collab user or the current user resolves a comment.
|
|
29
|
+
// and the problem is since cc is just dispatching an event through the provider to resolve the comment and this
|
|
30
|
+
// is not comming via NCS, we have not way to know if this is a local or remote transaction.
|
|
31
|
+
// To quickly fix this problem to unblock live pages this will just stop the transaction causing a scroll when the
|
|
32
|
+
// resolve method is set.
|
|
33
|
+
var transformer = function transformer(tr, state) {
|
|
34
|
+
return resolveMethod === _analytics.RESOLVE_METHOD.CONSUMER ? tr.setMeta('scrollIntoView', false) : tr;
|
|
35
|
+
};
|
|
26
36
|
if (resolveMethod && allResolved) {
|
|
27
|
-
return (0, _pluginFactory.createCommand)(command,
|
|
37
|
+
return (0, _pluginFactory.createCommand)(command, function (tr, state) {
|
|
38
|
+
return transformer(_transform.default.addResolveAnalytics(editorAnalyticsAPI)(resolveMethod)(tr, state), state);
|
|
39
|
+
});
|
|
28
40
|
}
|
|
29
|
-
return (0, _pluginFactory.createCommand)(command);
|
|
41
|
+
return (0, _pluginFactory.createCommand)(command, transformer);
|
|
30
42
|
};
|
|
31
43
|
};
|
|
32
44
|
var closeComponent = exports.closeComponent = function closeComponent() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { INPUT_METHOD, RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { createCommand } from '../pm-plugins/plugin-factory';
|
|
5
5
|
import { ACTIONS } from '../pm-plugins/types';
|
|
@@ -12,10 +12,18 @@ export const updateInlineCommentResolvedState = editorAnalyticsAPI => (partialNe
|
|
|
12
12
|
data: partialNewState
|
|
13
13
|
};
|
|
14
14
|
const allResolved = Object.values(partialNewState).every(state => state);
|
|
15
|
+
|
|
16
|
+
// FIXME: https://product-fabric.atlassian.net/browse/EDF-716 -- This is nuking the scroll into view which occurs
|
|
17
|
+
// when a comment is resolved. The problem is this is called when either a collab user or the current user resolves a comment.
|
|
18
|
+
// and the problem is since cc is just dispatching an event through the provider to resolve the comment and this
|
|
19
|
+
// is not comming via NCS, we have not way to know if this is a local or remote transaction.
|
|
20
|
+
// To quickly fix this problem to unblock live pages this will just stop the transaction causing a scroll when the
|
|
21
|
+
// resolve method is set.
|
|
22
|
+
const transformer = (tr, state) => resolveMethod === RESOLVE_METHOD.CONSUMER ? tr.setMeta('scrollIntoView', false) : tr;
|
|
15
23
|
if (resolveMethod && allResolved) {
|
|
16
|
-
return createCommand(command, transform.addResolveAnalytics(editorAnalyticsAPI)(resolveMethod));
|
|
24
|
+
return createCommand(command, (tr, state) => transformer(transform.addResolveAnalytics(editorAnalyticsAPI)(resolveMethod)(tr, state), state));
|
|
17
25
|
}
|
|
18
|
-
return createCommand(command);
|
|
26
|
+
return createCommand(command, transformer);
|
|
19
27
|
};
|
|
20
28
|
export const closeComponent = () => createCommand({
|
|
21
29
|
type: ACTIONS.CLOSE_COMPONENT
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import { INPUT_METHOD, RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { createCommand } from '../pm-plugins/plugin-factory';
|
|
6
6
|
import { ACTIONS } from '../pm-plugins/types';
|
|
@@ -16,10 +16,22 @@ export var updateInlineCommentResolvedState = function updateInlineCommentResolv
|
|
|
16
16
|
var allResolved = Object.values(partialNewState).every(function (state) {
|
|
17
17
|
return state;
|
|
18
18
|
});
|
|
19
|
+
|
|
20
|
+
// FIXME: https://product-fabric.atlassian.net/browse/EDF-716 -- This is nuking the scroll into view which occurs
|
|
21
|
+
// when a comment is resolved. The problem is this is called when either a collab user or the current user resolves a comment.
|
|
22
|
+
// and the problem is since cc is just dispatching an event through the provider to resolve the comment and this
|
|
23
|
+
// is not comming via NCS, we have not way to know if this is a local or remote transaction.
|
|
24
|
+
// To quickly fix this problem to unblock live pages this will just stop the transaction causing a scroll when the
|
|
25
|
+
// resolve method is set.
|
|
26
|
+
var transformer = function transformer(tr, state) {
|
|
27
|
+
return resolveMethod === RESOLVE_METHOD.CONSUMER ? tr.setMeta('scrollIntoView', false) : tr;
|
|
28
|
+
};
|
|
19
29
|
if (resolveMethod && allResolved) {
|
|
20
|
-
return createCommand(command,
|
|
30
|
+
return createCommand(command, function (tr, state) {
|
|
31
|
+
return transformer(transform.addResolveAnalytics(editorAnalyticsAPI)(resolveMethod)(tr, state), state);
|
|
32
|
+
});
|
|
21
33
|
}
|
|
22
|
-
return createCommand(command);
|
|
34
|
+
return createCommand(command, transformer);
|
|
23
35
|
};
|
|
24
36
|
};
|
|
25
37
|
export var closeComponent = function closeComponent() {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
|
-
import type { EditorAnalyticsAPI
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
4
|
import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
5
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
6
|
import type { InlineCommentMap, InlineCommentMouseData } from '../pm-plugins/types';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
|
-
import type { EditorAnalyticsAPI
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
4
|
import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
5
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
6
|
import type { InlineCommentMap, InlineCommentMouseData } from '../pm-plugins/types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-annotation",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/adf-schema": "^35.12.2",
|
|
36
|
-
"@atlaskit/editor-common": "^79.
|
|
36
|
+
"@atlaskit/editor-common": "^79.2.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^1.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-editor-viewmode": "^1.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-feature-flags": "^1.1.0",
|
|
40
|
-
"@atlaskit/editor-prosemirror": "4.0.
|
|
40
|
+
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
41
41
|
"@atlaskit/icon": "^22.1.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0"
|