@atlaskit/emoji 71.4.2 → 71.4.3
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 +8 -0
- package/dist/cjs/components/common/DeleteButton.js +2 -2
- package/dist/cjs/components/common/EmojiActions.js +6 -14
- package/dist/cjs/components/common/EmojiDeletePreview.js +2 -2
- package/dist/cjs/components/common/EmojiErrorMessage.js +2 -2
- package/dist/cjs/components/common/EmojiRadioButton.js +2 -3
- package/dist/cjs/components/common/EmojiUploadPicker.js +9 -9
- package/dist/cjs/components/common/FileChooser.js +3 -3
- package/dist/cjs/components/common/TonePreviewButton.js +1 -2
- package/dist/cjs/components/common/ToneSelector.js +2 -2
- package/dist/cjs/components/picker/CategorySelector.js +7 -7
- package/dist/cjs/components/picker/EmojiPicker.js +2 -2
- package/dist/cjs/components/picker/EmojiPickerComponent.js +15 -15
- package/dist/cjs/components/picker/EmojiPickerEmojiRow.js +1 -3
- package/dist/cjs/components/picker/EmojiPickerFooter.js +2 -3
- package/dist/cjs/components/picker/EmojiPickerList.js +2 -2
- package/dist/cjs/components/picker/EmojiPickerListSearch.js +2 -2
- package/dist/cjs/components/picker/VirtualList.js +3 -3
- package/dist/cjs/util/analytics/analytics.js +1 -1
- package/dist/es2019/components/common/DeleteButton.js +2 -2
- package/dist/es2019/components/common/EmojiActions.js +6 -14
- package/dist/es2019/components/common/EmojiDeletePreview.js +2 -2
- package/dist/es2019/components/common/EmojiErrorMessage.js +2 -2
- package/dist/es2019/components/common/EmojiRadioButton.js +2 -3
- package/dist/es2019/components/common/EmojiUploadPicker.js +9 -9
- package/dist/es2019/components/common/FileChooser.js +3 -3
- package/dist/es2019/components/common/TonePreviewButton.js +1 -2
- package/dist/es2019/components/common/ToneSelector.js +2 -2
- package/dist/es2019/components/picker/CategorySelector.js +6 -6
- package/dist/es2019/components/picker/EmojiPicker.js +2 -2
- package/dist/es2019/components/picker/EmojiPickerComponent.js +15 -15
- package/dist/es2019/components/picker/EmojiPickerEmojiRow.js +1 -3
- package/dist/es2019/components/picker/EmojiPickerFooter.js +2 -2
- package/dist/es2019/components/picker/EmojiPickerList.js +2 -2
- package/dist/es2019/components/picker/EmojiPickerListSearch.js +2 -2
- package/dist/es2019/components/picker/VirtualList.js +3 -3
- package/dist/es2019/util/analytics/analytics.js +1 -1
- package/dist/esm/components/common/DeleteButton.js +2 -2
- package/dist/esm/components/common/EmojiActions.js +6 -14
- package/dist/esm/components/common/EmojiDeletePreview.js +2 -2
- package/dist/esm/components/common/EmojiErrorMessage.js +2 -2
- package/dist/esm/components/common/EmojiRadioButton.js +2 -3
- package/dist/esm/components/common/EmojiUploadPicker.js +9 -9
- package/dist/esm/components/common/FileChooser.js +3 -3
- package/dist/esm/components/common/TonePreviewButton.js +1 -2
- package/dist/esm/components/common/ToneSelector.js +2 -2
- package/dist/esm/components/picker/CategorySelector.js +7 -7
- package/dist/esm/components/picker/EmojiPicker.js +2 -2
- package/dist/esm/components/picker/EmojiPickerComponent.js +15 -15
- package/dist/esm/components/picker/EmojiPickerEmojiRow.js +1 -3
- package/dist/esm/components/picker/EmojiPickerFooter.js +2 -2
- package/dist/esm/components/picker/EmojiPickerList.js +2 -2
- package/dist/esm/components/picker/EmojiPickerListSearch.js +2 -2
- package/dist/esm/components/picker/VirtualList.js +3 -3
- package/dist/esm/util/analytics/analytics.js +1 -1
- package/dist/types/components/picker/EmojiPickerComponent.d.ts +0 -4
- package/package.json +2 -2
|
@@ -17,8 +17,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
17
17
|
var _reactIntl = require("react-intl");
|
|
18
18
|
var _useDebounce = require("use-debounce");
|
|
19
19
|
var _constants = require("../../util/constants");
|
|
20
|
-
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
21
20
|
var _i18n = require("../i18n");
|
|
21
|
+
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
22
22
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
23
23
|
var input = null;
|
|
24
24
|
var inputNew = null;
|
|
@@ -71,7 +71,7 @@ var EmojiPickerListSearch = exports.EmojiPickerListSearch = function EmojiPicker
|
|
|
71
71
|
role: "status"
|
|
72
72
|
}, dirty ? query === '' ? formatMessage(_i18n.messages.searchResultsStatusSeeAll) : formatMessage(_i18n.messages.searchResultsStatus, {
|
|
73
73
|
count: resultsCount
|
|
74
|
-
}) : null),
|
|
74
|
+
}) : null), (0, _expVal.expVal)('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
75
75
|
className: (0, _runtime.ax)(["_n6341l7x _18z11b66"])
|
|
76
76
|
}, /*#__PURE__*/_react.default.createElement(_textfield.default, {
|
|
77
77
|
role: "searchbox",
|
|
@@ -14,7 +14,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
var _reactVirtual = require("@tanstack/react-virtual");
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
|
-
var
|
|
17
|
+
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
18
18
|
var _useEmojiPickerListContext = require("../../hooks/useEmojiPickerListContext");
|
|
19
19
|
var _constants = require("../../util/constants");
|
|
20
20
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -65,7 +65,7 @@ var VirtualList = exports.VirtualList = /*#__PURE__*/_react.default.forwardRef(f
|
|
|
65
65
|
var elemBottom = elementRect.bottom;
|
|
66
66
|
var parentTop = parentRect.top;
|
|
67
67
|
var parentBottom = parentRect.bottom;
|
|
68
|
-
var isVisible =
|
|
68
|
+
var isVisible = (0, _expVal.expVal)('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? elemTop >= parentTop && elemBottom <= parentBottom : elemBottom > parentTop && elemTop < parentBottom;
|
|
69
69
|
return isVisible;
|
|
70
70
|
};
|
|
71
71
|
var getFirstVisibleListElementIndex = (0, _react.useCallback)(function () {
|
|
@@ -84,7 +84,7 @@ var VirtualList = exports.VirtualList = /*#__PURE__*/_react.default.forwardRef(f
|
|
|
84
84
|
var _virtualList$firstVis;
|
|
85
85
|
return ((_virtualList$firstVis = virtualList[firstVisibleIndex]) === null || _virtualList$firstVis === void 0 ? void 0 : _virtualList$firstVis.index) || 0;
|
|
86
86
|
}
|
|
87
|
-
return
|
|
87
|
+
return (0, _expVal.expVal)('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? ((_virtualList$ = virtualList[0]) === null || _virtualList$ === void 0 ? void 0 : _virtualList$.index) || 0 : 0;
|
|
88
88
|
}, [rowVirtualizer]);
|
|
89
89
|
|
|
90
90
|
/**
|
|
@@ -20,7 +20,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
20
20
|
actionSubjectId: actionSubjectId,
|
|
21
21
|
attributes: _objectSpread({
|
|
22
22
|
packageName: "@atlaskit/emoji",
|
|
23
|
-
packageVersion: "71.4.
|
|
23
|
+
packageVersion: "71.4.2"
|
|
24
24
|
}, attributes)
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -5,9 +5,9 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import Button from '@atlaskit/button/standard-button';
|
|
6
6
|
import CrossCircleIcon from '@atlaskit/icon/core/cross-circle';
|
|
7
7
|
import { deleteEmojiLabel } from '../../util/constants';
|
|
8
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
9
8
|
import { emojiDeleteButton } from './styles';
|
|
10
9
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
10
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
11
11
|
const styles = {
|
|
12
12
|
boxWrapperStyle: "_1bsbf6fq _4t3if6fq"
|
|
13
13
|
};
|
|
@@ -19,7 +19,7 @@ const refreshedDeleteButton = null;
|
|
|
19
19
|
*/
|
|
20
20
|
export const RENDER_EMOJI_DELETE_BUTTON_TESTID = 'render-emoji-delete-button';
|
|
21
21
|
const DeleteButton = props => {
|
|
22
|
-
const isRefreshEnabled =
|
|
22
|
+
const isRefreshEnabled = expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
23
23
|
return /*#__PURE__*/React.createElement("span", {
|
|
24
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
25
25
|
className: ax(["_3um015vq _1e0c1txw _kqswstnw _154ix0bf _1xi2x0bf _1pbykb7n _13t3idpf", isRefreshEnabled && "_154ir5cr _1xi2r5cr", emojiDeleteButton]),
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { Fragment, useState, useRef, memo, useLayoutEffect, useCallback, useEffect } from 'react';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
8
9
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
9
10
|
import EmojiDeletePreview from './EmojiDeletePreview';
|
|
10
11
|
import EmojiUploadPicker from './EmojiUploadPicker';
|
|
@@ -19,7 +20,6 @@ import AddIcon from '@atlaskit/icon/core/add';
|
|
|
19
20
|
import { setSkinToneAriaLabelText } from './setSkinToneAriaLabelText';
|
|
20
21
|
import { emojiPickerAddEmoji } from './styles';
|
|
21
22
|
import { DEFAULT_TONE } from '../../util/constants';
|
|
22
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
23
23
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
24
24
|
import { layers } from '@atlaskit/theme/constants';
|
|
25
25
|
const styles = {
|
|
@@ -131,9 +131,7 @@ const TonesWrapper = props => {
|
|
|
131
131
|
openProductivityColorSelectorWithKeyboard.current = true;
|
|
132
132
|
}
|
|
133
133
|
}, []);
|
|
134
|
-
const shouldShowProductivityColorSelector = !!(activeCategoryId === 'ATLASSIAN' && productivityColorPreviewEmojis && selectedProductivityColor && onProductivityColorSelected &&
|
|
135
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
136
|
-
FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false));
|
|
134
|
+
const shouldShowProductivityColorSelector = !!(activeCategoryId === 'ATLASSIAN' && productivityColorPreviewEmojis && selectedProductivityColor && onProductivityColorSelected && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false));
|
|
137
135
|
if (shouldShowProductivityColorSelector) {
|
|
138
136
|
const previewEmoji = (productivityColorPreviewEmojis === null || productivityColorPreviewEmojis === void 0 ? void 0 : productivityColorPreviewEmojis[selectedProductivityColor]) || Object.values(productivityColorPreviewEmojis || {})[0];
|
|
139
137
|
if (!previewEmoji) {
|
|
@@ -212,9 +210,7 @@ export const EmojiActions = props => {
|
|
|
212
210
|
} = props;
|
|
213
211
|
const [showToneSelector, setShowToneSelector] = useState(false);
|
|
214
212
|
const wasProductivityColorSelectorOpen = useRef(false);
|
|
215
|
-
const shouldUseProductivityColorControl = !!(props.activeCategoryId === 'ATLASSIAN' && props.productivityColorPreviewEmojis && props.selectedProductivityColor && props.onProductivityColorSelected &&
|
|
216
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
217
|
-
FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false));
|
|
213
|
+
const shouldUseProductivityColorControl = !!(props.activeCategoryId === 'ATLASSIAN' && props.productivityColorPreviewEmojis && props.selectedProductivityColor && props.onProductivityColorSelected && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false));
|
|
218
214
|
const onToneOpenHandler = useCallback(() => setShowToneSelector(true), []);
|
|
219
215
|
const onToneCloseHandler = useCallback(() => setShowToneSelector(false), []);
|
|
220
216
|
const onToneToggleHandler = useCallback(() => {
|
|
@@ -246,8 +242,7 @@ export const EmojiActions = props => {
|
|
|
246
242
|
}
|
|
247
243
|
}, [shouldUseProductivityColorControl, showToneSelector]);
|
|
248
244
|
if (uploading) {
|
|
249
|
-
|
|
250
|
-
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
245
|
+
return expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
251
246
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug"])
|
|
252
247
|
}, /*#__PURE__*/React.createElement(EmojiUploadPicker, {
|
|
253
248
|
onUploadCancelled: onUploadCancelled,
|
|
@@ -266,8 +261,7 @@ export const EmojiActions = props => {
|
|
|
266
261
|
}));
|
|
267
262
|
}
|
|
268
263
|
if (emojiToDelete) {
|
|
269
|
-
|
|
270
|
-
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
264
|
+
return expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
271
265
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug"])
|
|
272
266
|
}, /*#__PURE__*/React.createElement(EmojiDeletePreview, {
|
|
273
267
|
emoji: emojiToDelete,
|
|
@@ -281,9 +275,7 @@ export const EmojiActions = props => {
|
|
|
281
275
|
onCloseDelete: onCloseDelete
|
|
282
276
|
}));
|
|
283
277
|
}
|
|
284
|
-
|
|
285
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
286
|
-
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
278
|
+
return expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
287
279
|
"data-testid": emojiActionsTestId,
|
|
288
280
|
onMouseLeave: onMouseLeaveHandler,
|
|
289
281
|
onBlur: fg('platform_suppression_removal_fix_reactions') ? onMouseLeaveHandler : undefined,
|
|
@@ -5,12 +5,12 @@ import "./EmojiDeletePreview.compiled.css";
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
import { Component } from 'react';
|
|
8
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
8
9
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
9
10
|
import AkButton from '@atlaskit/button/new';
|
|
10
11
|
import Heading from '@atlaskit/heading';
|
|
11
12
|
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
12
13
|
import FocusLock from 'react-focus-lock';
|
|
13
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
14
14
|
import { messages } from '../i18n';
|
|
15
15
|
import CachingEmoji from './CachingEmoji';
|
|
16
16
|
import EmojiErrorMessage, { emojiErrorScreenreaderTestId } from './EmojiErrorMessage';
|
|
@@ -78,7 +78,7 @@ class EmojiDeletePreview extends Component {
|
|
|
78
78
|
const {
|
|
79
79
|
formatMessage
|
|
80
80
|
} = intl;
|
|
81
|
-
if (
|
|
81
|
+
if (expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
82
82
|
return /*#__PURE__*/React.createElement(FocusLock, {
|
|
83
83
|
noFocusGuards: true
|
|
84
84
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -5,8 +5,8 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import Tooltip from '@atlaskit/tooltip';
|
|
6
6
|
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
7
7
|
import { ErrorMessage } from '@atlaskit/form';
|
|
8
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
9
8
|
import { useIntl } from 'react-intl';
|
|
9
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
10
10
|
import { messages } from '../i18n';
|
|
11
11
|
const errorMessageStyles = {
|
|
12
12
|
chooseFile: "_1e0c1txw _syaz1tmw _u5f319bv _1bah1y6m",
|
|
@@ -38,7 +38,7 @@ const EmojiErrorMessage = props => {
|
|
|
38
38
|
label: formatMessage(messages.error),
|
|
39
39
|
spacing: "spacious",
|
|
40
40
|
testId: emojiErrorIconTestId
|
|
41
|
-
}))) :
|
|
41
|
+
}))) : expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
42
42
|
"data-testid": emojiErrorMessageTestId
|
|
43
43
|
}, /*#__PURE__*/React.createElement(ErrorMessage, null, message)) : /*#__PURE__*/React.createElement("div", {
|
|
44
44
|
"data-testid": emojiErrorMessageTestId,
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import "./EmojiRadioButton.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { memo, forwardRef } from 'react';
|
|
5
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
6
5
|
import Emoji from './Emoji';
|
|
7
6
|
import { TONESELECTOR_KEYBOARD_KEYS_SUPPORTED } from '../../util/constants';
|
|
8
7
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
@@ -12,7 +11,7 @@ const emojiRadio = {
|
|
|
12
11
|
default: "_tzy4idpf _kqswstnw _154i14id _1ltv14id _3y8mfajl _157z1r31 _1dzmglyw _1sqm1o36 _fh6w1y54 _1i1213zc"
|
|
13
12
|
};
|
|
14
13
|
const handleKeyDown = (props, event) => {
|
|
15
|
-
if ((event.key === 'ArrowLeft' || event.key === 'ArrowRight') &&
|
|
14
|
+
if ((event.key === 'ArrowLeft' || event.key === 'ArrowRight') && expValEqualsNoExposure('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', true)) {
|
|
16
15
|
var _props$onArrowKey;
|
|
17
16
|
event.preventDefault();
|
|
18
17
|
event.stopPropagation();
|
|
@@ -51,7 +50,7 @@ export const EmojiRadioButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
51
50
|
return (_props$onSelected = props.onSelected) === null || _props$onSelected === void 0 ? void 0 : _props$onSelected.call(props);
|
|
52
51
|
},
|
|
53
52
|
onKeyDown: event => handleKeyDown(props, event),
|
|
54
|
-
onChange:
|
|
53
|
+
onChange: expValEqualsNoExposure('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', true) ? e => e.preventDefault() : undefined,
|
|
55
54
|
className: ax([emojiRadio.default])
|
|
56
55
|
}), /*#__PURE__*/React.createElement(Emoji, {
|
|
57
56
|
emoji: emoji,
|
|
@@ -9,7 +9,6 @@ import CrossIcon from '@atlaskit/icon/core/cross';
|
|
|
9
9
|
import AkButton from '@atlaskit/button/standard-button';
|
|
10
10
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
11
11
|
import FocusLock from 'react-focus-lock';
|
|
12
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
13
12
|
import * as ImageUtil from '../../util/image';
|
|
14
13
|
import debug from '../../util/logger';
|
|
15
14
|
import { messages } from '../i18n';
|
|
@@ -18,6 +17,7 @@ import EmojiUploadPreview from './EmojiUploadPreview';
|
|
|
18
17
|
import FileChooser from './FileChooser';
|
|
19
18
|
import { UploadStatus } from './internal-types';
|
|
20
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
21
21
|
import Button from '@atlaskit/button/new';
|
|
22
22
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
23
23
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
@@ -56,7 +56,7 @@ const toDefaultUploadName = fileName => {
|
|
|
56
56
|
return sanitizeName(nameWithoutExtension).slice(0, maxNameLength);
|
|
57
57
|
};
|
|
58
58
|
const isSupportedEmojiUploadFileType = file => {
|
|
59
|
-
if (!
|
|
59
|
+
if (!expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
60
60
|
return true;
|
|
61
61
|
}
|
|
62
62
|
if (supportedEmojiUploadMimeTypes.has(file.type)) {
|
|
@@ -103,7 +103,7 @@ const ChooseEmojiFile = /*#__PURE__*/memo(props => {
|
|
|
103
103
|
const emojiChooseFileTitleNew = formatMessage(messages.emojiChooseFileDndTitle);
|
|
104
104
|
const isUploading = uploadStatus === UploadStatus.Uploading;
|
|
105
105
|
const addEmojiDisabled = !previewImage || !name || isUploading;
|
|
106
|
-
return
|
|
106
|
+
return expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
107
107
|
"data-testid": uploadEmojiComponentTestId,
|
|
108
108
|
className: ax(["_ca0qu2gc _u5f3pxbi _n3tdu2gc _19bvpxbi _1e0c1txw _2lx21bp4 _1bah1b1v"])
|
|
109
109
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -114,7 +114,7 @@ const ChooseEmojiFile = /*#__PURE__*/memo(props => {
|
|
|
114
114
|
}, previewImage ? /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiPreviewTitle) : /*#__PURE__*/React.createElement(FormattedMessage, messages.addCustomEmojiLabel))), /*#__PURE__*/React.createElement("div", {
|
|
115
115
|
className: ax(["_zulp12x7 _1e0c1txw _2lx21bp4 _1tker0r7"])
|
|
116
116
|
}, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiChooseFileScreenReaderDescription, () => /*#__PURE__*/React.createElement(FileChooser, {
|
|
117
|
-
label:
|
|
117
|
+
label: expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? emojiChooseFileTitleNew : emojiChooseFileTitle,
|
|
118
118
|
onChange: onChooseFile,
|
|
119
119
|
onClick: onClick,
|
|
120
120
|
accept: "image/png,image/jpeg,image/gif",
|
|
@@ -197,7 +197,7 @@ const ChooseEmojiFile = /*#__PURE__*/memo(props => {
|
|
|
197
197
|
id: "new-emoji-name-input",
|
|
198
198
|
"aria-required": true
|
|
199
199
|
})), /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiChooseFileScreenReaderDescription, () => /*#__PURE__*/React.createElement(FileChooser, {
|
|
200
|
-
label:
|
|
200
|
+
label: expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? emojiChooseFileTitleNew : emojiChooseFileTitle,
|
|
201
201
|
onChange: onChooseFile,
|
|
202
202
|
onClick: onClick,
|
|
203
203
|
accept: "image/png,image/jpeg,image/gif",
|
|
@@ -301,7 +301,7 @@ const EmojiUploadPicker = props => {
|
|
|
301
301
|
const onFileLoad = useCallback(file => async f => {
|
|
302
302
|
try {
|
|
303
303
|
setFilename(file.name);
|
|
304
|
-
if (!name &&
|
|
304
|
+
if (!name && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
305
305
|
setName(toDefaultUploadName(file.name));
|
|
306
306
|
}
|
|
307
307
|
await ImageUtil.parseImage(f.target.result);
|
|
@@ -354,8 +354,8 @@ const EmojiUploadPicker = props => {
|
|
|
354
354
|
const onChooseFileClicked = () => {
|
|
355
355
|
onFileChooserClicked && onFileChooserClicked();
|
|
356
356
|
};
|
|
357
|
-
const isDuplicateNameError = errorMessage !== null && errorMessage !== undefined &&
|
|
358
|
-
const content = name && previewImage && !
|
|
357
|
+
const isDuplicateNameError = errorMessage !== null && errorMessage !== undefined && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
358
|
+
const content = name && previewImage && !expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement(EmojiUploadPreview, {
|
|
359
359
|
errorMessage: errorMessage,
|
|
360
360
|
name: name,
|
|
361
361
|
onAddEmoji: onAddEmoji,
|
|
@@ -375,7 +375,7 @@ const EmojiUploadPicker = props => {
|
|
|
375
375
|
nameErrorMessage: isDuplicateNameError ? errorMessage : undefined,
|
|
376
376
|
intl: intl
|
|
377
377
|
});
|
|
378
|
-
return disableFocusLock ||
|
|
378
|
+
return disableFocusLock || expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? content : /*#__PURE__*/React.createElement(FocusLock, {
|
|
379
379
|
noFocusGuards: true
|
|
380
380
|
}, content);
|
|
381
381
|
};
|
|
@@ -4,9 +4,9 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
5
|
import Button from '@atlaskit/button/new';
|
|
6
6
|
import UploadIcon from '@atlaskit/icon/core/upload';
|
|
7
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
8
7
|
import { dropTargetForExternal } from '@atlaskit/pragmatic-drag-and-drop/external/adapter';
|
|
9
8
|
import { containsFiles, getFiles } from '@atlaskit/pragmatic-drag-and-drop/external/file';
|
|
9
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
10
10
|
export const chooseFileButtonTestId = 'choose-file-button';
|
|
11
11
|
export const fileUploadInputTestId = 'file-upload';
|
|
12
12
|
export const dropzoneTestId = 'file-dropzone';
|
|
@@ -60,7 +60,7 @@ const FileChooser = props => {
|
|
|
60
60
|
}, [onChange]);
|
|
61
61
|
useEffect(() => {
|
|
62
62
|
const element = dropzoneRef.current;
|
|
63
|
-
if (!element || !
|
|
63
|
+
if (!element || !expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
const suppressNativeFileDrop = event => {
|
|
@@ -161,7 +161,7 @@ const FileChooser = props => {
|
|
|
161
161
|
},
|
|
162
162
|
"data-testid": fileUploadInputTestId
|
|
163
163
|
});
|
|
164
|
-
if (
|
|
164
|
+
if (expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
165
165
|
return /*#__PURE__*/React.createElement("div", {
|
|
166
166
|
ref: dropzoneRef,
|
|
167
167
|
"data-testid": dropzoneTestId,
|
|
@@ -3,7 +3,6 @@ import "./TonePreviewButton.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { forwardRef, memo } from 'react';
|
|
6
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
7
6
|
import Emoji from './Emoji';
|
|
8
7
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
8
|
export const tonePreviewTestId = 'tone-preview';
|
|
@@ -23,7 +22,7 @@ export const TonePreviewButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
23
22
|
isVisible = true
|
|
24
23
|
} = props;
|
|
25
24
|
const fitToHeight = expValEqualsNoExposure('platform_use_unicode_emojis', 'isEnabled', true) ? 24 : undefined;
|
|
26
|
-
return
|
|
25
|
+
return expValEqualsNoExposure('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', true) ? /*#__PURE__*/React.createElement("button", {
|
|
27
26
|
ref: ref,
|
|
28
27
|
onClick: onSelected,
|
|
29
28
|
onKeyDown: onKeyDown,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* ToneSelector.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import "./ToneSelector.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
4
5
|
import React, { memo, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
5
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
6
6
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
7
|
import { createAndFireEventInElementsChannel, toneSelectedEvent, toneSelectorOpenedEvent } from '../../util/analytics';
|
|
8
8
|
import { setSkinToneAriaLabelText } from './setSkinToneAriaLabelText';
|
|
@@ -92,7 +92,7 @@ export const ToneSelectorInternal = props => {
|
|
|
92
92
|
"aria-label": formatMessage(messages.emojiSelectSkinToneListAriaLabelText),
|
|
93
93
|
className: ax([!isVisible && "_tzy4idpf _3um015vq _1e0cglyw"])
|
|
94
94
|
}, emojiToneCollection.map((tone, renderIndex) => {
|
|
95
|
-
return
|
|
95
|
+
return expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement(EmojiRadioButton, {
|
|
96
96
|
ref: el => {
|
|
97
97
|
radioRefs.current[renderIndex] = el;
|
|
98
98
|
if (tone.isSelected && selectedToneRadioRef) {
|
|
@@ -7,8 +7,8 @@ import { cx } from '@atlaskit/css';
|
|
|
7
7
|
import { useIntl } from 'react-intl';
|
|
8
8
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
9
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
10
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
10
11
|
import { CATEGORYSELECTOR_KEYBOARD_KEYS_SUPPORTED, defaultCategories, KeyboardKeys } from '../../util/constants';
|
|
11
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
12
12
|
import { messages } from '../i18n';
|
|
13
13
|
import { CategoryDescriptionMap, CategoryDescriptionMapNew } from './categories';
|
|
14
14
|
import { usePrevious } from '../../hooks/usePrevious';
|
|
@@ -32,7 +32,7 @@ const addNewCategories = (oldCategories, newCategories) => {
|
|
|
32
32
|
if (!newCategories) {
|
|
33
33
|
return oldCategories;
|
|
34
34
|
}
|
|
35
|
-
return oldCategories.concat(newCategories.filter(category => !!(
|
|
35
|
+
return oldCategories.concat(newCategories.filter(category => !!(expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? CategoryDescriptionMapNew : CategoryDescriptionMap)[category])).sort(expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? sortCategoriesNew : sortCategories);
|
|
36
36
|
};
|
|
37
37
|
export const categorySelectorComponentTestId = 'category-selector-component';
|
|
38
38
|
export const categorySelectorCategoryTestId = categoryId => `category-selector-${categoryId}`;
|
|
@@ -103,14 +103,14 @@ const CategorySelector = props => {
|
|
|
103
103
|
};
|
|
104
104
|
let categoriesSection;
|
|
105
105
|
if (categories) {
|
|
106
|
-
categoriesSection =
|
|
106
|
+
categoriesSection = expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
107
107
|
role: "tablist",
|
|
108
108
|
"aria-label": formatMessage(messages.categoriesSelectorLabel),
|
|
109
109
|
"data-testid": categorySelectorComponentTestId,
|
|
110
110
|
ref: categoryRef,
|
|
111
111
|
className: ax(["_ca0qze3t _n3tdze3t _19bvu2gc _u5f3u2gc _1e0c1txw _2lx2vrvc _1bah1b1v _4cvr1fhb"])
|
|
112
112
|
}, categories.map((categoryId, index) => {
|
|
113
|
-
const category =
|
|
113
|
+
const category = expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? CategoryDescriptionMapNew[categoryId] : CategoryDescriptionMap[categoryId];
|
|
114
114
|
const Icon = category.icon;
|
|
115
115
|
const categoryName = formatMessage(messages[category.name]);
|
|
116
116
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -140,7 +140,7 @@ const CategorySelector = props => {
|
|
|
140
140
|
ref: categoryRef,
|
|
141
141
|
className: ax(["_ca0q12x7 _n3td12x7 _19bvu2gc _u5f3u2gc _1e0c1txw _2lx2vrvc _1bah1b1v _4cvr1h6o"])
|
|
142
142
|
}, categories.map((categoryId, index) => {
|
|
143
|
-
const category =
|
|
143
|
+
const category = expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? CategoryDescriptionMapNew[categoryId] : CategoryDescriptionMap[categoryId];
|
|
144
144
|
const Icon = category.icon;
|
|
145
145
|
const categoryName = formatMessage(messages[category.name]);
|
|
146
146
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -165,7 +165,7 @@ const CategorySelector = props => {
|
|
|
165
165
|
})));
|
|
166
166
|
}));
|
|
167
167
|
}
|
|
168
|
-
return
|
|
168
|
+
return expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
169
169
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _bfhkvuon _13li1mok _qrwq1mok _ca0qze3t _n3tdze3t _1doce4h9 _1il9nqa1 _1o3i1l7x _dpd31txw"])
|
|
170
170
|
}, categoriesSection) : /*#__PURE__*/React.createElement("div", {
|
|
171
171
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _bfhkhfxm _dpd31txw"])
|
|
@@ -5,7 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
7
|
import { ufoExperiences } from '../../util/analytics';
|
|
8
|
-
import
|
|
8
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
9
9
|
import LoadingEmojiComponent from '../common/LoadingEmojiComponent';
|
|
10
10
|
import { LoadingItem } from './EmojiPickerVirtualItems';
|
|
11
11
|
import { UfoErrorBoundary } from '../common/UfoErrorBoundary';
|
|
@@ -42,7 +42,7 @@ export class EmojiPickerInternal extends LoadingEmojiComponent {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
ufoExperiences['emoji-picker-opened'].markFMP();
|
|
45
|
-
return
|
|
45
|
+
return expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
46
46
|
ref: handlePickerRef,
|
|
47
47
|
className: ax(["_19itahnd _2rko1mok _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qs130s _4t3iixjv _1bsb1edt _1ul91edt _1tke5x59 _c71l1y6z"])
|
|
48
48
|
}, item.renderItem()) : /*#__PURE__*/React.createElement("div", {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import "./EmojiPickerComponent.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
5
6
|
import { useCallback, useEffect, useMemo, useRef, useState, createRef, memo } from 'react';
|
|
6
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
7
7
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
8
8
|
import { dropTargetForExternal, monitorForExternal } from '@atlaskit/pragmatic-drag-and-drop/external/adapter';
|
|
9
9
|
import { containsFiles } from '@atlaskit/pragmatic-drag-and-drop/external/file';
|
|
@@ -80,7 +80,7 @@ const EmojiPickerComponent = ({
|
|
|
80
80
|
emojiProvider,
|
|
81
81
|
isUploadSupported
|
|
82
82
|
} = useEmoji();
|
|
83
|
-
const isTeamojiExperimentEnabled =
|
|
83
|
+
const isTeamojiExperimentEnabled = expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
84
84
|
const [filteredEmojis, setFilteredEmojis] = useState([]);
|
|
85
85
|
const [searchEmojis, setSearchEmojis] = useState([]);
|
|
86
86
|
const [frequentlyUsedEmojis, setFrequentlyUsedEmojis] = useState([]);
|
|
@@ -124,7 +124,7 @@ const EmojiPickerComponent = ({
|
|
|
124
124
|
}
|
|
125
125
|
}, [selectedEmoji]);
|
|
126
126
|
const onEmojiLeave = useCallback(() => {
|
|
127
|
-
if (
|
|
127
|
+
if (expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
128
128
|
setSelectedEmoji(undefined);
|
|
129
129
|
}
|
|
130
130
|
}, []);
|
|
@@ -132,16 +132,16 @@ const EmojiPickerComponent = ({
|
|
|
132
132
|
// Ignore scroll-driven category changes while a programmatic reveal()
|
|
133
133
|
// scroll is in progress — they would flicker the indicator through
|
|
134
134
|
// intermediate categories before landing on the correct one.
|
|
135
|
-
if (isProgrammaticScroll.current &&
|
|
135
|
+
if (isProgrammaticScroll.current && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
138
|
// Ignore scroll-driven category changes while the upload or delete screen is open
|
|
139
|
-
if ((uploading || emojiToDelete) &&
|
|
139
|
+
if ((uploading || emojiToDelete) && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
142
|
if (activeCategory !== category) {
|
|
143
143
|
setActiveCategory(category);
|
|
144
|
-
if (!query &&
|
|
144
|
+
if (!query && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
145
145
|
lastNonSearchCategory.current = category;
|
|
146
146
|
}
|
|
147
147
|
}
|
|
@@ -158,7 +158,7 @@ const EmojiPickerComponent = ({
|
|
|
158
158
|
setUploadErrorMessage(undefined);
|
|
159
159
|
});
|
|
160
160
|
fireAnalytics(uploadCancelButton());
|
|
161
|
-
if (
|
|
161
|
+
if (expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
162
162
|
setTimeout(() => {
|
|
163
163
|
var _getDocument, _getDocument$getEleme;
|
|
164
164
|
(_getDocument = getDocument()) === null || _getDocument === void 0 ? void 0 : (_getDocument$getEleme = _getDocument.getElementById('add-custom-emoji')) === null || _getDocument$getEleme === void 0 ? void 0 : _getDocument$getEleme.focus();
|
|
@@ -310,7 +310,7 @@ const EmojiPickerComponent = ({
|
|
|
310
310
|
}
|
|
311
311
|
|
|
312
312
|
// If the upload or delete screen is open, close it when a category is selected
|
|
313
|
-
if (
|
|
313
|
+
if (expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
314
314
|
if (uploading) {
|
|
315
315
|
setUploading(false);
|
|
316
316
|
setUploadErrorMessage(undefined);
|
|
@@ -366,7 +366,7 @@ const EmojiPickerComponent = ({
|
|
|
366
366
|
};
|
|
367
367
|
if (searchQuery !== query) {
|
|
368
368
|
// Capture the active category before entering search so we can keep it highlighted
|
|
369
|
-
if (!query && searchQuery &&
|
|
369
|
+
if (!query && searchQuery && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
370
370
|
lastNonSearchCategory.current = activeCategory;
|
|
371
371
|
}
|
|
372
372
|
setQuery(searchQuery);
|
|
@@ -382,7 +382,7 @@ const EmojiPickerComponent = ({
|
|
|
382
382
|
// cannot reach underlying page drop handlers (e.g. the Confluence editor).
|
|
383
383
|
useEffect(() => {
|
|
384
384
|
var _getDocument2;
|
|
385
|
-
if (!uploading || !
|
|
385
|
+
if (!uploading || !expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
386
386
|
return;
|
|
387
387
|
}
|
|
388
388
|
const body = (_getDocument2 = getDocument()) === null || _getDocument2 === void 0 ? void 0 : _getDocument2.body;
|
|
@@ -442,7 +442,7 @@ const EmojiPickerComponent = ({
|
|
|
442
442
|
});
|
|
443
443
|
scrollToUploadedEmoji(emojiDescription);
|
|
444
444
|
};
|
|
445
|
-
if (
|
|
445
|
+
if (expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
446
446
|
const uploadShortName = `:${upload.name.toLowerCase()}:`;
|
|
447
447
|
const existing = await emojiProvider.findByShortName(uploadShortName);
|
|
448
448
|
if (existing) {
|
|
@@ -561,14 +561,14 @@ const EmojiPickerComponent = ({
|
|
|
561
561
|
emojiProvider.unsubscribe(onProviderChange);
|
|
562
562
|
};
|
|
563
563
|
}, [emojiProvider, onProviderChange]);
|
|
564
|
-
const showPreview =
|
|
564
|
+
const showPreview = expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? !uploading : selectedEmoji && !uploading;
|
|
565
565
|
return /*#__PURE__*/React.createElement("div", {
|
|
566
566
|
ref: setPickerRef,
|
|
567
567
|
"data-emoji-picker-container": true,
|
|
568
568
|
role: "dialog",
|
|
569
569
|
"aria-label": formatMessage(messages.emojiPickerTitle),
|
|
570
570
|
"aria-modal": true,
|
|
571
|
-
className: ax([
|
|
571
|
+
className: ax([expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? "_19itahnd _2rko1mok _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qs130s _4t3iaq3k _1bsb1edt _1ul91edt _c71l1y6z _kqswh2mm" : "_19itahnd _2rkofajl _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qs130s _4t3iaq3k _1bsb1edt _1ul91edt _c71l1y6z _kqswh2mm", !!emojiToDelete && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? withDeleteRefreshHeight[size] : uploading && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? withUploadRefreshHeight[size] : query && filteredEmojis.length === 0 && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? withNoResultsRefreshHeight[size] : showPreview ? withPreviewHeight[size] : withoutPreviewHeight[size]])
|
|
572
572
|
}, /*#__PURE__*/React.createElement("div", {
|
|
573
573
|
role: "presentation",
|
|
574
574
|
onKeyPress: suppressKeyPress,
|
|
@@ -576,7 +576,7 @@ const EmojiPickerComponent = ({
|
|
|
576
576
|
onKeyDown: suppressKeyPress,
|
|
577
577
|
className: ax(["_16jlkb7n _1o9zkb7n _i0dlf1ug _1reo15vq _18m915vq _1e0c1txw _2lx21bp4 _1bah1yb4 _1tkeidpf"])
|
|
578
578
|
}, /*#__PURE__*/React.createElement(CategorySelector, {
|
|
579
|
-
activeCategoryId: (uploading || emojiToDelete) &&
|
|
579
|
+
activeCategoryId: (uploading || emojiToDelete) && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? null : activeCategory,
|
|
580
580
|
dynamicCategories: dynamicCategories,
|
|
581
581
|
disableCategories: disableCategories,
|
|
582
582
|
onCategorySelected: onCategorySelected
|
|
@@ -611,7 +611,7 @@ const EmojiPickerComponent = ({
|
|
|
611
611
|
onOpenUpload: onOpenUpload,
|
|
612
612
|
size: size,
|
|
613
613
|
activeCategoryId: activeCategory
|
|
614
|
-
}), showPreview && !(emojiToDelete &&
|
|
614
|
+
}), showPreview && !(emojiToDelete && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) && !(query && filteredEmojis.length === 0 && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) && /*#__PURE__*/React.createElement(EmojiPickerFooter, {
|
|
615
615
|
selectedEmoji: selectedEmoji,
|
|
616
616
|
uploadEnabled: isUploadSupported && !uploading,
|
|
617
617
|
onOpenUpload: onOpenUpload
|
|
@@ -5,7 +5,6 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { memo } from 'react';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
9
8
|
import { useIntl } from 'react-intl';
|
|
10
9
|
import CachingEmoji from '../common/CachingEmoji';
|
|
11
10
|
import { useEmojiPickerListContext } from '../../hooks/useEmojiPickerListContext';
|
|
@@ -14,7 +13,6 @@ import { messages } from '../i18n';
|
|
|
14
13
|
const emojiItem = null;
|
|
15
14
|
const emojiPickerRow = null;
|
|
16
15
|
const emojiPickerRowList = null;
|
|
17
|
-
const teamojiRefreshExperimentName = 'platform_teamoji_26_refresh_emoji_picker';
|
|
18
16
|
const EmojiPickerEmojiRow = ({
|
|
19
17
|
emojis,
|
|
20
18
|
onSelected,
|
|
@@ -35,7 +33,7 @@ const EmojiPickerEmojiRow = ({
|
|
|
35
33
|
formatMessage
|
|
36
34
|
} = useIntl();
|
|
37
35
|
const fitToHeight = expValEqualsNoExposure('platform_use_unicode_emojis', 'isEnabled', true) ? 24 : undefined;
|
|
38
|
-
const preventFocusOnMouseDown =
|
|
36
|
+
const preventFocusOnMouseDown = expValEqualsNoExposure('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', true);
|
|
39
37
|
const handleFocus = index => (emojiId, emoji, event) => {
|
|
40
38
|
setEmojisFocus({
|
|
41
39
|
rowIndex,
|
|
@@ -5,9 +5,9 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import { memo } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
9
8
|
import { EmojiPreviewComponent } from '../common/EmojiPreviewComponent';
|
|
10
9
|
import { AddOwnEmoji } from '../common/AddEmoji';
|
|
10
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
11
11
|
const emojiPickerFooter = null;
|
|
12
12
|
const emojiPickerFooterWithTopShadow = null;
|
|
13
13
|
const emojiPickerFooterWithTopShadowNew = null;
|
|
@@ -21,7 +21,7 @@ const EmojiPickerFooter = ({
|
|
|
21
21
|
uploadEnabled
|
|
22
22
|
}) => {
|
|
23
23
|
const intl = useIntl();
|
|
24
|
-
return
|
|
24
|
+
return expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
25
25
|
"data-testid": emojiPickerFooterTestId,
|
|
26
26
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug", "_x3doia51"])
|
|
27
27
|
}, selectedEmoji ? /*#__PURE__*/React.createElement(Box, {
|