@atlaskit/editor-plugin-status 17.2.4 → 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 +15 -0
- package/dist/cjs/pm-plugins/actions.js +3 -3
- package/dist/cjs/statusPlugin.js +2 -2
- package/dist/cjs/ui/ContentComponent.js +2 -2
- package/dist/cjs/ui/statusPicker.js +6 -6
- package/dist/es2019/pm-plugins/actions.js +1 -1
- package/dist/es2019/statusPlugin.js +1 -1
- package/dist/es2019/ui/ContentComponent.js +2 -2
- package/dist/es2019/ui/statusPicker.js +6 -6
- package/dist/esm/pm-plugins/actions.js +1 -1
- package/dist/esm/statusPlugin.js +1 -1
- package/dist/esm/ui/ContentComponent.js +2 -2
- package/dist/esm/ui/statusPicker.js +6 -6
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
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
|
+
|
|
12
|
+
## 17.2.5
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 17.2.4
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.verifyAndInsertStatus = exports.updateStatusWithAnalytics = exports.updateStatus = exports.setStatusPickerAt = exports.setFocusOnStatusInput = exports.removeStatus = exports.insertStatus = exports.createStatus = exports.commitStatusPicker = exports.DEFAULT_STATUS_NEW = exports.DEFAULT_STATUS = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var
|
|
9
|
+
var _uuid = require("@atlaskit/adf-schema/uuid");
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
11
|
var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
|
|
12
12
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -43,7 +43,7 @@ var verifyAndInsertStatus = exports.verifyAndInsertStatus = function verifyAndIn
|
|
|
43
43
|
var createStatus = exports.createStatus = function createStatus(tr) {
|
|
44
44
|
var annotationMarksForPos = (0, _utils.getAnnotationMarksForPos)(tr.selection.$head);
|
|
45
45
|
var statusNode = tr.doc.type.schema.nodes.status.createChecked(_objectSpread(_objectSpread({}, (0, _fg.fg)('platform-dst-lozenge-tag-badge-visual-uplifts') ? DEFAULT_STATUS_NEW : DEFAULT_STATUS), {}, {
|
|
46
|
-
localId:
|
|
46
|
+
localId: _uuid.uuid.generate()
|
|
47
47
|
}), null, annotationMarksForPos);
|
|
48
48
|
return verifyAndInsertStatus(statusNode, tr, annotationMarksForPos);
|
|
49
49
|
};
|
|
@@ -71,7 +71,7 @@ var updateStatus = exports.updateStatus = function updateStatus(status) {
|
|
|
71
71
|
var schema = state.schema;
|
|
72
72
|
var selectedStatus = status ? Object.assign(status, {
|
|
73
73
|
text: status.text.trim(),
|
|
74
|
-
localId: status.localId ||
|
|
74
|
+
localId: status.localId || _uuid.uuid.generate()
|
|
75
75
|
}) : status;
|
|
76
76
|
var statusProps = _objectSpread(_objectSpread({}, (0, _fg.fg)('platform-dst-lozenge-tag-badge-visual-uplifts') ? DEFAULT_STATUS_NEW : DEFAULT_STATUS), selectedStatus);
|
|
77
77
|
var tr = state.tr;
|
package/dist/cjs/statusPlugin.js
CHANGED
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.statusPlugin = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var
|
|
10
|
+
var _status = require("@atlaskit/adf-schema/status");
|
|
11
11
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
12
12
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
13
13
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
@@ -39,7 +39,7 @@ var statusPlugin = exports.statusPlugin = function statusPlugin(_ref) {
|
|
|
39
39
|
nodes: function nodes() {
|
|
40
40
|
return [{
|
|
41
41
|
name: 'status',
|
|
42
|
-
node:
|
|
42
|
+
node: _status.status
|
|
43
43
|
}];
|
|
44
44
|
},
|
|
45
45
|
pmPlugins: function pmPlugins() {
|
|
@@ -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,
|
|
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,
|
|
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,
|
|
454
|
-
var suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length && (0,
|
|
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,
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import { uuid } from '@atlaskit/adf-schema';
|
|
1
|
+
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
4
4
|
import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { status } from '@atlaskit/adf-schema';
|
|
2
|
+
import { status } from '@atlaskit/adf-schema/status';
|
|
3
3
|
import { ACTION_SUBJECT_ID, ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { addInlineComment, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
5
5
|
import { annotationMessages, toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -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' || !
|
|
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 (!
|
|
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 =
|
|
428
|
-
const suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length &&
|
|
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:
|
|
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,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { uuid } from '@atlaskit/adf-schema';
|
|
4
|
+
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
5
5
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
7
7
|
import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils';
|
package/dist/esm/statusPlugin.js
CHANGED
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { status } from '@atlaskit/adf-schema';
|
|
5
|
+
import { status } from '@atlaskit/adf-schema/status';
|
|
6
6
|
import { ACTION_SUBJECT_ID, ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import { addInlineComment, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
8
8
|
import { annotationMessages, toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -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' || !
|
|
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 (!
|
|
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 =
|
|
451
|
-
var suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length &&
|
|
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:
|
|
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.
|
|
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": "^
|
|
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.
|
|
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"
|