@atlaskit/editor-plugin-media 2.6.4 → 2.6.6

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-media
2
2
 
3
+ ## 2.6.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#144194](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/144194)
8
+ [`542b82e03416e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/542b82e03416e) -
9
+ [ux] Remove separators within group in Editor floating toolbar
10
+ - Updated dependencies
11
+
12
+ ## 2.6.5
13
+
14
+ ### Patch Changes
15
+
16
+ - [#144182](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/144182)
17
+ [`94ee57c2be328`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/94ee57c2be328) -
18
+ A11Y-9934: Update aria labels to be translated and more accurate.
19
+ - Updated dependencies
20
+
3
21
  ## 2.6.4
4
22
 
5
23
  ### Patch Changes
@@ -131,7 +131,7 @@ var ImageBorder = function ImageBorder(_ref) {
131
131
  content: (0, _react2.jsx)("div", null, (0, _react2.jsx)("button", {
132
132
  ref: dropDownColorOptionButton,
133
133
  type: "button",
134
- "aria-label": "Image border options Color dropdown button",
134
+ "aria-label": formatMessage(_media.imageBorderMessages.borderColorDropdownAriaLabel),
135
135
  "data-testid": "image-border-dropdown-button-color"
136
136
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
137
137
  ,
@@ -197,7 +197,7 @@ var ImageBorder = function ImageBorder(_ref) {
197
197
  }, {
198
198
  content: (0, _react2.jsx)("div", null, (0, _react2.jsx)("button", {
199
199
  type: "button",
200
- "aria-label": "Image border options Size dropdown button",
200
+ "aria-label": formatMessage(_media.imageBorderMessages.borderSizeDropdownAriaLabel),
201
201
  "data-testid": "image-border-dropdown-button-size"
202
202
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
203
203
  ,
@@ -272,9 +272,11 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
272
272
  });
273
273
  }
274
274
  });
275
- toolbarButtons.push({
276
- type: 'separator'
277
- });
275
+ if (!isEditorControlsEnabled || !(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6')) {
276
+ toolbarButtons.push({
277
+ type: 'separator'
278
+ });
279
+ }
278
280
  }
279
281
  if (allowAdvancedToolBarOptions) {
280
282
  var _pluginInjectionApi$a3;
@@ -319,9 +321,9 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
319
321
  title: intl.formatMessage(_card.layoutToMessages[selectedLayoutIcon.value]),
320
322
  icon: selectedLayoutIcon.icon
321
323
  };
322
- toolbarButtons = [].concat((0, _toConsumableArray2.default)(toolbarButtons), [trigger, {
324
+ toolbarButtons = [].concat((0, _toConsumableArray2.default)(toolbarButtons), [trigger], (0, _toConsumableArray2.default)(isEditorControlsEnabled && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6') ? [] : [{
323
325
  type: 'separator'
324
- }]);
326
+ }]));
325
327
  }
326
328
  }
327
329
  };
@@ -21,6 +21,7 @@ var _deleteEditorRemove = _interopRequireDefault(require("@atlaskit/icon/core/mi
21
21
  var _download = _interopRequireDefault(require("@atlaskit/icon/core/migration/download"));
22
22
  var _smartLinkCard = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-card"));
23
23
  var _mediaUi = require("@atlaskit/media-ui");
24
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
24
25
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
25
26
  var _linking = require("../../pm-plugins/commands/linking");
26
27
  var _linking2 = require("../../pm-plugins/linking");
@@ -224,9 +225,11 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
224
225
  });
225
226
  }
226
227
  });
227
- inlineImageItems.push({
228
- type: 'separator'
229
- });
228
+ if (!isEditorControlsEnabled || !(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6')) {
229
+ inlineImageItems.push({
230
+ type: 'separator'
231
+ });
232
+ }
230
233
  }
231
234
  var download = {
232
235
  id: 'editor.media.image.download',
@@ -111,7 +111,7 @@ const ImageBorder = ({
111
111
  content: jsx("div", null, jsx("button", {
112
112
  ref: dropDownColorOptionButton,
113
113
  type: "button",
114
- "aria-label": "Image border options Color dropdown button",
114
+ "aria-label": formatMessage(messages.borderColorDropdownAriaLabel),
115
115
  "data-testid": "image-border-dropdown-button-color"
116
116
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
117
117
  ,
@@ -173,7 +173,7 @@ const ImageBorder = ({
173
173
  }, {
174
174
  content: jsx("div", null, jsx("button", {
175
175
  type: "button",
176
- "aria-label": "Image border options Size dropdown button",
176
+ "aria-label": formatMessage(messages.borderSizeDropdownAriaLabel),
177
177
  "data-testid": "image-border-dropdown-button-size"
178
178
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
179
179
  ,
@@ -263,9 +263,11 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
263
263
  });
264
264
  }
265
265
  });
266
- toolbarButtons.push({
267
- type: 'separator'
268
- });
266
+ if (!isEditorControlsEnabled || !fg('platform_editor_controls_patch_6')) {
267
+ toolbarButtons.push({
268
+ type: 'separator'
269
+ });
270
+ }
269
271
  }
270
272
  if (allowAdvancedToolBarOptions) {
271
273
  var _pluginInjectionApi$a3;
@@ -310,9 +312,9 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
310
312
  title: intl.formatMessage(layoutToMessages[selectedLayoutIcon.value]),
311
313
  icon: selectedLayoutIcon.icon
312
314
  };
313
- toolbarButtons = [...toolbarButtons, trigger, {
315
+ toolbarButtons = [...toolbarButtons, trigger, ...(isEditorControlsEnabled && fg('platform_editor_controls_patch_6') ? [] : [{
314
316
  type: 'separator'
315
- }];
317
+ }])];
316
318
  }
317
319
  }
318
320
  };
@@ -12,6 +12,7 @@ import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
12
12
  import DownloadIcon from '@atlaskit/icon/core/migration/download';
13
13
  import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
14
14
  import { messages } from '@atlaskit/media-ui';
15
+ import { fg } from '@atlaskit/platform-feature-flags';
15
16
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
16
17
  import { showLinkingToolbar } from '../../pm-plugins/commands/linking';
17
18
  import { getMediaLinkingState } from '../../pm-plugins/linking';
@@ -213,9 +214,11 @@ const getMediaInlineImageToolbar = (state, intl, mediaPluginState, hoverDecorati
213
214
  });
214
215
  }
215
216
  });
216
- inlineImageItems.push({
217
- type: 'separator'
218
- });
217
+ if (!isEditorControlsEnabled || !fg('platform_editor_controls_patch_6')) {
218
+ inlineImageItems.push({
219
+ type: 'separator'
220
+ });
221
+ }
219
222
  }
220
223
  const download = {
221
224
  id: 'editor.media.image.download',
@@ -123,7 +123,7 @@ var ImageBorder = function ImageBorder(_ref) {
123
123
  content: jsx("div", null, jsx("button", {
124
124
  ref: dropDownColorOptionButton,
125
125
  type: "button",
126
- "aria-label": "Image border options Color dropdown button",
126
+ "aria-label": formatMessage(messages.borderColorDropdownAriaLabel),
127
127
  "data-testid": "image-border-dropdown-button-color"
128
128
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
129
129
  ,
@@ -189,7 +189,7 @@ var ImageBorder = function ImageBorder(_ref) {
189
189
  }, {
190
190
  content: jsx("div", null, jsx("button", {
191
191
  type: "button",
192
- "aria-label": "Image border options Size dropdown button",
192
+ "aria-label": formatMessage(messages.borderSizeDropdownAriaLabel),
193
193
  "data-testid": "image-border-dropdown-button-size"
194
194
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
195
195
  ,
@@ -262,9 +262,11 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
262
262
  });
263
263
  }
264
264
  });
265
- toolbarButtons.push({
266
- type: 'separator'
267
- });
265
+ if (!isEditorControlsEnabled || !fg('platform_editor_controls_patch_6')) {
266
+ toolbarButtons.push({
267
+ type: 'separator'
268
+ });
269
+ }
268
270
  }
269
271
  if (allowAdvancedToolBarOptions) {
270
272
  var _pluginInjectionApi$a3;
@@ -309,9 +311,9 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
309
311
  title: intl.formatMessage(layoutToMessages[selectedLayoutIcon.value]),
310
312
  icon: selectedLayoutIcon.icon
311
313
  };
312
- toolbarButtons = [].concat(_toConsumableArray(toolbarButtons), [trigger, {
314
+ toolbarButtons = [].concat(_toConsumableArray(toolbarButtons), [trigger], _toConsumableArray(isEditorControlsEnabled && fg('platform_editor_controls_patch_6') ? [] : [{
313
315
  type: 'separator'
314
- }]);
316
+ }]));
315
317
  }
316
318
  }
317
319
  };
@@ -15,6 +15,7 @@ import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
15
15
  import DownloadIcon from '@atlaskit/icon/core/migration/download';
16
16
  import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
17
17
  import { messages } from '@atlaskit/media-ui';
18
+ import { fg } from '@atlaskit/platform-feature-flags';
18
19
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
19
20
  import { showLinkingToolbar } from '../../pm-plugins/commands/linking';
20
21
  import { getMediaLinkingState } from '../../pm-plugins/linking';
@@ -214,9 +215,11 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
214
215
  });
215
216
  }
216
217
  });
217
- inlineImageItems.push({
218
- type: 'separator'
219
- });
218
+ if (!isEditorControlsEnabled || !fg('platform_editor_controls_patch_6')) {
219
+ inlineImageItems.push({
220
+ type: 'separator'
221
+ });
222
+ }
220
223
  }
221
224
  var download = {
222
225
  id: 'editor.media.image.download',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "2.6.4",
3
+ "version": "2.6.6",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/analytics-namespaced-context": "^7.0.0",
39
39
  "@atlaskit/analytics-next": "^11.0.0",
40
40
  "@atlaskit/button": "^23.0.0",
41
- "@atlaskit/editor-common": "^103.13.0",
41
+ "@atlaskit/editor-common": "^103.15.0",
42
42
  "@atlaskit/editor-palette": "^2.1.0",
43
43
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
44
44
  "@atlaskit/editor-plugin-annotation": "^2.7.0",