@atlaskit/editor-plugin-highlight 1.19.8 → 1.19.10

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,23 @@
1
1
  # @atlaskit/editor-plugin-highlight
2
2
 
3
+ ## 1.19.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [#107473](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107473)
8
+ [`962b3297548df`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/962b3297548df) -
9
+ [ux] Implement variation 2 for editor contextual toolbar formatting experiment
10
+
11
+ ## 1.19.9
12
+
13
+ ### Patch Changes
14
+
15
+ - [#105009](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105009)
16
+ [`a4039ebf7ed11`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a4039ebf7ed11) -
17
+ [ux] Implement variant 2 cohorts experience for platform_editor_contextual_formatting_toolbar_v2
18
+ experiment
19
+ - Updated dependencies
20
+
3
21
  ## 1.19.8
4
22
 
5
23
  ### Patch Changes
@@ -77,6 +77,8 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
77
77
  selectionToolbar: function selectionToolbar() {
78
78
  if (!(options !== null && options !== void 0 && options.textHighlightingFloatingToolbarExperiment) && (0, _experiments.editorExperiment)('contextual_formatting_toolbar', false, {
79
79
  exposure: true
80
+ }) && (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'control', {
81
+ exposure: true
80
82
  })) {
81
83
  return;
82
84
  }
@@ -90,7 +92,7 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
90
92
  },
91
93
  fallback: []
92
94
  };
93
- var rank = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) ? 5 : -9;
95
+ var rank = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant1') || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 5 : -9;
94
96
  return {
95
97
  rank: rank,
96
98
  isToolbarAbove: true,
@@ -30,8 +30,6 @@ var createPlugin = exports.createPlugin = function createPlugin(_ref) {
30
30
  isPaletteOpen: false
31
31
  };
32
32
  },
33
- // Ignored via go/ees005
34
- // eslint-disable-next-line @typescript-eslint/max-params
35
33
  apply: function apply(tr, pluginState, _oldState, newState) {
36
34
  var _tr$getMeta;
37
35
  var action = (_tr$getMeta = tr.getMeta(highlightPluginKey)) === null || _tr$getMeta === void 0 ? void 0 : _tr$getMeta.type;
@@ -83,7 +83,7 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
83
83
  // Get the design token for the active color (if it exists) to modify the toolbar
84
84
  // icon, but show the nice rainbow if none is selected
85
85
  var activeColorToken = highlightState.activeColor === null ? null : (0, _editorPalette.hexToEditorTextBackgroundPaletteColor)(highlightState.activeColor);
86
- var title = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) ? (0, _keymaps.tooltip)(_keymaps.toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
86
+ var title = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant1') || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? (0, _keymaps.tooltip)(_keymaps.toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
87
87
  return (0, _react2.jsx)(_PaletteDropdown.PaletteDropdown, {
88
88
  isOpen: isDropdownOpen && !highlightState.disabled,
89
89
  activeColor: highlightState.activeColor,
@@ -136,7 +136,7 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
136
136
  }, (0, _react2.jsx)(_chevronDown.default, {
137
137
  label: ""
138
138
  }))
139
- }, (0, _experiments.editorExperiment)('contextual_formatting_toolbar', false) && formatMessage(_messages.highlightMessages.highlightFloatingToolbar)),
139
+ }, (0, _experiments.editorExperiment)('contextual_formatting_toolbar', false) && (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'control') && formatMessage(_messages.highlightMessages.highlightFloatingToolbar)),
140
140
  onColorChange: function onColorChange(color) {
141
141
  return handleColorChange({
142
142
  color: color,
@@ -64,6 +64,8 @@ export const highlightPlugin = ({
64
64
  selectionToolbar() {
65
65
  if (!(options !== null && options !== void 0 && options.textHighlightingFloatingToolbarExperiment) && editorExperiment('contextual_formatting_toolbar', false, {
66
66
  exposure: true
67
+ }) && editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'control', {
68
+ exposure: true
67
69
  })) {
68
70
  return;
69
71
  }
@@ -75,7 +77,7 @@ export const highlightPlugin = ({
75
77
  }),
76
78
  fallback: []
77
79
  };
78
- const rank = editorExperiment('contextual_formatting_toolbar', true) ? 5 : -9;
80
+ const rank = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1') || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 5 : -9;
79
81
  return {
80
82
  rank,
81
83
  isToolbarAbove: true,
@@ -19,8 +19,6 @@ export const createPlugin = ({
19
19
  disabled: getDisabledState(editorState),
20
20
  isPaletteOpen: false
21
21
  }),
22
- // Ignored via go/ees005
23
- // eslint-disable-next-line @typescript-eslint/max-params
24
22
  apply: (tr, pluginState, _oldState, newState) => {
25
23
  var _tr$getMeta;
26
24
  const action = (_tr$getMeta = tr.getMeta(highlightPluginKey)) === null || _tr$getMeta === void 0 ? void 0 : _tr$getMeta.type;
@@ -76,7 +76,7 @@ const FloatingToolbarHighlightColor = ({
76
76
  // Get the design token for the active color (if it exists) to modify the toolbar
77
77
  // icon, but show the nice rainbow if none is selected
78
78
  const activeColorToken = highlightState.activeColor === null ? null : hexToEditorTextBackgroundPaletteColor(highlightState.activeColor);
79
- const title = editorExperiment('contextual_formatting_toolbar', true) ? tooltip(toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
79
+ const title = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1') || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? tooltip(toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
80
80
  return jsx(PaletteDropdown, {
81
81
  isOpen: isDropdownOpen && !highlightState.disabled,
82
82
  activeColor: highlightState.activeColor,
@@ -129,7 +129,7 @@ const FloatingToolbarHighlightColor = ({
129
129
  }, jsx(ExpandIcon, {
130
130
  label: ""
131
131
  }))
132
- }, editorExperiment('contextual_formatting_toolbar', false) && formatMessage(messages.highlightFloatingToolbar)),
132
+ }, editorExperiment('contextual_formatting_toolbar', false) && editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'control') && formatMessage(messages.highlightFloatingToolbar)),
133
133
  onColorChange: color => handleColorChange({
134
134
  color,
135
135
  inputMethod: INPUT_METHOD.FLOATING_TB
@@ -70,6 +70,8 @@ export var highlightPlugin = function highlightPlugin(_ref) {
70
70
  selectionToolbar: function selectionToolbar() {
71
71
  if (!(options !== null && options !== void 0 && options.textHighlightingFloatingToolbarExperiment) && editorExperiment('contextual_formatting_toolbar', false, {
72
72
  exposure: true
73
+ }) && editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'control', {
74
+ exposure: true
73
75
  })) {
74
76
  return;
75
77
  }
@@ -83,7 +85,7 @@ export var highlightPlugin = function highlightPlugin(_ref) {
83
85
  },
84
86
  fallback: []
85
87
  };
86
- var rank = editorExperiment('contextual_formatting_toolbar', true) ? 5 : -9;
88
+ var rank = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1') || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 5 : -9;
87
89
  return {
88
90
  rank: rank,
89
91
  isToolbarAbove: true,
@@ -23,8 +23,6 @@ export var createPlugin = function createPlugin(_ref) {
23
23
  isPaletteOpen: false
24
24
  };
25
25
  },
26
- // Ignored via go/ees005
27
- // eslint-disable-next-line @typescript-eslint/max-params
28
26
  apply: function apply(tr, pluginState, _oldState, newState) {
29
27
  var _tr$getMeta;
30
28
  var action = (_tr$getMeta = tr.getMeta(highlightPluginKey)) === null || _tr$getMeta === void 0 ? void 0 : _tr$getMeta.type;
@@ -75,7 +75,7 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
75
75
  // Get the design token for the active color (if it exists) to modify the toolbar
76
76
  // icon, but show the nice rainbow if none is selected
77
77
  var activeColorToken = highlightState.activeColor === null ? null : hexToEditorTextBackgroundPaletteColor(highlightState.activeColor);
78
- var title = editorExperiment('contextual_formatting_toolbar', true) ? tooltip(toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
78
+ var title = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1') || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? tooltip(toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
79
79
  return jsx(PaletteDropdown, {
80
80
  isOpen: isDropdownOpen && !highlightState.disabled,
81
81
  activeColor: highlightState.activeColor,
@@ -128,7 +128,7 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
128
128
  }, jsx(ExpandIcon, {
129
129
  label: ""
130
130
  }))
131
- }, editorExperiment('contextual_formatting_toolbar', false) && formatMessage(messages.highlightFloatingToolbar)),
131
+ }, editorExperiment('contextual_formatting_toolbar', false) && editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'control') && formatMessage(messages.highlightFloatingToolbar)),
132
132
  onColorChange: function onColorChange(color) {
133
133
  return handleColorChange({
134
134
  color: color,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-highlight",
3
- "version": "1.19.8",
3
+ "version": "1.19.10",
4
4
  "description": "Highlight plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -37,19 +37,19 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@atlaskit/adf-schema": "^46.1.0",
40
- "@atlaskit/editor-common": "^99.0.0",
40
+ "@atlaskit/editor-common": "^99.5.0",
41
41
  "@atlaskit/editor-palette": "1.6.4",
42
- "@atlaskit/editor-plugin-analytics": "^1.10.0",
42
+ "@atlaskit/editor-plugin-analytics": "^1.11.0",
43
43
  "@atlaskit/editor-plugin-primary-toolbar": "^2.1.0",
44
44
  "@atlaskit/editor-plugin-text-formatting": "^1.16.0",
45
45
  "@atlaskit/editor-prosemirror": "6.2.1",
46
46
  "@atlaskit/editor-shared-styles": "^3.2.0",
47
47
  "@atlaskit/editor-tables": "^2.8.0",
48
- "@atlaskit/icon": "^23.3.0",
48
+ "@atlaskit/icon": "^23.4.0",
49
49
  "@atlaskit/platform-feature-flags": "^0.3.0",
50
50
  "@atlaskit/primitives": "^13.3.0",
51
- "@atlaskit/tmp-editor-statsig": "^2.33.0",
52
- "@atlaskit/tokens": "^3.0.0",
51
+ "@atlaskit/tmp-editor-statsig": "^2.41.0",
52
+ "@atlaskit/tokens": "^3.2.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "@emotion/react": "^11.7.1"
55
55
  },