@atlaskit/editor-plugin-annotation 2.9.9 → 2.9.11

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,19 @@
1
1
  # @atlaskit/editor-plugin-annotation
2
2
 
3
+ ## 2.9.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [#179350](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/179350)
8
+ [`9395a7b026838`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9395a7b026838) -
9
+ Clean up platform_editor_fix_toolbar_comment_jump
10
+
11
+ ## 2.9.10
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 2.9.9
4
18
 
5
19
  ### Patch Changes
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _hooks = require("@atlaskit/editor-common/hooks");
11
11
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
14
13
  var _editorCommands = require("./editor-commands");
15
14
  var _annotationMark = require("./nodeviews/annotationMark");
@@ -81,9 +80,6 @@ var annotationPlugin = exports.annotationPlugin = function annotationPlugin(_ref
81
80
  },
82
81
  pluginsOptions: {
83
82
  floatingToolbar: function floatingToolbar(state) {
84
- if (!(0, _platformFeatureFlags.fg)('platform_editor_fix_toolbar_comment_jump')) {
85
- return;
86
- }
87
83
  var pluginState = (0, _utils.getPluginState)(state);
88
84
  var bookmark = pluginState === null || pluginState === void 0 ? void 0 : pluginState.bookmark;
89
85
  if ((0, _toolbar.shouldSuppressFloatingToolbar)({
@@ -69,7 +69,6 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsA
69
69
  createCommentExperience = _ref2.createCommentExperience,
70
70
  annotationManager = _ref2.annotationManager,
71
71
  onCommentButtonMount = _ref2.onCommentButtonMount;
72
- var schema = state.schema;
73
72
  var selectionValid = (0, _utils2.isSelectionValid)(state);
74
73
  var isMediaSelected = (0, _mediaSingle.currentMediaNodeWithPos)(state);
75
74
 
@@ -183,20 +182,12 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsA
183
182
  },
184
183
  supportsViewMode: true // TODO: MODES-3950 - Clean up this floating toolbar view mode logic,
185
184
  };
186
- var annotation = schema.marks.annotation;
187
- var validNodes = Object.keys(schema.nodes).reduce(function (acc, current) {
188
- var type = schema.nodes[current];
189
- if (type.allowsMarkType(annotation)) {
190
- acc.push(type);
191
- }
192
- return acc;
193
- }, []);
194
185
  var toolbarTitle = intl.formatMessage(_messages.annotationMessages.toolbar);
195
186
  var calcToolbarPosition = isToolbarAbove ? _utils.calculateToolbarPositionAboveSelection : _utils.calculateToolbarPositionTrackHead;
196
187
  var onPositionCalculated = calcToolbarPosition(toolbarTitle);
197
188
  return {
198
189
  title: toolbarTitle,
199
- nodeType: (0, _platformFeatureFlags.fg)('platform_editor_fix_toolbar_comment_jump') ? getValidNodes(state) : validNodes,
190
+ nodeType: getValidNodes(state),
200
191
  items: [createComment],
201
192
  onPositionCalculated: onPositionCalculated,
202
193
  pluginName: 'annotation'
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
3
3
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
5
  import { setInlineCommentDraftState, showInlineCommentForBlockNode } from './editor-commands';
7
6
  import { annotationWithToDOMFix } from './nodeviews/annotationMark';
@@ -71,9 +70,6 @@ export const annotationPlugin = ({
71
70
  }],
72
71
  pluginsOptions: {
73
72
  floatingToolbar(state) {
74
- if (!fg('platform_editor_fix_toolbar_comment_jump')) {
75
- return;
76
- }
77
73
  const pluginState = getPluginState(state);
78
74
  const bookmark = pluginState === null || pluginState === void 0 ? void 0 : pluginState.bookmark;
79
75
  if (shouldSuppressFloatingToolbar({
@@ -67,9 +67,6 @@ export const buildToolbar = editorAnalyticsAPI => ({
67
67
  onCommentButtonMount
68
68
  }) => {
69
69
  var _api$connectivity, _api$connectivity$sha, _api$connectivity$sha2;
70
- const {
71
- schema
72
- } = state;
73
70
  const selectionValid = isSelectionValid(state);
74
71
  const isMediaSelected = currentMediaNodeWithPos(state);
75
72
 
@@ -181,22 +178,12 @@ export const buildToolbar = editorAnalyticsAPI => ({
181
178
  },
182
179
  supportsViewMode: true // TODO: MODES-3950 - Clean up this floating toolbar view mode logic,
183
180
  };
184
- const {
185
- annotation
186
- } = schema.marks;
187
- const validNodes = Object.keys(schema.nodes).reduce((acc, current) => {
188
- const type = schema.nodes[current];
189
- if (type.allowsMarkType(annotation)) {
190
- acc.push(type);
191
- }
192
- return acc;
193
- }, []);
194
181
  const toolbarTitle = intl.formatMessage(annotationMessages.toolbar);
195
182
  const calcToolbarPosition = isToolbarAbove ? calculateToolbarPositionAboveSelection : calculateToolbarPositionTrackHead;
196
183
  const onPositionCalculated = calcToolbarPosition(toolbarTitle);
197
184
  return {
198
185
  title: toolbarTitle,
199
- nodeType: fg('platform_editor_fix_toolbar_comment_jump') ? getValidNodes(state) : validNodes,
186
+ nodeType: getValidNodes(state),
200
187
  items: [createComment],
201
188
  onPositionCalculated,
202
189
  pluginName: 'annotation'
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import React from 'react';
5
5
  import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
6
6
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
8
  import { setInlineCommentDraftState, showInlineCommentForBlockNode } from './editor-commands';
10
9
  import { annotationWithToDOMFix } from './nodeviews/annotationMark';
@@ -74,9 +73,6 @@ export var annotationPlugin = function annotationPlugin(_ref) {
74
73
  },
75
74
  pluginsOptions: {
76
75
  floatingToolbar: function floatingToolbar(state) {
77
- if (!fg('platform_editor_fix_toolbar_comment_jump')) {
78
- return;
79
- }
80
76
  var pluginState = getPluginState(state);
81
77
  var bookmark = pluginState === null || pluginState === void 0 ? void 0 : pluginState.bookmark;
82
78
  if (shouldSuppressFloatingToolbar({
@@ -62,7 +62,6 @@ export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
62
62
  createCommentExperience = _ref2.createCommentExperience,
63
63
  annotationManager = _ref2.annotationManager,
64
64
  onCommentButtonMount = _ref2.onCommentButtonMount;
65
- var schema = state.schema;
66
65
  var selectionValid = isSelectionValid(state);
67
66
  var isMediaSelected = currentMediaNodeWithPos(state);
68
67
 
@@ -176,20 +175,12 @@ export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
176
175
  },
177
176
  supportsViewMode: true // TODO: MODES-3950 - Clean up this floating toolbar view mode logic,
178
177
  };
179
- var annotation = schema.marks.annotation;
180
- var validNodes = Object.keys(schema.nodes).reduce(function (acc, current) {
181
- var type = schema.nodes[current];
182
- if (type.allowsMarkType(annotation)) {
183
- acc.push(type);
184
- }
185
- return acc;
186
- }, []);
187
178
  var toolbarTitle = intl.formatMessage(annotationMessages.toolbar);
188
179
  var calcToolbarPosition = isToolbarAbove ? calculateToolbarPositionAboveSelection : calculateToolbarPositionTrackHead;
189
180
  var onPositionCalculated = calcToolbarPosition(toolbarTitle);
190
181
  return {
191
182
  title: toolbarTitle,
192
- nodeType: fg('platform_editor_fix_toolbar_comment_jump') ? getValidNodes(state) : validNodes,
183
+ nodeType: getValidNodes(state),
193
184
  items: [createComment],
194
185
  onPositionCalculated: onPositionCalculated,
195
186
  pluginName: 'annotation'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-annotation",
3
- "version": "2.9.9",
3
+ "version": "2.9.11",
4
4
  "description": "Annotation plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -9,8 +9,7 @@
9
9
  },
10
10
  "atlassian": {
11
11
  "team": "Editor: AI",
12
- "singleton": true,
13
- "runReact18": true
12
+ "singleton": true
14
13
  },
15
14
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
16
15
  "main": "dist/cjs/index.js",
@@ -33,16 +32,16 @@
33
32
  "dependencies": {
34
33
  "@atlaskit/adf-schema": "^47.6.0",
35
34
  "@atlaskit/analytics-next": "^11.1.0",
36
- "@atlaskit/editor-common": "^107.0.0",
35
+ "@atlaskit/editor-common": "^107.3.0",
37
36
  "@atlaskit/editor-plugin-analytics": "^2.3.0",
38
37
  "@atlaskit/editor-plugin-connectivity": "^2.0.0",
39
38
  "@atlaskit/editor-plugin-editor-viewmode-effects": "^2.0.0",
40
39
  "@atlaskit/editor-plugin-feature-flags": "^1.4.0",
41
40
  "@atlaskit/editor-prosemirror": "7.0.0",
42
- "@atlaskit/icon": "^27.0.0",
41
+ "@atlaskit/icon": "^27.2.0",
43
42
  "@atlaskit/onboarding": "^14.2.0",
44
43
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
- "@atlaskit/tmp-editor-statsig": "^7.1.0",
44
+ "@atlaskit/tmp-editor-statsig": "^8.5.0",
46
45
  "@babel/runtime": "^7.0.0"
47
46
  },
48
47
  "peerDependencies": {
@@ -107,9 +106,6 @@
107
106
  "platform_editor_listen_for_annotation_clicks": {
108
107
  "type": "boolean"
109
108
  },
110
- "platform_editor_fix_toolbar_comment_jump": {
111
- "type": "boolean"
112
- },
113
109
  "platform_editor_annotation_selected_annotation": {
114
110
  "type": "boolean"
115
111
  },