@atlaskit/editor-common 120.9.0 → 120.10.1
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 +25 -0
- package/dist/cjs/block-controls/surface-keys.js +9 -1
- package/dist/cjs/card/ui/assets/card.js +2 -2
- package/dist/cjs/card/ui/assets/embed.js +2 -2
- package/dist/cjs/card/ui/assets/inline.js +2 -2
- package/dist/cjs/card/ui/assets/url.js +2 -2
- package/dist/cjs/extensibility/Extension/Extension/index.js +2 -1
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +2 -1
- package/dist/cjs/extensions/UnknownMacroPlaceholder.js +2 -2
- package/dist/cjs/link/ConfigureLinkOverlay/Dropdown.js +2 -2
- package/dist/cjs/link/LinkPicker/EditorLinkPicker/index.js +3 -2
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/index.js +3 -3
- package/dist/cjs/media-inline/inline-image-card.js +2 -2
- package/dist/cjs/media-inline/media-inline-image-card.js +5 -5
- package/dist/cjs/media-single/CommentBadge.js +2 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/rank.js +4 -4
- package/dist/cjs/resizer/BreakoutResizer.js +8 -8
- package/dist/cjs/resizer/Resizer.js +3 -2
- package/dist/cjs/toolbar/context.js +2 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/HoverLinkOverlay/index.js +2 -1
- package/dist/cjs/ui/Mention/index.js +1 -2
- package/dist/cjs/ui/TableSelector/index.js +5 -5
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +8 -8
- package/dist/cjs/ui-menu/DropdownMenu/index.js +6 -5
- package/dist/cjs/ui-menu/ToolbarButton/styles.js +2 -2
- package/dist/es2019/block-controls/surface-keys.js +8 -0
- package/dist/es2019/card/ui/assets/card.js +2 -2
- package/dist/es2019/card/ui/assets/embed.js +2 -2
- package/dist/es2019/card/ui/assets/inline.js +2 -2
- package/dist/es2019/card/ui/assets/url.js +2 -2
- package/dist/es2019/extensibility/Extension/Extension/index.js +2 -1
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +2 -1
- package/dist/es2019/extensions/UnknownMacroPlaceholder.js +2 -2
- package/dist/es2019/link/ConfigureLinkOverlay/Dropdown.js +2 -2
- package/dist/es2019/link/LinkPicker/EditorLinkPicker/index.js +3 -2
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/index.js +3 -3
- package/dist/es2019/media-inline/inline-image-card.js +2 -2
- package/dist/es2019/media-inline/media-inline-image-card.js +4 -4
- package/dist/es2019/media-single/CommentBadge.js +2 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/rank.js +10 -10
- package/dist/es2019/resizer/BreakoutResizer.js +3 -3
- package/dist/es2019/resizer/Resizer.js +3 -3
- package/dist/es2019/toolbar/context.js +2 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/HoverLinkOverlay/index.js +2 -1
- package/dist/es2019/ui/Mention/index.js +1 -2
- package/dist/es2019/ui/TableSelector/index.js +3 -3
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +7 -7
- package/dist/es2019/ui-menu/DropdownMenu/index.js +6 -5
- package/dist/es2019/ui-menu/ToolbarButton/styles.js +2 -2
- package/dist/esm/block-controls/surface-keys.js +8 -0
- package/dist/esm/card/ui/assets/card.js +2 -2
- package/dist/esm/card/ui/assets/embed.js +2 -2
- package/dist/esm/card/ui/assets/inline.js +2 -2
- package/dist/esm/card/ui/assets/url.js +2 -2
- package/dist/esm/extensibility/Extension/Extension/index.js +2 -1
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +2 -1
- package/dist/esm/extensions/UnknownMacroPlaceholder.js +2 -2
- package/dist/esm/link/ConfigureLinkOverlay/Dropdown.js +2 -2
- package/dist/esm/link/LinkPicker/EditorLinkPicker/index.js +3 -2
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/index.js +3 -3
- package/dist/esm/media-inline/inline-image-card.js +2 -2
- package/dist/esm/media-inline/media-inline-image-card.js +4 -4
- package/dist/esm/media-single/CommentBadge.js +2 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/rank.js +4 -4
- package/dist/esm/resizer/BreakoutResizer.js +3 -3
- package/dist/esm/resizer/Resizer.js +3 -3
- package/dist/esm/toolbar/context.js +2 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/HoverLinkOverlay/index.js +2 -1
- package/dist/esm/ui/Mention/index.js +1 -2
- package/dist/esm/ui/TableSelector/index.js +3 -3
- package/dist/esm/ui-menu/ColorPickerButton/index.js +7 -7
- package/dist/esm/ui-menu/DropdownMenu/index.js +6 -5
- package/dist/esm/ui-menu/ToolbarButton/styles.js +2 -2
- package/dist/types/block-controls/surface-keys.d.ts +8 -0
- package/package.json +2 -2
|
@@ -14,9 +14,9 @@ var _withAnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-
|
|
|
14
14
|
var _withAnalyticsEvents = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsEvents"));
|
|
15
15
|
var _button = _interopRequireDefault(require("@atlaskit/button/default/button"));
|
|
16
16
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
|
|
17
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
17
18
|
var _primitives = require("@atlaskit/primitives");
|
|
18
|
-
var
|
|
19
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
19
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
20
20
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
21
21
|
var _analytics = require("../../analytics");
|
|
22
22
|
var _colorPickerButton = require("../../messages/color-picker-button");
|
|
@@ -90,7 +90,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
90
90
|
var memoizedHandleClose = (0, _react.useCallback)(function () {
|
|
91
91
|
return setIsPopupOpen(false);
|
|
92
92
|
}, [setIsPopupOpen]);
|
|
93
|
-
var handleClose = (0,
|
|
93
|
+
var handleClose = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_perf_lint_cleanup') ? memoizedHandleClose : function () {
|
|
94
94
|
return setIsPopupOpen(false);
|
|
95
95
|
};
|
|
96
96
|
var memoizedTogglePopup = (0, _react.useCallback)(function () {
|
|
@@ -102,7 +102,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
102
102
|
return !prevIsOpen;
|
|
103
103
|
});
|
|
104
104
|
}, []);
|
|
105
|
-
var togglePopup = (0,
|
|
105
|
+
var togglePopup = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_perf_lint_cleanup') ? memoizedTogglePopup : function () {
|
|
106
106
|
setIsPopupOpen(!isPopupOpen);
|
|
107
107
|
if (!isPopupOpen) {
|
|
108
108
|
setIsOpenedByKeyboard(false);
|
|
@@ -116,7 +116,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
116
116
|
setIsOpenedByKeyboard(true);
|
|
117
117
|
}
|
|
118
118
|
}, [memoizedTogglePopup]);
|
|
119
|
-
var onKeyDown = (0,
|
|
119
|
+
var onKeyDown = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_perf_lint_cleanup') ? memoizedOnKeyDown : function (event) {
|
|
120
120
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
121
121
|
event.preventDefault();
|
|
122
122
|
togglePopup();
|
|
@@ -130,7 +130,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
130
130
|
paletteColorTooltipMessages: props.paletteColorTooltipMessages
|
|
131
131
|
};
|
|
132
132
|
}, [props.colorPalette, props.hexToPaletteColor, props.paletteColorTooltipMessages]);
|
|
133
|
-
var paletteOptions = (0,
|
|
133
|
+
var paletteOptions = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_perf_lint_cleanup') ? memoizedPaletteOptions : {
|
|
134
134
|
palette: props.colorPalette,
|
|
135
135
|
hexToPaletteColor: props.hexToPaletteColor,
|
|
136
136
|
paletteColorTooltipMessages: props.paletteColorTooltipMessages
|
|
@@ -201,7 +201,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
201
201
|
target: buttonRef.current,
|
|
202
202
|
fitHeight: 350,
|
|
203
203
|
fitWidth: 350,
|
|
204
|
-
offset: (0,
|
|
204
|
+
offset: (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_perf_lint_cleanup') ? COLOR_PICKER_POPUP_OFFSET : [0, 10],
|
|
205
205
|
alignX: props.alignX,
|
|
206
206
|
mountTo: props.setDisableParentScroll ? props.mountPoint : undefined,
|
|
207
207
|
absoluteOffset: props.absoluteOffset
|
|
@@ -272,7 +272,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
272
272
|
ref: buttonRef,
|
|
273
273
|
"aria-label": title,
|
|
274
274
|
"aria-expanded": props.isAriaExpanded ? isPopupOpen : undefined,
|
|
275
|
-
spacing: (0,
|
|
275
|
+
spacing: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? 'default' : 'compact',
|
|
276
276
|
onClick: togglePopup,
|
|
277
277
|
onKeyDown: onKeyDown,
|
|
278
278
|
"data-selected-color": props.currentColor,
|
|
@@ -24,6 +24,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
24
24
|
var _customItem = _interopRequireDefault(require("@atlaskit/menu/custom-item"));
|
|
25
25
|
var _menuGroup = _interopRequireDefault(require("@atlaskit/menu/menu-group"));
|
|
26
26
|
var _section = _interopRequireDefault(require("@atlaskit/menu/section"));
|
|
27
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
27
28
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
28
29
|
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
29
30
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
@@ -311,7 +312,7 @@ function DropdownMenuItem(_ref) {
|
|
|
311
312
|
item: item
|
|
312
313
|
});
|
|
313
314
|
}, [onItemActivated, item]);
|
|
314
|
-
var onClick = (0,
|
|
315
|
+
var onClick = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_perf_lint_cleanup') ? memoizedOnClick : function () {
|
|
315
316
|
return onItemActivated && onItemActivated({
|
|
316
317
|
item: item
|
|
317
318
|
});
|
|
@@ -319,7 +320,7 @@ function DropdownMenuItem(_ref) {
|
|
|
319
320
|
var memoizedOnMouseDown = (0, _react.useCallback)(function (e) {
|
|
320
321
|
e.preventDefault();
|
|
321
322
|
}, []);
|
|
322
|
-
var onMouseDown = (0,
|
|
323
|
+
var onMouseDown = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_perf_lint_cleanup') ? memoizedOnMouseDown : function (e) {
|
|
323
324
|
e.preventDefault();
|
|
324
325
|
};
|
|
325
326
|
var memoizedOnMouseEnter = (0, _react.useCallback)(function () {
|
|
@@ -327,7 +328,7 @@ function DropdownMenuItem(_ref) {
|
|
|
327
328
|
item: item
|
|
328
329
|
});
|
|
329
330
|
}, [onMouseEnter, item]);
|
|
330
|
-
var onMouseEnterHandler = (0,
|
|
331
|
+
var onMouseEnterHandler = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_perf_lint_cleanup') ? memoizedOnMouseEnter : function () {
|
|
331
332
|
return onMouseEnter && onMouseEnter({
|
|
332
333
|
item: item
|
|
333
334
|
});
|
|
@@ -337,7 +338,7 @@ function DropdownMenuItem(_ref) {
|
|
|
337
338
|
item: item
|
|
338
339
|
});
|
|
339
340
|
}, [onMouseLeave, item]);
|
|
340
|
-
var onMouseLeaveHandler = (0,
|
|
341
|
+
var onMouseLeaveHandler = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_perf_lint_cleanup') ? memoizedOnMouseLeave : function () {
|
|
341
342
|
return onMouseLeave && onMouseLeave({
|
|
342
343
|
item: item
|
|
343
344
|
});
|
|
@@ -412,7 +413,7 @@ function (_ref2) {
|
|
|
412
413
|
keyDownHandlerContext: keyDownHandlerContext
|
|
413
414
|
});
|
|
414
415
|
}, [props.arrowKeyNavigationProviderOptions, keyDownHandlerContext]);
|
|
415
|
-
var arrowKeyNavOptions = (0,
|
|
416
|
+
var arrowKeyNavOptions = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_perf_lint_cleanup') ? memoizedArrowKeyNavOptions : _objectSpread(_objectSpread({}, props.arrowKeyNavigationProviderOptions), {}, {
|
|
416
417
|
keyDownHandlerContext: keyDownHandlerContext
|
|
417
418
|
});
|
|
418
419
|
return (0, _react2.jsx)(DropdownMenuWrapper, (0, _extends2.default)({
|
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
11
|
-
var
|
|
11
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
12
12
|
// If you make any change here, copy it to above file as well
|
|
13
13
|
// and notify about the change in #team-fc-editor-ai-dev channel.
|
|
14
14
|
|
|
@@ -25,7 +25,7 @@ var _default_1 = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
25
25
|
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
26
26
|
// TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
|
|
27
27
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
28
|
-
style: (0,
|
|
28
|
+
style: (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_perf_lint_cleanup') ? toolbarButtonStyle : {
|
|
29
29
|
alignItems: 'center'
|
|
30
30
|
}
|
|
31
31
|
}));
|
|
@@ -17,4 +17,12 @@ export const BLOCK_CONTROLS_LEFT_SECTION = {
|
|
|
17
17
|
export const BLOCK_CONTROLS_LEFT_GROUP = {
|
|
18
18
|
key: 'block-controls-left-group',
|
|
19
19
|
type: 'group'
|
|
20
|
+
};
|
|
21
|
+
export const BLOCK_CONTROLS_RIGHT_SECTION = {
|
|
22
|
+
key: 'block-controls-right-section',
|
|
23
|
+
type: 'section'
|
|
24
|
+
};
|
|
25
|
+
export const BLOCK_CONTROLS_RIGHT_GROUP = {
|
|
26
|
+
key: 'block-controls-right-group',
|
|
27
|
+
type: 'group'
|
|
20
28
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
3
3
|
|
|
4
4
|
// Custom icon ejection - these icons have been migrated away from the deprecated Custom / SVG components to native SVG. Please review whether this icon should be contributed to @atlaskit/icon-lab or whether it can be replaced by an existing icon from either @atlaskit/icon or @atlaskit/icon-lab
|
|
5
5
|
const IconCardGlyph = ({
|
|
@@ -30,7 +30,7 @@ const iconCardStyle = {
|
|
|
30
30
|
export const IconCard = ({
|
|
31
31
|
label
|
|
32
32
|
}) => {
|
|
33
|
-
const style =
|
|
33
|
+
const style = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? iconCardStyle :
|
|
34
34
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props
|
|
35
35
|
{
|
|
36
36
|
width: '24px',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
3
3
|
|
|
4
4
|
// Custom icon ejection - these icons have been migrated away from the deprecated Custom / SVG components to native SVG. Please review whether this icon should be contributed to @atlaskit/icon-lab or whether it can be replaced by an existing icon from either @atlaskit/icon or @atlaskit/icon-lab
|
|
5
5
|
const IconEmbedGlyph = ({
|
|
@@ -30,7 +30,7 @@ const iconEmbedStyle = {
|
|
|
30
30
|
export const IconEmbed = ({
|
|
31
31
|
label
|
|
32
32
|
}) => {
|
|
33
|
-
const style =
|
|
33
|
+
const style = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? iconEmbedStyle :
|
|
34
34
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props
|
|
35
35
|
{
|
|
36
36
|
width: '24px',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
3
3
|
|
|
4
4
|
// Custom icon ejection - these icons have been migrated away from the deprecated Custom / SVG components to native SVG. Please review whether this icon should be contributed to @atlaskit/icon-lab or whether it can be replaced by an existing icon from either @atlaskit/icon or @atlaskit/icon-lab
|
|
5
5
|
const IconInlineGlyph = ({
|
|
@@ -30,7 +30,7 @@ const iconInlineStyle = {
|
|
|
30
30
|
export const IconInline = ({
|
|
31
31
|
label
|
|
32
32
|
}) => {
|
|
33
|
-
const style =
|
|
33
|
+
const style = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? iconInlineStyle :
|
|
34
34
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props
|
|
35
35
|
{
|
|
36
36
|
width: '24px',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
3
3
|
|
|
4
4
|
// Custom icon ejection - these icons have been migrated away from the deprecated Custom / SVG components to native SVG. Please review whether this icon should be contributed to @atlaskit/icon-lab or whether it can be replaced by an existing icon from either @atlaskit/icon or @atlaskit/icon-lab
|
|
5
5
|
const IconUrlGlyph = ({
|
|
@@ -32,7 +32,7 @@ const iconUrlStyle = {
|
|
|
32
32
|
export const IconUrl = ({
|
|
33
33
|
label
|
|
34
34
|
}) => {
|
|
35
|
-
const style =
|
|
35
|
+
const style = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? iconUrlStyle :
|
|
36
36
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props
|
|
37
37
|
{
|
|
38
38
|
width: '24px',
|
|
@@ -9,6 +9,7 @@ import React, { Fragment } from 'react';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import classnames from 'classnames';
|
|
12
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
12
13
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
13
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
15
|
import { useSharedPluginStateWithSelector } from '../../../hooks';
|
|
@@ -234,7 +235,7 @@ const Extension = props => {
|
|
|
234
235
|
width: width !== null && width !== void 0 ? width : 0,
|
|
235
236
|
lineLength
|
|
236
237
|
}), [width, lineLength]);
|
|
237
|
-
const widthState =
|
|
238
|
+
const widthState = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? memoizedWidthState : {
|
|
238
239
|
width: width !== null && width !== void 0 ? width : 0,
|
|
239
240
|
lineLength
|
|
240
241
|
};
|
|
@@ -10,6 +10,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
10
10
|
import classnames from 'classnames';
|
|
11
11
|
import { FormattedMessage, defineMessages } from 'react-intl';
|
|
12
12
|
import CustomizeIcon from '@atlaskit/icon/core/customize';
|
|
13
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
14
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
14
15
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
15
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -144,7 +145,7 @@ export const ExtensionLabel = ({
|
|
|
144
145
|
const memoizedTooltipValues = useMemo(() => ({
|
|
145
146
|
macroName: text
|
|
146
147
|
}), [text]);
|
|
147
|
-
const tooltipValues =
|
|
148
|
+
const tooltipValues = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? memoizedTooltipValues : {
|
|
148
149
|
macroName: text
|
|
149
150
|
};
|
|
150
151
|
return (
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useMemo } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
|
-
import {
|
|
7
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
8
8
|
import { messages } from './messages';
|
|
9
9
|
// Unknown macro placeholder styling aligned with Legacy Content Macro (LCM) for consistent look
|
|
10
10
|
const neutralBorder = "var(--ds-background-neutral, #0515240F)";
|
|
@@ -37,7 +37,7 @@ export function UnknownMacroPlaceholder({
|
|
|
37
37
|
return `${key} = ${value}`;
|
|
38
38
|
};
|
|
39
39
|
const memoizedVisibleParams = useMemo(() => Object.entries(macroParams).filter(([key]) => !key.startsWith('_')).map(([key, param]) => formatParam(key, param)).join(' | '), [macroParams]);
|
|
40
|
-
const visibleParams =
|
|
40
|
+
const visibleParams = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? memoizedVisibleParams :
|
|
41
41
|
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- intentional fallback for experiment off path
|
|
42
42
|
Object.entries(macroParamsOld).filter(([key]) => !key.startsWith('_')).map(([key, param]) => formatParamInline(key, param)).join(' | ');
|
|
43
43
|
const headerText = visibleParams ? `${intl.formatMessage(messages.unknownMacroHeader, {
|
|
@@ -14,7 +14,7 @@ import DropdownItemGroup from '@atlaskit/dropdown-menu/dropdown-menu-item-group'
|
|
|
14
14
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
15
15
|
import PreferencesIcon from '@atlaskit/icon/core/customize';
|
|
16
16
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
17
|
-
import {
|
|
17
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
18
18
|
import { cardMessages as messages } from '../../messages';
|
|
19
19
|
import { StyledButton } from './StyledButton';
|
|
20
20
|
import { useLinkOverlayAnalyticsEvents } from './useLinkOverlayAnalyticsEvents';
|
|
@@ -85,7 +85,7 @@ const Dropdown = ({
|
|
|
85
85
|
}
|
|
86
86
|
})), [configureLinkLabel, fireLinkClickEvent]);
|
|
87
87
|
return jsx(DropdownMenu, {
|
|
88
|
-
trigger:
|
|
88
|
+
trigger: isExperimentEnabled('platform_editor_perf_lint_cleanup') ? memoizedTrigger : ({
|
|
89
89
|
onClick,
|
|
90
90
|
triggerRef,
|
|
91
91
|
...props
|
|
@@ -3,6 +3,7 @@ import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
|
3
3
|
import FocusLock from 'react-focus-lock';
|
|
4
4
|
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
5
5
|
import { LazyLinkPicker } from '@atlaskit/link-picker/lazy';
|
|
6
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
6
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
8
|
import { getAnalyticsEditorAppearance } from '../../../utils';
|
|
8
9
|
import { useEscapeClickaway } from './useEscapeClickaway';
|
|
@@ -69,12 +70,12 @@ export const EditorLinkPicker = ({
|
|
|
69
70
|
// Below is added for the future implementation of Linking Platform namespaced analytic context
|
|
70
71
|
location: analyticsEditorAppearance
|
|
71
72
|
}), [invokeMethod, analyticsEditorAppearance]);
|
|
72
|
-
const returnFocus =
|
|
73
|
+
const returnFocus = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? PREVENT_SCROLL :
|
|
73
74
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- intentional fallback for experiment off path
|
|
74
75
|
{
|
|
75
76
|
preventScroll: true
|
|
76
77
|
};
|
|
77
|
-
const focusOptions =
|
|
78
|
+
const focusOptions = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? PREVENT_SCROLL :
|
|
78
79
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- intentional fallback for experiment off path
|
|
79
80
|
{
|
|
80
81
|
preventScroll: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback, useMemo } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
4
4
|
import { INPUT_METHOD } from '../../../analytics';
|
|
5
5
|
import { WithProviders } from '../../../provider-factory';
|
|
6
6
|
import { EditorLinkPicker } from '../EditorLinkPicker';
|
|
@@ -81,13 +81,13 @@ export function HyperlinkAddToolbar({
|
|
|
81
81
|
timesViewed: timesViewed
|
|
82
82
|
});
|
|
83
83
|
}, [lpLinkPicker, isOffline, view, invokeMethod, inputMethod, editorAppearance, linkPickerOptions, displayUrl, displayText, onSubmit, memoizedOnSubmitWithInterface, onCancel, onClose, onEscapeCallback, onClickAwayCallback, searchSessionId, timesViewed]);
|
|
84
|
-
const providers =
|
|
84
|
+
const providers = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? HYPERLINK_PROVIDERS :
|
|
85
85
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- intentional fallback for experiment off path
|
|
86
86
|
['activityProvider', 'searchProvider'];
|
|
87
87
|
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
88
88
|
providers: providers,
|
|
89
89
|
providerFactory: providerFactory,
|
|
90
|
-
renderNode:
|
|
90
|
+
renderNode: isExperimentEnabled('platform_editor_perf_lint_cleanup') ? memoizedRenderNode :
|
|
91
91
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- intentional fallback for experiment off path
|
|
92
92
|
({
|
|
93
93
|
activityProvider,
|
|
@@ -9,7 +9,7 @@ import { jsx } from '@emotion/react';
|
|
|
9
9
|
import { getRandomHex } from '@atlaskit/media-common';
|
|
10
10
|
import { useFilePreview } from '@atlaskit/media-file-preview/use-file-preview';
|
|
11
11
|
import { MediaImage } from '@atlaskit/media-ui/mediaImage';
|
|
12
|
-
import {
|
|
12
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
13
|
import { InlineImageCardLoadingView } from './views/loading-view';
|
|
14
14
|
export const InlineImageCard = ({
|
|
15
15
|
dimensions,
|
|
@@ -57,7 +57,7 @@ export const InlineImageCard = ({
|
|
|
57
57
|
dataURI: preview.dataURI,
|
|
58
58
|
alt: alt,
|
|
59
59
|
previewOrientation: preview.orientation,
|
|
60
|
-
onImageLoad:
|
|
60
|
+
onImageLoad: isExperimentEnabled('platform_editor_perf_lint_cleanup') ? memoizedOnImageLoad : () => {
|
|
61
61
|
onImageLoad(preview);
|
|
62
62
|
},
|
|
63
63
|
onImageError: onImageError,
|
|
@@ -13,8 +13,8 @@ import { fireFailedMediaInlineEvent, fireSucceededMediaInlineEvent, MediaCardErr
|
|
|
13
13
|
import { FileFetcherError } from '@atlaskit/media-client';
|
|
14
14
|
import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
|
|
15
15
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
16
|
-
import {
|
|
17
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
16
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
17
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
18
|
import { messages } from '../messages/media-inline-card';
|
|
19
19
|
import { referenceHeights } from './constants';
|
|
20
20
|
import { InlineImageCard } from './inline-image-card';
|
|
@@ -126,7 +126,7 @@ export const MediaInlineImageCardInternal = ({
|
|
|
126
126
|
}, jsx(InlineImageCard, {
|
|
127
127
|
dimensions: dimensions,
|
|
128
128
|
identifier: identifier,
|
|
129
|
-
renderError:
|
|
129
|
+
renderError: isExperimentEnabled('platform_editor_perf_lint_cleanup') ? memoizedRenderError :
|
|
130
130
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- intentional fallback for experiment off path
|
|
131
131
|
() => jsx(InlineImageCardErrorView, {
|
|
132
132
|
message: formatMessage(messages.unableToLoadContent)
|
|
@@ -197,7 +197,7 @@ export const MediaInlineImageCardInternal = ({
|
|
|
197
197
|
if (isMediaViewerVisible && mediaClient !== null && mediaClient !== void 0 && mediaClient.mediaClientConfig) {
|
|
198
198
|
return /*#__PURE__*/ReactDOM.createPortal(jsx(MediaViewer, {
|
|
199
199
|
collectionName: identifier.collectionName || '',
|
|
200
|
-
items:
|
|
200
|
+
items: isExperimentEnabled('platform_editor_perf_lint_cleanup') ? memoizedMediaViewerItems :
|
|
201
201
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- intentional fallback for experiment off path
|
|
202
202
|
[identifier],
|
|
203
203
|
mediaClientConfig: mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig,
|
|
@@ -9,7 +9,7 @@ import debounce from 'lodash/debounce';
|
|
|
9
9
|
import CustomThemeButton from '@atlaskit/button/custom-theme-button/custom-theme-button';
|
|
10
10
|
import { akEditorUnitZIndex } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import CommentIcon from '@atlaskit/icon/core/comment';
|
|
12
|
-
import {
|
|
12
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
13
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
14
14
|
import { commentMessages as messages } from '../media';
|
|
15
15
|
import { getBadgeSize } from './getBadgeSize';
|
|
@@ -76,7 +76,7 @@ export const CommentBadge = /*#__PURE__*/forwardRef(({
|
|
|
76
76
|
justifyContent: 'center',
|
|
77
77
|
alignItems: 'center'
|
|
78
78
|
}), [badgeDimensions, colourToken]);
|
|
79
|
-
const badgeStyle =
|
|
79
|
+
const badgeStyle = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? memoizedBadgeStyle : {
|
|
80
80
|
height: badgeDimensions,
|
|
81
81
|
width: badgeDimensions,
|
|
82
82
|
background: colourToken,
|
|
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
14
14
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
15
15
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
16
16
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
17
|
-
const packageVersion = "120.
|
|
17
|
+
const packageVersion = "120.10.0";
|
|
18
18
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
19
19
|
// Remove URL as it has UGC
|
|
20
20
|
// Ignored via go/ees007
|
|
@@ -16,27 +16,28 @@ export const STRUCTURE_SECTION_RANK = {
|
|
|
16
16
|
[TABLE_MENU_ITEM.key]: 200,
|
|
17
17
|
[STATUS_MENU_ITEM.key]: 300,
|
|
18
18
|
[DATE_MENU_ITEM.key]: 400,
|
|
19
|
-
[
|
|
20
|
-
[EXPAND_MENU_ITEM.key]:
|
|
21
|
-
[CODE_BLOCK_MENU_ITEM.key]:
|
|
22
|
-
[DECISION_MENU_ITEM.key]: 800,
|
|
19
|
+
[MENTION_MENU_ITEM.key]: 500,
|
|
20
|
+
[EXPAND_MENU_ITEM.key]: 700,
|
|
21
|
+
[CODE_BLOCK_MENU_ITEM.key]: 800,
|
|
23
22
|
[INFO_PANEL_MENU_ITEM.key]: 900,
|
|
24
23
|
[NOTE_PANEL_MENU_ITEM.key]: 1000,
|
|
25
24
|
[SUCCESS_PANEL_MENU_ITEM.key]: 1100,
|
|
26
25
|
[WARNING_PANEL_MENU_ITEM.key]: 1200,
|
|
27
26
|
[ERROR_PANEL_MENU_ITEM.key]: 1300,
|
|
28
27
|
[CUSTOM_PANEL_MENU_ITEM.key]: 1400,
|
|
29
|
-
[TWO_COLUMNS_LAYOUT_MENU_ITEM.key]:
|
|
30
|
-
[THREE_COLUMNS_LAYOUT_MENU_ITEM.key]:
|
|
31
|
-
[FOUR_COLUMNS_LAYOUT_MENU_ITEM.key]:
|
|
32
|
-
[FIVE_COLUMNS_LAYOUT_MENU_ITEM.key]:
|
|
28
|
+
[TWO_COLUMNS_LAYOUT_MENU_ITEM.key]: 1500,
|
|
29
|
+
[THREE_COLUMNS_LAYOUT_MENU_ITEM.key]: 1600,
|
|
30
|
+
[FOUR_COLUMNS_LAYOUT_MENU_ITEM.key]: 1700,
|
|
31
|
+
[FIVE_COLUMNS_LAYOUT_MENU_ITEM.key]: 1800,
|
|
32
|
+
[SYNCED_BLOCK_MENU_ITEM.key]: 2300,
|
|
33
|
+
[RULE_MENU_ITEM.key]: 2400,
|
|
34
|
+
[DECISION_MENU_ITEM.key]: 2800
|
|
33
35
|
};
|
|
34
36
|
export const MEDIA_SECTION_RANK = {
|
|
35
37
|
[MEDIA_INSERT_MENU_ITEM.key]: 100,
|
|
36
38
|
[HYPERLINK_MENU_ITEM.key]: 200,
|
|
37
39
|
[EMOJI_MENU_ITEM.key]: 300,
|
|
38
40
|
[LOOM_MENU_ITEM.key]: 400,
|
|
39
|
-
[MENTION_MENU_ITEM.key]: 500,
|
|
40
41
|
[AI_IMAGE_GENERATION_MENU_ITEM.key]: 600
|
|
41
42
|
};
|
|
42
43
|
export const TEXT_FORMATTING_SECTION_RANK = {
|
|
@@ -47,7 +48,6 @@ export const TEXT_FORMATTING_SECTION_RANK = {
|
|
|
47
48
|
[HEADING_5_MENU_ITEM.key]: 500,
|
|
48
49
|
[HEADING_6_MENU_ITEM.key]: 600,
|
|
49
50
|
[BLOCKQUOTE_MENU_ITEM.key]: 700,
|
|
50
|
-
[RULE_MENU_ITEM.key]: 800,
|
|
51
51
|
[PLACEHOLDER_TEXT_MENU_ITEM.key]: 900,
|
|
52
52
|
[UNORDERED_LIST_MENU_ITEM.key]: 1100,
|
|
53
53
|
[ORDERED_LIST_MENU_ITEM.key]: 1200
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { bind, bindAll } from 'bind-event-listener';
|
|
3
3
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import {
|
|
5
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
4
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
6
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
7
7
|
import { LAYOUT_SECTION_MARGIN } from '../styles';
|
|
8
8
|
import { getBrowserInfo } from '../utils/browser';
|
|
@@ -329,7 +329,7 @@ const BreakoutResizer = ({
|
|
|
329
329
|
}
|
|
330
330
|
return /*#__PURE__*/React.createElement(Resizer, {
|
|
331
331
|
ref: resizerRef,
|
|
332
|
-
enable:
|
|
332
|
+
enable: isExperimentEnabled('platform_editor_perf_lint_cleanup') ? RESIZER_ENABLE_HANDLES : {
|
|
333
333
|
left: true,
|
|
334
334
|
right: true
|
|
335
335
|
},
|
|
@@ -3,7 +3,7 @@ import React, { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, u
|
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { Resizable } from 're-resizable';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
|
-
|
|
6
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
8
8
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
9
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -154,7 +154,7 @@ const ResizerNext = (props, ref) => {
|
|
|
154
154
|
...(handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles[position])
|
|
155
155
|
}
|
|
156
156
|
}), {}), [memoizedBaseBottomHandleStyles, memoizedBaseHorizontalHandleStyles, offset, handleStyles, supportedHandles]);
|
|
157
|
-
const nextHandleStyles =
|
|
157
|
+
const nextHandleStyles = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? memoizedNextHandleStyles :
|
|
158
158
|
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- intentional fallback for experiment off path
|
|
159
159
|
supportedHandles.reduce((result, position) => ({
|
|
160
160
|
...result,
|
|
@@ -245,7 +245,7 @@ const ResizerNext = (props, ref) => {
|
|
|
245
245
|
width: width !== null && width !== void 0 ? width : 'auto',
|
|
246
246
|
height: resolvedHeight
|
|
247
247
|
}), [resolvedHeight, width]);
|
|
248
|
-
const resizerSize =
|
|
248
|
+
const resizerSize = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? resizerAutoSize :
|
|
249
249
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- intentional fallback for experiment off path
|
|
250
250
|
{
|
|
251
251
|
width: width !== null && width !== void 0 ? width : 'auto',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { createContext, useContext, useMemo } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
3
3
|
const EditorToolbarContext = /*#__PURE__*/createContext({
|
|
4
4
|
editorView: null,
|
|
5
5
|
editorAppearance: undefined,
|
|
@@ -33,7 +33,7 @@ export const EditorToolbarProvider = ({
|
|
|
33
33
|
editorToolbarDockingPreference,
|
|
34
34
|
isOffline
|
|
35
35
|
}), [editorView, editorAppearance, editorViewMode, editorToolbarDockingPreference, isOffline]);
|
|
36
|
-
const contextValue =
|
|
36
|
+
const contextValue = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? memoizedValue : {
|
|
37
37
|
editorView,
|
|
38
38
|
editorAppearance,
|
|
39
39
|
editorViewMode,
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "120.
|
|
17
|
+
const packageVersion = "120.10.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -15,6 +15,7 @@ import { akEditorFullPageDefaultFontSize, akEditorFullPageDenseFontSize } from '
|
|
|
15
15
|
import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
16
16
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
17
17
|
import PanelRightIcon from '@atlaskit/icon/core/panel-right';
|
|
18
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
18
19
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
19
20
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
20
21
|
import { Anchor, Box, Text, xcss } from '@atlaskit/primitives';
|
|
@@ -112,7 +113,7 @@ const HoverLinkOverlay = ({
|
|
|
112
113
|
const memoizedHoverLinkStyles = useMemo(() => ({
|
|
113
114
|
paddingBlock: compactPadding ? '1px' : regularPadding
|
|
114
115
|
}), [compactPadding, regularPadding]);
|
|
115
|
-
const hoverLinkStyles =
|
|
116
|
+
const hoverLinkStyles = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? memoizedHoverLinkStyles : {
|
|
116
117
|
paddingBlock: compactPadding ? '1px' : DYNAMIC_PADDING_BLOCK
|
|
117
118
|
};
|
|
118
119
|
useLayoutEffect(() => {
|
|
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
/* eslint-disable @repo/internal/react/no-class-components */
|
|
3
3
|
import React, { PureComponent } from 'react';
|
|
4
4
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
import { ProviderFactory, WithProviders } from '../../provider-factory';
|
|
7
6
|
import { MentionWithAvatarProviders, MentionWithProviders } from './mention-with-providers';
|
|
8
7
|
const MENTION_PROVIDERS = ['mentionProvider', 'profilecardProvider'];
|
|
@@ -65,7 +64,7 @@ export default class Mention extends PureComponent {
|
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
66
|
render() {
|
|
68
|
-
const providers =
|
|
67
|
+
const providers = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? MENTION_PROVIDERS : ['mentionProvider', 'profilecardProvider'];
|
|
69
68
|
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
70
69
|
providers: providers,
|
|
71
70
|
providerFactory: this.providerFactory,
|
|
@@ -8,8 +8,8 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { bind } from 'bind-event-listener';
|
|
10
10
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
11
|
-
import {
|
|
12
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
11
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
12
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
13
|
import { withReactEditorViewOuterListeners as withOuterListeners } from '../../ui-react';
|
|
14
14
|
import Popup from '../Popup';
|
|
15
15
|
import tableSelectorPopup, { TABLE_SELECTOR_BUTTON_GAP, TABLE_SELECTOR_BUTTON_SIZE } from './table-selector';
|
|
@@ -236,7 +236,7 @@ export const TableSelectorPopup = props => {
|
|
|
236
236
|
}
|
|
237
237
|
return unbind;
|
|
238
238
|
}, [handleMouseMove, props.allowOutsideSelection, tablePopupRef]);
|
|
239
|
-
const offset =
|
|
239
|
+
const offset = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? POPUP_OFFSET : [0, 3];
|
|
240
240
|
return jsx(Popup, {
|
|
241
241
|
target: props.target,
|
|
242
242
|
offset: offset,
|