@atlaskit/editor-plugin-toolbar 18.0.3 → 18.0.5

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,22 @@
1
1
  # @atlaskit/editor-plugin-toolbar
2
2
 
3
+ ## 18.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 18.0.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [`e339b127f827a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e339b127f827a) -
14
+ Route `platform_editor_controls` checks that used `expValEquals` / `expValEqualsNoExposure`
15
+ through `editorExperiment`, so they respect the per-product experiment key (Confluence
16
+ `platform_editor_controls`, Jira `platform_editor_controls_jira`). Previously these checks always
17
+ read the Confluence experiment, which evaluated to control in Jira.
18
+ - Updated dependencies
19
+
3
20
  ## 18.0.3
4
21
 
5
22
  ### 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 _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
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, _expValEquals.expValEquals)('platform_editor_controls', 'cohort', 'variant1');
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 { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
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 = expValEquals('platform_editor_controls', 'cohort', 'variant1');
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 { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
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 = expValEquals('platform_editor_controls', 'cohort', 'variant1');
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",
3
+ "version": "18.0.5",
4
4
  "description": "Toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,16 +29,16 @@
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.7.0",
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",
36
- "@atlaskit/tmp-editor-statsig": "^208.0.0",
36
+ "@atlaskit/tmp-editor-statsig": "^209.0.0",
37
37
  "@babel/runtime": "^7.0.0",
38
38
  "bind-event-listener": "^3.0.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "@atlaskit/editor-common": "^125.2.0",
41
+ "@atlaskit/editor-common": "^125.4.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
  },