@atlaskit/editor-plugin-highlight 22.0.1 → 22.0.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-plugin-highlight
2
2
 
3
+ ## 22.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a13383c3c99b2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a13383c3c99b2) -
8
+ [FFCLEANUP-192944] clean up code references to patch gates
9
+ `platform_editor_lovability_text_bg_color_patch_1` and
10
+ `platform_editor_lovability_text_bg_color_patch_2`.
11
+ - Updated dependencies
12
+
13
+ ## 22.0.2
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 22.0.1
4
20
 
5
21
  ### Patch Changes
@@ -123,10 +123,7 @@ function HighlightColorMenuItem(_ref3) {
123
123
  var iconColor = getTextColorIconColor(defaultColor, textColor, isNewColorPaletteEnabled);
124
124
  var highlightPalette = isNewColorPaletteEnabled ? _uiColor.highlightColorPaletteNew : _uiColor.highlightColorPalette;
125
125
  return highlightPalette.filter(function (color) {
126
- if (!isNewColorPaletteEnabled || (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1')) {
127
- return color.value !== _uiColor.REMOVE_HIGHLIGHT_COLOR;
128
- }
129
- return color.label !== 'Red';
126
+ return color.value !== _uiColor.REMOVE_HIGHLIGHT_COLOR;
130
127
  }).map(function (color) {
131
128
  return _objectSpread(_objectSpread({}, color), {}, {
132
129
  decorator: isNewColorPaletteEnabled && color.value === _uiColor.REMOVE_HIGHLIGHT_COLOR ? /*#__PURE__*/React.createElement(NoColorIconDecorator, {
@@ -143,7 +140,7 @@ function HighlightColorMenuItem(_ref3) {
143
140
  var colorPaletteElement = /*#__PURE__*/React.createElement(_editorToolbar.ColorPalette, {
144
141
  ariaLabelledBy: labelId,
145
142
  cols: isNewColorPaletteEnabled ? HIGHLIGHT_COLOR_PICKER_COLUMNS : undefined,
146
- gap: isNewColorPaletteEnabled && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
143
+ gap: isNewColorPaletteEnabled ? 'space.0' : undefined
147
144
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
148
145
  ,
149
146
  onClick: function onClick(color, _, event) {
@@ -158,7 +155,7 @@ function HighlightColorMenuItem(_ref3) {
158
155
  }
159
156
  });
160
157
  return /*#__PURE__*/React.createElement(_compiled.Stack, {
161
- xcss: (0, _css.cx)(styles.container, isNewColorPaletteEnabled && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') && styles.containerPatch),
158
+ xcss: (0, _css.cx)(styles.container, isNewColorPaletteEnabled && styles.containerPatch),
162
159
  testId: "highlight-color-menu-item"
163
160
  }, /*#__PURE__*/React.createElement(_heading.default, {
164
161
  id: labelId,
@@ -166,7 +163,7 @@ function HighlightColorMenuItem(_ref3) {
166
163
  // The label names the palette's radio group; a heading inside a menu is skipped and has no stable level here
167
164
  ,
168
165
  as: (0, _fg.fg)('platform_editor_a11y_color_palette_radiogroup') ? 'div' : undefined
169
- }, formatMessage(_messages.highlightMessages.highlight)), isNewColorPaletteEnabled && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/React.createElement(_compiled.Bleed, {
166
+ }, formatMessage(_messages.highlightMessages.highlight)), isNewColorPaletteEnabled ? /*#__PURE__*/React.createElement(_compiled.Bleed, {
170
167
  inline: "space.025"
171
168
  }, colorPaletteElement) : colorPaletteElement);
172
169
  }
@@ -10,7 +10,6 @@ var _uiColor = require("@atlaskit/editor-common/ui-color");
10
10
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
11
11
  var _editorPalette = require("@atlaskit/editor-palette");
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
- var _fg = require("@atlaskit/platform-feature-flags/fg");
14
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
14
  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); }
16
15
  var HIGHLIGHT_COLOR_PICKER_COLUMNS = 8;
@@ -27,18 +26,14 @@ var PaletteDropdown = exports.PaletteDropdown = function PaletteDropdown(props)
27
26
  handleClickOutside = props.handleClickOutside,
28
27
  handleEscapeKeydown = props.handleEscapeKeydown;
29
28
  var isNewColorPaletteEnabled = (0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true);
30
- var isRedHighlightEnabled = (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1');
31
29
  var highlightPalette = (0, _react.useMemo)(function () {
32
30
  if (isNewColorPaletteEnabled) {
33
31
  return _uiColor.highlightColorPaletteNew.filter(function (color) {
34
- if (isRedHighlightEnabled) {
35
- return color.value !== _uiColor.REMOVE_HIGHLIGHT_COLOR;
36
- }
37
- return color.label !== 'Red';
32
+ return color.value !== _uiColor.REMOVE_HIGHLIGHT_COLOR;
38
33
  });
39
34
  }
40
35
  return _uiColor.highlightColorPalette;
41
- }, [isNewColorPaletteEnabled, isRedHighlightEnabled]);
36
+ }, [isNewColorPaletteEnabled]);
42
37
  var colorPickerColumns = isNewColorPaletteEnabled ? HIGHLIGHT_COLOR_PICKER_COLUMNS_NEW : HIGHLIGHT_COLOR_PICKER_COLUMNS;
43
38
 
44
39
  // pixels, used to determine where to horizontally position the dropdown when space is limited
@@ -112,10 +112,7 @@ export function HighlightColorMenuItem({
112
112
  const iconColor = getTextColorIconColor(defaultColor, textColor, isNewColorPaletteEnabled);
113
113
  const highlightPalette = isNewColorPaletteEnabled ? highlightColorPaletteNew : highlightColorPalette;
114
114
  return highlightPalette.filter(color => {
115
- if (!isNewColorPaletteEnabled || fg('platform_editor_lovability_text_bg_color_patch_1')) {
116
- return color.value !== REMOVE_HIGHLIGHT_COLOR;
117
- }
118
- return color.label !== 'Red';
115
+ return color.value !== REMOVE_HIGHLIGHT_COLOR;
119
116
  }).map(color => ({
120
117
  ...color,
121
118
  decorator: isNewColorPaletteEnabled && color.value === REMOVE_HIGHLIGHT_COLOR ? /*#__PURE__*/React.createElement(NoColorIconDecorator, {
@@ -131,7 +128,7 @@ export function HighlightColorMenuItem({
131
128
  const colorPaletteElement = /*#__PURE__*/React.createElement(ColorPalette, {
132
129
  ariaLabelledBy: labelId,
133
130
  cols: isNewColorPaletteEnabled ? HIGHLIGHT_COLOR_PICKER_COLUMNS : undefined,
134
- gap: isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
131
+ gap: isNewColorPaletteEnabled ? 'space.0' : undefined
135
132
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
136
133
  ,
137
134
  onClick: (color, _, event) => {
@@ -146,7 +143,7 @@ export function HighlightColorMenuItem({
146
143
  }
147
144
  });
148
145
  return /*#__PURE__*/React.createElement(Stack, {
149
- xcss: cx(styles.container, isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') && styles.containerPatch),
146
+ xcss: cx(styles.container, isNewColorPaletteEnabled && styles.containerPatch),
150
147
  testId: "highlight-color-menu-item"
151
148
  }, /*#__PURE__*/React.createElement(Heading, {
152
149
  id: labelId,
@@ -154,7 +151,7 @@ export function HighlightColorMenuItem({
154
151
  // The label names the palette's radio group; a heading inside a menu is skipped and has no stable level here
155
152
  ,
156
153
  as: fg('platform_editor_a11y_color_palette_radiogroup') ? 'div' : undefined
157
- }, formatMessage(messages.highlight)), isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/React.createElement(Bleed, {
154
+ }, formatMessage(messages.highlight)), isNewColorPaletteEnabled ? /*#__PURE__*/React.createElement(Bleed, {
158
155
  inline: "space.025"
159
156
  }, colorPaletteElement) : colorPaletteElement);
160
157
  }
@@ -3,7 +3,6 @@ import { ColorPalette, REMOVE_HIGHLIGHT_COLOR, getSelectedRowAndColumnFromPalett
3
3
  import { ArrowKeyNavigationType, DropdownContainer as Dropdown } from '@atlaskit/editor-common/ui-menu';
4
4
  import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
5
5
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
6
- import { fg } from '@atlaskit/platform-feature-flags/fg';
7
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
7
  const HIGHLIGHT_COLOR_PICKER_COLUMNS = 8;
9
8
  const HIGHLIGHT_COLOR_PICKER_COLUMNS_NEW = 10;
@@ -21,18 +20,14 @@ export const PaletteDropdown = props => {
21
20
  handleEscapeKeydown
22
21
  } = props;
23
22
  const isNewColorPaletteEnabled = expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true);
24
- const isRedHighlightEnabled = fg('platform_editor_lovability_text_bg_color_patch_1');
25
23
  const highlightPalette = useMemo(() => {
26
24
  if (isNewColorPaletteEnabled) {
27
25
  return highlightColorPaletteNew.filter(color => {
28
- if (isRedHighlightEnabled) {
29
- return color.value !== REMOVE_HIGHLIGHT_COLOR;
30
- }
31
- return color.label !== 'Red';
26
+ return color.value !== REMOVE_HIGHLIGHT_COLOR;
32
27
  });
33
28
  }
34
29
  return highlightColorPalette;
35
- }, [isNewColorPaletteEnabled, isRedHighlightEnabled]);
30
+ }, [isNewColorPaletteEnabled]);
36
31
  const colorPickerColumns = isNewColorPaletteEnabled ? HIGHLIGHT_COLOR_PICKER_COLUMNS_NEW : HIGHLIGHT_COLOR_PICKER_COLUMNS;
37
32
 
38
33
  // pixels, used to determine where to horizontally position the dropdown when space is limited
@@ -114,10 +114,7 @@ export function HighlightColorMenuItem(_ref3) {
114
114
  var iconColor = getTextColorIconColor(defaultColor, textColor, isNewColorPaletteEnabled);
115
115
  var highlightPalette = isNewColorPaletteEnabled ? highlightColorPaletteNew : highlightColorPalette;
116
116
  return highlightPalette.filter(function (color) {
117
- if (!isNewColorPaletteEnabled || fg('platform_editor_lovability_text_bg_color_patch_1')) {
118
- return color.value !== REMOVE_HIGHLIGHT_COLOR;
119
- }
120
- return color.label !== 'Red';
117
+ return color.value !== REMOVE_HIGHLIGHT_COLOR;
121
118
  }).map(function (color) {
122
119
  return _objectSpread(_objectSpread({}, color), {}, {
123
120
  decorator: isNewColorPaletteEnabled && color.value === REMOVE_HIGHLIGHT_COLOR ? /*#__PURE__*/React.createElement(NoColorIconDecorator, {
@@ -134,7 +131,7 @@ export function HighlightColorMenuItem(_ref3) {
134
131
  var colorPaletteElement = /*#__PURE__*/React.createElement(ColorPalette, {
135
132
  ariaLabelledBy: labelId,
136
133
  cols: isNewColorPaletteEnabled ? HIGHLIGHT_COLOR_PICKER_COLUMNS : undefined,
137
- gap: isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
134
+ gap: isNewColorPaletteEnabled ? 'space.0' : undefined
138
135
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
139
136
  ,
140
137
  onClick: function onClick(color, _, event) {
@@ -149,7 +146,7 @@ export function HighlightColorMenuItem(_ref3) {
149
146
  }
150
147
  });
151
148
  return /*#__PURE__*/React.createElement(Stack, {
152
- xcss: cx(styles.container, isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') && styles.containerPatch),
149
+ xcss: cx(styles.container, isNewColorPaletteEnabled && styles.containerPatch),
153
150
  testId: "highlight-color-menu-item"
154
151
  }, /*#__PURE__*/React.createElement(Heading, {
155
152
  id: labelId,
@@ -157,7 +154,7 @@ export function HighlightColorMenuItem(_ref3) {
157
154
  // The label names the palette's radio group; a heading inside a menu is skipped and has no stable level here
158
155
  ,
159
156
  as: fg('platform_editor_a11y_color_palette_radiogroup') ? 'div' : undefined
160
- }, formatMessage(messages.highlight)), isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/React.createElement(Bleed, {
157
+ }, formatMessage(messages.highlight)), isNewColorPaletteEnabled ? /*#__PURE__*/React.createElement(Bleed, {
161
158
  inline: "space.025"
162
159
  }, colorPaletteElement) : colorPaletteElement);
163
160
  }
@@ -3,7 +3,6 @@ import { ColorPalette, REMOVE_HIGHLIGHT_COLOR, getSelectedRowAndColumnFromPalett
3
3
  import { ArrowKeyNavigationType, DropdownContainer as Dropdown } from '@atlaskit/editor-common/ui-menu';
4
4
  import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
5
5
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
6
- import { fg } from '@atlaskit/platform-feature-flags/fg';
7
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
7
  var HIGHLIGHT_COLOR_PICKER_COLUMNS = 8;
9
8
  var HIGHLIGHT_COLOR_PICKER_COLUMNS_NEW = 10;
@@ -19,18 +18,14 @@ export var PaletteDropdown = function PaletteDropdown(props) {
19
18
  handleClickOutside = props.handleClickOutside,
20
19
  handleEscapeKeydown = props.handleEscapeKeydown;
21
20
  var isNewColorPaletteEnabled = expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true);
22
- var isRedHighlightEnabled = fg('platform_editor_lovability_text_bg_color_patch_1');
23
21
  var highlightPalette = useMemo(function () {
24
22
  if (isNewColorPaletteEnabled) {
25
23
  return highlightColorPaletteNew.filter(function (color) {
26
- if (isRedHighlightEnabled) {
27
- return color.value !== REMOVE_HIGHLIGHT_COLOR;
28
- }
29
- return color.label !== 'Red';
24
+ return color.value !== REMOVE_HIGHLIGHT_COLOR;
30
25
  });
31
26
  }
32
27
  return highlightColorPalette;
33
- }, [isNewColorPaletteEnabled, isRedHighlightEnabled]);
28
+ }, [isNewColorPaletteEnabled]);
34
29
  var colorPickerColumns = isNewColorPaletteEnabled ? HIGHLIGHT_COLOR_PICKER_COLUMNS_NEW : HIGHLIGHT_COLOR_PICKER_COLUMNS;
35
30
 
36
31
  // pixels, used to determine where to horizontally position the dropdown when space is limited
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-highlight",
3
- "version": "22.0.1",
3
+ "version": "22.0.3",
4
4
  "description": "Highlight plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/platform-feature-experiments": "^0.3.0",
46
46
  "@atlaskit/platform-feature-flags": "^2.2.0",
47
47
  "@atlaskit/primitives": "^22.5.0",
48
- "@atlaskit/tmp-editor-statsig": "^210.0.0",
48
+ "@atlaskit/tmp-editor-statsig": "^211.0.0",
49
49
  "@atlaskit/tokens": "^20.1.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1"
@@ -62,9 +62,6 @@
62
62
  },
63
63
  "platform_editor_a11y_color_palette_radiogroup": {
64
64
  "type": "boolean"
65
- },
66
- "platform_editor_lovability_text_bg_color_patch_1": {
67
- "type": "boolean"
68
65
  }
69
66
  },
70
67
  "devDependencies": {