@atlaskit/editor-plugin-toolbar 18.0.3 → 18.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar
|
|
2
2
|
|
|
3
|
+
## 18.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e339b127f827a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e339b127f827a) -
|
|
8
|
+
Route `platform_editor_controls` checks that used `expValEquals` / `expValEqualsNoExposure`
|
|
9
|
+
through `editorExperiment`, so they respect the per-product experiment key (Confluence
|
|
10
|
+
`platform_editor_controls`, Jira `platform_editor_controls_jira`). Previously these checks always
|
|
11
|
+
read the Confluence experiment, which evaluated to control in Jira.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 18.0.3
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -21,7 +21,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
21
21
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
22
22
|
var _editorToolbarModel = require("@atlaskit/editor-toolbar-model");
|
|
23
23
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
24
|
-
var
|
|
24
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
25
25
|
var _consts = require("../consts");
|
|
26
26
|
var _keyboardConfig = require("./keyboard-config");
|
|
27
27
|
var _utils2 = require("./utils");
|
|
@@ -49,7 +49,9 @@ var useOnPositionCalculated = function useOnPositionCalculated(editorView) {
|
|
|
49
49
|
var onPositionCalculated = (0, _react.useCallback)(function (position) {
|
|
50
50
|
try {
|
|
51
51
|
// Show special position on cell selection only when editor controls experiment is enabled
|
|
52
|
-
var isEditorControlsEnabled = (0,
|
|
52
|
+
var isEditorControlsEnabled = (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
53
|
+
exposure: true
|
|
54
|
+
});
|
|
53
55
|
var isCellSelection = ('$anchorCell' in editorView.state.selection);
|
|
54
56
|
if (isCellSelection && isEditorControlsEnabled) {
|
|
55
57
|
return (0, _utils.calculateToolbarPositionOnCellSelection)(_consts.SELECTION_TOOLBAR_LABEL)(editorView, position);
|
|
@@ -14,7 +14,7 @@ import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
|
14
14
|
import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
15
15
|
import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
|
|
16
16
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
17
|
-
import {
|
|
17
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
18
18
|
import { SELECTION_TOOLBAR_LABEL } from '../consts';
|
|
19
19
|
import { getKeyboardNavigationConfig } from './keyboard-config';
|
|
20
20
|
import { getDomRefFromSelection } from './utils';
|
|
@@ -41,7 +41,9 @@ const useOnPositionCalculated = editorView => {
|
|
|
41
41
|
const onPositionCalculated = useCallback(position => {
|
|
42
42
|
try {
|
|
43
43
|
// Show special position on cell selection only when editor controls experiment is enabled
|
|
44
|
-
const isEditorControlsEnabled =
|
|
44
|
+
const isEditorControlsEnabled = editorExperiment('platform_editor_controls', 'variant1', {
|
|
45
|
+
exposure: true
|
|
46
|
+
});
|
|
45
47
|
const isCellSelection = ('$anchorCell' in editorView.state.selection);
|
|
46
48
|
if (isCellSelection && isEditorControlsEnabled) {
|
|
47
49
|
return calculateToolbarPositionOnCellSelection(SELECTION_TOOLBAR_LABEL)(editorView, position);
|
|
@@ -14,7 +14,7 @@ import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
|
14
14
|
import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
15
15
|
import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
|
|
16
16
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
17
|
-
import {
|
|
17
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
18
18
|
import { SELECTION_TOOLBAR_LABEL } from '../consts';
|
|
19
19
|
import { getKeyboardNavigationConfig } from './keyboard-config';
|
|
20
20
|
import { getDomRefFromSelection } from './utils';
|
|
@@ -41,7 +41,9 @@ var useOnPositionCalculated = function useOnPositionCalculated(editorView) {
|
|
|
41
41
|
var onPositionCalculated = useCallback(function (position) {
|
|
42
42
|
try {
|
|
43
43
|
// Show special position on cell selection only when editor controls experiment is enabled
|
|
44
|
-
var isEditorControlsEnabled =
|
|
44
|
+
var isEditorControlsEnabled = editorExperiment('platform_editor_controls', 'variant1', {
|
|
45
|
+
exposure: true
|
|
46
|
+
});
|
|
45
47
|
var isCellSelection = ('$anchorCell' in editorView.state.selection);
|
|
46
48
|
if (isCellSelection && isEditorControlsEnabled) {
|
|
47
49
|
return calculateToolbarPositionOnCellSelection(SELECTION_TOOLBAR_LABEL)(editorView, position);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.4",
|
|
4
4
|
"description": "Toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/editor-plugin-user-preferences": "^19.0.0",
|
|
30
30
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
31
31
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
32
|
-
"@atlaskit/editor-toolbar": "^2.
|
|
32
|
+
"@atlaskit/editor-toolbar": "^2.8.0",
|
|
33
33
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
34
34
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
35
35
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"bind-event-listener": "^3.0.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@atlaskit/editor-common": "^125.
|
|
41
|
+
"@atlaskit/editor-common": "^125.3.0",
|
|
42
42
|
"react": "^18.2.0 || ^19.2.0",
|
|
43
43
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
44
44
|
},
|