@atlaskit/editor-plugin-mentions 32.1.9 → 32.2.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,19 @@
1
1
  # @atlaskit/editor-plugin-mentions
2
2
 
3
+ ## 32.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`059477aa93f45`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/059477aa93f45) -
8
+ Add an optimistic-toolbar opt-out to plugin configuration. Exclude Live pages from
9
+ platform_editor_ssr_toolbar_optimistic, including early editor-state exposure, toolbar rendering,
10
+ and asynchronous media and mention provider initialization. Preserve the experiment for Edit pages
11
+ regardless of toolbar docking position.
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 32.1.9
4
18
 
5
19
  ### Patch Changes
@@ -45,7 +45,7 @@ var ACTIONS = exports.ACTIONS = {
45
45
  CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
46
46
  };
47
47
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
48
- var PACKAGE_VERSION = "32.1.8";
48
+ var PACKAGE_VERSION = "32.1.9";
49
49
  var setProvider = function setProvider(provider) {
50
50
  return function (state, dispatch) {
51
51
  if (dispatch) {
@@ -195,7 +195,7 @@ function createMentionPlugin(_ref) {
195
195
  },
196
196
  view: function view(editorView) {
197
197
  var destroyed = false;
198
- var optimistic = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_ssr_toolbar_optimistic');
198
+ var optimistic = !(options !== null && options !== void 0 && options.disableOptimisticToolbar) && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_ssr_toolbar_optimistic');
199
199
  var currentProviderPromise;
200
200
  var providerHandler = function providerHandler(name, providerPromise) {
201
201
  switch (name) {
@@ -34,7 +34,7 @@ export const ACTIONS = {
34
34
  CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
35
35
  };
36
36
  const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
37
- const PACKAGE_VERSION = "32.1.8";
37
+ const PACKAGE_VERSION = "32.1.9";
38
38
  const setProvider = provider => (state, dispatch) => {
39
39
  if (dispatch) {
40
40
  dispatch(state.tr.setMeta(mentionPluginKey, {
@@ -183,7 +183,7 @@ export function createMentionPlugin({
183
183
  },
184
184
  view(editorView) {
185
185
  let destroyed = false;
186
- const optimistic = isExperimentEnabled('platform_editor_ssr_toolbar_optimistic');
186
+ const optimistic = !(options !== null && options !== void 0 && options.disableOptimisticToolbar) && isExperimentEnabled('platform_editor_ssr_toolbar_optimistic');
187
187
  let currentProviderPromise;
188
188
  const providerHandler = (name, providerPromise) => {
189
189
  switch (name) {
@@ -37,7 +37,7 @@ export var ACTIONS = {
37
37
  CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
38
38
  };
39
39
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
40
- var PACKAGE_VERSION = "32.1.8";
40
+ var PACKAGE_VERSION = "32.1.9";
41
41
  var setProvider = function setProvider(provider) {
42
42
  return function (state, dispatch) {
43
43
  if (dispatch) {
@@ -187,7 +187,7 @@ export function createMentionPlugin(_ref) {
187
187
  },
188
188
  view: function view(editorView) {
189
189
  var destroyed = false;
190
- var optimistic = isExperimentEnabled('platform_editor_ssr_toolbar_optimistic');
190
+ var optimistic = !(options !== null && options !== void 0 && options.disableOptimisticToolbar) && isExperimentEnabled('platform_editor_ssr_toolbar_optimistic');
191
191
  var currentProviderPromise;
192
192
  var providerHandler = function providerHandler(name, providerPromise) {
193
193
  switch (name) {
@@ -44,6 +44,8 @@ export interface MentionsPluginOptions extends MentionPluginConfig {
44
44
  * Takes priority over `MentionProvider.shouldHighlightMention()` if both are present.
45
45
  */
46
46
  currentUserId?: string;
47
+ /** Opt this editor surface out of the optimistic SSR toolbar experiment. */
48
+ disableOptimisticToolbar?: boolean;
47
49
  /**
48
50
  * Enables People / Agents sectioning in the mentions typeahead.
49
51
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-mentions",
3
- "version": "32.1.9",
3
+ "version": "32.2.0",
4
4
  "description": "Mentions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/section-message": "^10.2.0",
47
47
  "@atlaskit/teams-app-config": "^3.1.0",
48
48
  "@atlaskit/theme": "^28.2.0",
49
- "@atlaskit/tmp-editor-statsig": "^259.0.0",
49
+ "@atlaskit/tmp-editor-statsig": "^260.0.0",
50
50
  "@atlaskit/tokens": "^20.10.0",
51
51
  "@atlaskit/tooltip": "^24.4.0",
52
52
  "@atlaskit/user-picker": "^14.5.0",