@atlaskit/editor-plugin-status 17.2.5 → 17.2.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-status
2
2
 
3
+ ## 17.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a6c26b16402ca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a6c26b16402ca) -
8
+ Migrate nine dogfooding editor experiments from `@atlaskit/tmp-editor-statsig` to the Platform
9
+ experiment API and move their tests to Platform experiment mocks.
10
+ - Updated dependencies
11
+
3
12
  ## 17.2.5
4
13
 
5
14
  ### Patch Changes
@@ -10,8 +10,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _hooks = require("@atlaskit/editor-common/hooks");
12
12
  var _utils = require("@atlaskit/editor-prosemirror/utils");
13
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
13
14
  var _fg = require("@atlaskit/platform-feature-flags/fg");
14
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
15
  var _actions = require("../pm-plugins/actions");
16
16
  var _getSuggestedStatuses = require("./getSuggestedStatuses");
17
17
  var _statusPicker = _interopRequireDefault(require("./statusPicker"));
@@ -72,7 +72,7 @@ function ContentComponent(_ref) {
72
72
  }
73
73
  }, [editorView, showStatusPickerAt]);
74
74
  var suggestedStatuses = (0, _react.useMemo)(function () {
75
- if (typeof showStatusPickerAt !== 'number' || !(0, _expValEquals.expValEquals)('platform_editor_status_popup_suggestions', 'isEnabled', true)) {
75
+ if (typeof showStatusPickerAt !== 'number' || !(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_status_popup_suggestions')) {
76
76
  return [];
77
77
  }
78
78
 
@@ -21,11 +21,11 @@ var _ui = require("@atlaskit/editor-common/ui");
21
21
  var _uiReact = require("@atlaskit/editor-common/ui-react");
22
22
  var _userIntent = require("@atlaskit/editor-common/user-intent");
23
23
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
24
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
25
+ var _unsafeExpValNoExposure = require("@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure");
24
26
  var _fg = require("@atlaskit/platform-feature-flags/fg");
25
27
  var _element = require("@atlaskit/status/element");
26
28
  var _picker = require("@atlaskit/status/picker");
27
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
28
- var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
29
29
  var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden/visually-hidden"));
30
30
  var _actions = require("../pm-plugins/actions");
31
31
  var _analytics = require("./analytics");
@@ -161,7 +161,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
161
161
  });
162
162
  (0, _defineProperty2.default)(_this, "handleTabPress", function (event) {
163
163
  var _getDocument2;
164
- if (!(0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_status_popup_suggestions', 'isEnabled', true)) {
164
+ if (!(0, _unsafeExpValNoExposure.UNSAFE_expValNoExposure)('platform_editor_status_popup_suggestions', 'isEnabled', false)) {
165
165
  var _getDocument;
166
166
  /* original tab-navigation behaviour: cycle between color buttons and the input field */
167
167
  var _colorButtons = event.currentTarget.querySelectorAll('button');
@@ -450,8 +450,8 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
450
450
  var _this$state3 = this.state,
451
451
  color = _this$state3.color,
452
452
  text = _this$state3.text;
453
- var suggestionsPatchEnabled = (0, _expValEquals.expValEquals)('platform_editor_status_popup_suggestions', 'isEnabled', true) && (0, _fg.fg)('platform_editor_status_popup_suggestions_patch_1');
454
- var suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length && (0, _expValEquals.expValEquals)('platform_editor_status_popup_suggestions', 'isEnabled', true) ? (0, _react2.jsx)("div", {
453
+ var suggestionsPatchEnabled = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_status_popup_suggestions') && (0, _fg.fg)('platform_editor_status_popup_suggestions_patch_1');
454
+ var suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_status_popup_suggestions') ? (0, _react2.jsx)("div", {
455
455
  css: [suggestedStatusesContainerStyles, suggestionsPatchEnabled ? suggestedStatusesContainerPatchStyles : undefined],
456
456
  "data-suggested-status-list": true
457
457
  }, suggestedStatuses.map(function (suggestedStatus, index) {
@@ -516,7 +516,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
516
516
  handleClickOutside: this.handleClickOutside,
517
517
  handleEscapeKeydown: this.handleEscapeKeydown,
518
518
  zIndex: _editorSharedStyles.akEditorFloatingDialogZIndex,
519
- fitHeight: (0, _expValEquals.expValEquals)('platform_editor_status_popup_suggestions', 'isEnabled', true) && (0, _fg.fg)('platform_editor_status_popup_suggestions_patch_1') ? STATUS_PICKER_FIT_HEIGHT : 40,
519
+ fitHeight: (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_status_popup_suggestions') && (0, _fg.fg)('platform_editor_status_popup_suggestions_patch_1') ? STATUS_PICKER_FIT_HEIGHT : 40,
520
520
  mountTo: mountTo,
521
521
  boundariesElement: boundariesElement,
522
522
  scrollableElement: scrollableElement,
@@ -1,8 +1,8 @@
1
1
  import React, { useCallback, useMemo } from 'react';
2
2
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
3
3
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
4
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
4
5
  import { fg } from '@atlaskit/platform-feature-flags/fg';
5
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
6
  import { commitStatusPicker, updateStatus } from '../pm-plugins/actions';
7
7
  import { getSuggestedStatuses, MAX_SUGGESTED_STATUSES, MAX_SUGGESTED_STATUSES_OLD } from './getSuggestedStatuses';
8
8
  import StatusPicker from './statusPicker';
@@ -59,7 +59,7 @@ export function ContentComponent({
59
59
  }
60
60
  }, [editorView, showStatusPickerAt]);
61
61
  const suggestedStatuses = useMemo(() => {
62
- if (typeof showStatusPickerAt !== 'number' || !expValEquals('platform_editor_status_popup_suggestions', 'isEnabled', true)) {
62
+ if (typeof showStatusPickerAt !== 'number' || !isExperimentEnabled('platform_editor_status_popup_suggestions')) {
63
63
  return [];
64
64
  }
65
65
 
@@ -16,11 +16,11 @@ import { Popup } from '@atlaskit/editor-common/ui';
16
16
  import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
17
17
  import { UserIntentPopupWrapper } from '@atlaskit/editor-common/user-intent';
18
18
  import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
19
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
20
+ import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
19
21
  import { fg } from '@atlaskit/platform-feature-flags/fg';
20
22
  import { Status } from '@atlaskit/status/element';
21
23
  import { StatusPicker as AkStatusPicker } from '@atlaskit/status/picker';
22
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
23
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
24
24
  import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
25
25
  import { DEFAULT_STATUS } from '../pm-plugins/actions';
26
26
  import { analyticsState, createStatusAnalyticsAndFire } from './analytics';
@@ -149,7 +149,7 @@ class StatusPickerWithIntl extends React.Component {
149
149
  });
150
150
  _defineProperty(this, "handleTabPress", event => {
151
151
  var _getDocument2;
152
- if (!expValEqualsNoExposure('platform_editor_status_popup_suggestions', 'isEnabled', true)) {
152
+ if (!UNSAFE_expValNoExposure('platform_editor_status_popup_suggestions', 'isEnabled', false)) {
153
153
  var _getDocument;
154
154
  /* original tab-navigation behaviour: cycle between color buttons and the input field */
155
155
  const colorButtons = event.currentTarget.querySelectorAll('button');
@@ -424,8 +424,8 @@ class StatusPickerWithIntl extends React.Component {
424
424
  color,
425
425
  text
426
426
  } = this.state;
427
- const suggestionsPatchEnabled = expValEquals('platform_editor_status_popup_suggestions', 'isEnabled', true) && fg('platform_editor_status_popup_suggestions_patch_1');
428
- const suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length && expValEquals('platform_editor_status_popup_suggestions', 'isEnabled', true) ? jsx("div", {
427
+ const suggestionsPatchEnabled = isExperimentEnabled('platform_editor_status_popup_suggestions') && fg('platform_editor_status_popup_suggestions_patch_1');
428
+ const suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length && isExperimentEnabled('platform_editor_status_popup_suggestions') ? jsx("div", {
429
429
  css: [suggestedStatusesContainerStyles, suggestionsPatchEnabled ? suggestedStatusesContainerPatchStyles : undefined],
430
430
  "data-suggested-status-list": true
431
431
  }, suggestedStatuses.map((suggestedStatus, index) => jsx("div", {
@@ -485,7 +485,7 @@ class StatusPickerWithIntl extends React.Component {
485
485
  handleClickOutside: this.handleClickOutside,
486
486
  handleEscapeKeydown: this.handleEscapeKeydown,
487
487
  zIndex: akEditorFloatingDialogZIndex,
488
- fitHeight: expValEquals('platform_editor_status_popup_suggestions', 'isEnabled', true) && fg('platform_editor_status_popup_suggestions_patch_1') ? STATUS_PICKER_FIT_HEIGHT : 40,
488
+ fitHeight: isExperimentEnabled('platform_editor_status_popup_suggestions') && fg('platform_editor_status_popup_suggestions_patch_1') ? STATUS_PICKER_FIT_HEIGHT : 40,
489
489
  mountTo: mountTo,
490
490
  boundariesElement: boundariesElement,
491
491
  scrollableElement: scrollableElement,
@@ -4,8 +4,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import React, { useCallback, useMemo } from 'react';
5
5
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
6
6
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
7
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
7
8
  import { fg } from '@atlaskit/platform-feature-flags/fg';
8
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
9
  import { commitStatusPicker, updateStatus } from '../pm-plugins/actions';
10
10
  import { getSuggestedStatuses, MAX_SUGGESTED_STATUSES, MAX_SUGGESTED_STATUSES_OLD } from './getSuggestedStatuses';
11
11
  import StatusPicker from './statusPicker';
@@ -63,7 +63,7 @@ export function ContentComponent(_ref) {
63
63
  }
64
64
  }, [editorView, showStatusPickerAt]);
65
65
  var suggestedStatuses = useMemo(function () {
66
- if (typeof showStatusPickerAt !== 'number' || !expValEquals('platform_editor_status_popup_suggestions', 'isEnabled', true)) {
66
+ if (typeof showStatusPickerAt !== 'number' || !isExperimentEnabled('platform_editor_status_popup_suggestions')) {
67
67
  return [];
68
68
  }
69
69
 
@@ -23,11 +23,11 @@ import { Popup } from '@atlaskit/editor-common/ui';
23
23
  import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
24
24
  import { UserIntentPopupWrapper } from '@atlaskit/editor-common/user-intent';
25
25
  import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
26
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
27
+ import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
26
28
  import { fg } from '@atlaskit/platform-feature-flags/fg';
27
29
  import { Status } from '@atlaskit/status/element';
28
30
  import { StatusPicker as AkStatusPicker } from '@atlaskit/status/picker';
29
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
30
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
31
31
  import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
32
32
  import { DEFAULT_STATUS } from '../pm-plugins/actions';
33
33
  import { analyticsState, createStatusAnalyticsAndFire } from './analytics';
@@ -158,7 +158,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
158
158
  });
159
159
  _defineProperty(_this, "handleTabPress", function (event) {
160
160
  var _getDocument2;
161
- if (!expValEqualsNoExposure('platform_editor_status_popup_suggestions', 'isEnabled', true)) {
161
+ if (!UNSAFE_expValNoExposure('platform_editor_status_popup_suggestions', 'isEnabled', false)) {
162
162
  var _getDocument;
163
163
  /* original tab-navigation behaviour: cycle between color buttons and the input field */
164
164
  var _colorButtons = event.currentTarget.querySelectorAll('button');
@@ -447,8 +447,8 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
447
447
  var _this$state3 = this.state,
448
448
  color = _this$state3.color,
449
449
  text = _this$state3.text;
450
- var suggestionsPatchEnabled = expValEquals('platform_editor_status_popup_suggestions', 'isEnabled', true) && fg('platform_editor_status_popup_suggestions_patch_1');
451
- var suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length && expValEquals('platform_editor_status_popup_suggestions', 'isEnabled', true) ? jsx("div", {
450
+ var suggestionsPatchEnabled = isExperimentEnabled('platform_editor_status_popup_suggestions') && fg('platform_editor_status_popup_suggestions_patch_1');
451
+ var suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length && isExperimentEnabled('platform_editor_status_popup_suggestions') ? jsx("div", {
452
452
  css: [suggestedStatusesContainerStyles, suggestionsPatchEnabled ? suggestedStatusesContainerPatchStyles : undefined],
453
453
  "data-suggested-status-list": true
454
454
  }, suggestedStatuses.map(function (suggestedStatus, index) {
@@ -513,7 +513,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
513
513
  handleClickOutside: this.handleClickOutside,
514
514
  handleEscapeKeydown: this.handleEscapeKeydown,
515
515
  zIndex: akEditorFloatingDialogZIndex,
516
- fitHeight: expValEquals('platform_editor_status_popup_suggestions', 'isEnabled', true) && fg('platform_editor_status_popup_suggestions_patch_1') ? STATUS_PICKER_FIT_HEIGHT : 40,
516
+ fitHeight: isExperimentEnabled('platform_editor_status_popup_suggestions') && fg('platform_editor_status_popup_suggestions_patch_1') ? STATUS_PICKER_FIT_HEIGHT : 40,
517
517
  mountTo: mountTo,
518
518
  boundariesElement: boundariesElement,
519
519
  scrollableElement: scrollableElement,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-status",
3
- "version": "17.2.5",
3
+ "version": "17.2.6",
4
4
  "description": "Status plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,14 +34,14 @@
34
34
  "@atlaskit/platform-feature-experiments": "^0.3.0",
35
35
  "@atlaskit/platform-feature-flags": "^2.2.0",
36
36
  "@atlaskit/status": "^5.9.0",
37
- "@atlaskit/tmp-editor-statsig": "^173.0.0",
37
+ "@atlaskit/tmp-editor-statsig": "^174.0.0",
38
38
  "@atlaskit/tokens": "^16.11.0",
39
39
  "@atlaskit/visually-hidden": "^4.4.0",
40
40
  "@babel/runtime": "^7.0.0",
41
41
  "@emotion/react": "^11.7.1"
42
42
  },
43
43
  "peerDependencies": {
44
- "@atlaskit/editor-common": "^120.11.0",
44
+ "@atlaskit/editor-common": "^120.12.0",
45
45
  "react": "^18.2.0 || ^19.2.0",
46
46
  "react-dom": "^18.2.0 || ^19.2.0",
47
47
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"