@atlaskit/editor-plugin-status 22.0.3 → 22.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,40 @@
1
1
  # @atlaskit/editor-plugin-status
2
2
 
3
+ ## 22.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a034f535638cc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a034f535638cc) -
8
+ Add structured Quick Insert previews with localised title, description and attribution under
9
+ platform_editor_slash_command.
10
+
11
+ Exclude footer and category navigation actions from previews. Left-align attribution, use subtle
12
+ title and attribution text, and default description text.
13
+
14
+ Show text previews even without preview metadata, and reserve a fixed image area while images load
15
+ or when they fail. Keep previews within the viewport, flipping left when needed, with compact
16
+ panel dimensions and typography.
17
+
18
+ Replace baked panel screenshots with image-only assets. Remove image fields from text-only legacy
19
+ previews while preserving their attribution.
20
+
21
+ Let extension providers own their preview images and attribution. Pass preview metadata through
22
+ the Company Hub manifest factory and remove Editor's fallback preview registry.
23
+
24
+ Localize provider attribution names and display Confluence and Jira product icons instead of the
25
+ attribution prefix when an icon is present. Allow the Dropbox manifest to receive the host's
26
+ message formatter.
27
+
28
+ - Updated dependencies
29
+
30
+ ## 22.0.4
31
+
32
+ ### Patch Changes
33
+
34
+ - [`ac601b5b2d024`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ac601b5b2d024) -
35
+ Enable updated status colors when platform_editor_update_status_colors_jira is enabled
36
+ - Updated dependencies
37
+
3
38
  ## 22.0.3
4
39
 
5
40
  ### Patch Changes
@@ -11,6 +11,7 @@ var _reactIntl = require("react-intl");
11
11
  var _analytics = require("@atlaskit/editor-common/analytics");
12
12
  var _messages = require("@atlaskit/editor-common/messages");
13
13
  var _menuItem = require("@atlaskit/editor-common/quick-insert/menu-item");
14
+ var _messages2 = require("@atlaskit/editor-common/quick-insert/messages");
14
15
  var _lozenge = _interopRequireDefault(require("@atlaskit/icon-lab/core/lozenge"));
15
16
  var _actions = require("../../pm-plugins/actions");
16
17
  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); }
@@ -19,6 +20,14 @@ var StatusQuickInsertMenuItem = exports.StatusQuickInsertMenuItem = function Sta
19
20
  previewImageUrls = _ref.previewImageUrls;
20
21
  var _useIntl = (0, _reactIntl.useIntl)(),
21
22
  formatMessage = _useIntl.formatMessage;
23
+ var preview = (0, _react.useMemo)(function () {
24
+ return previewImageUrls ? {
25
+ image: previewImageUrls,
26
+ attribution: {
27
+ name: formatMessage(_messages2.messages.previewAttributionAtlassian)
28
+ }
29
+ } : undefined;
30
+ }, [formatMessage, previewImageUrls]);
22
31
  var onSelect = (0, _react.useCallback)(function (_ref2) {
23
32
  var _insertStatus, _api$analytics;
24
33
  var insert = _ref2.insert;
@@ -28,11 +37,12 @@ var StatusQuickInsertMenuItem = exports.StatusQuickInsertMenuItem = function Sta
28
37
  })) !== null && _insertStatus !== void 0 ? _insertStatus : tr;
29
38
  }, [api]);
30
39
  return /*#__PURE__*/_react.default.createElement(_menuItem.QuickInsertMenuItem, {
40
+ description: formatMessage(_messages.toolbarInsertBlockMessages.statusDescription),
31
41
  iconBefore: /*#__PURE__*/_react.default.createElement(_lozenge.default, {
32
42
  label: ""
33
43
  }),
34
44
  onSelect: onSelect,
35
- previewImageUrls: previewImageUrls,
45
+ preview: preview,
36
46
  title: formatMessage(_messages.toolbarInsertBlockMessages.status)
37
47
  });
38
48
  };
@@ -12,8 +12,8 @@ var _keys = require("@atlaskit/editor-common/quick-insert/keys");
12
12
  var _rank = require("@atlaskit/editor-common/quick-insert/rank");
13
13
  var _StatusQuickInsertMenuItem = require("./StatusQuickInsertMenuItem");
14
14
  var previewImageUrls = {
15
- light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/se7cdbko55l5f1b6o8wp26lr470420wy.png',
16
- dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/7tnn52vck25nq56ornv4q55e065uhxyc.png'
15
+ light: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVKM.png',
16
+ dark: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVH8.png'
17
17
  };
18
18
  var getStatusQuickInsertComponents = exports.getStatusQuickInsertComponents = function getStatusQuickInsertComponents(_ref) {
19
19
  var api = _ref.api;
@@ -481,7 +481,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
481
481
  color = _this$state3.color,
482
482
  text = _this$state3.text;
483
483
  var suggestionsPatchEnabled = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_status_popup_suggestions') && (0, _fg.fg)('platform_editor_status_popup_suggestions_patch_1');
484
- var isUpdateStatusColorsEnabled = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_update_status_colors');
484
+ var isUpdateStatusColorsEnabled = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_update_status_colors') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_update_status_colors_jira');
485
485
  var suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_status_popup_suggestions') ? (0, _react2.jsx)("div", {
486
486
  css: [suggestedStatusesContainerStyles, suggestionsPatchEnabled ? suggestedStatusesContainerPatchStyles : undefined, suggestionsPatchEnabled && (isUpdateStatusColorsEnabled || (0, _fg.fg)('platform_editor_status_popup_suggestions_patch_3')) ? suggestedStatusesContainerAlignedBottomPaddingStyles : undefined],
487
487
  "data-suggested-status-list": true
@@ -539,7 +539,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
539
539
  if (!(editorView !== null && editorView !== void 0 && editorView.editable)) {
540
540
  return null;
541
541
  }
542
- var fitHeight = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_update_status_colors') ? STATUS_PICKER_TEN_COLOR_FIT_HEIGHT : (0, _fg.fg)('platform_editor_status_popup_suggestions_patch_3') ? STATUS_PICKER_FIT_HEIGHT : STATUS_PICKER_FIT_HEIGHT_OLD;
542
+ var fitHeight = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_update_status_colors') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_update_status_colors_jira') ? STATUS_PICKER_TEN_COLOR_FIT_HEIGHT : (0, _fg.fg)('platform_editor_status_popup_suggestions_patch_3') ? STATUS_PICKER_FIT_HEIGHT : STATUS_PICKER_FIT_HEIGHT_OLD;
543
543
  return target && (0, _react2.jsx)(PopupWithListeners, {
544
544
  ariaLabel: intl.formatMessage(_messages.statusMessages.statusEditorLabel),
545
545
  target: target
@@ -1,8 +1,9 @@
1
- import React, { useCallback } from 'react';
1
+ import React, { useCallback, useMemo } from 'react';
2
2
  import { useIntl } from 'react-intl';
3
3
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
6
+ import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
6
7
  import LozengeIcon from '@atlaskit/icon-lab/core/lozenge';
7
8
  import { insertStatus } from '../../pm-plugins/actions';
8
9
  export const StatusQuickInsertMenuItem = ({
@@ -12,6 +13,12 @@ export const StatusQuickInsertMenuItem = ({
12
13
  const {
13
14
  formatMessage
14
15
  } = useIntl();
16
+ const preview = useMemo(() => previewImageUrls ? {
17
+ image: previewImageUrls,
18
+ attribution: {
19
+ name: formatMessage(quickInsertMessages.previewAttributionAtlassian)
20
+ }
21
+ } : undefined, [formatMessage, previewImageUrls]);
15
22
  const onSelect = useCallback(({
16
23
  insert
17
24
  }) => {
@@ -22,11 +29,12 @@ export const StatusQuickInsertMenuItem = ({
22
29
  })) !== null && _insertStatus !== void 0 ? _insertStatus : tr;
23
30
  }, [api]);
24
31
  return /*#__PURE__*/React.createElement(QuickInsertMenuItem, {
32
+ description: formatMessage(messages.statusDescription),
25
33
  iconBefore: /*#__PURE__*/React.createElement(LozengeIcon, {
26
34
  label: ""
27
35
  }),
28
36
  onSelect: onSelect,
29
- previewImageUrls: previewImageUrls,
37
+ preview: preview,
30
38
  title: formatMessage(messages.status)
31
39
  });
32
40
  };
@@ -5,8 +5,8 @@ import { STATUS_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/qui
5
5
  import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
6
6
  import { StatusQuickInsertMenuItem } from './StatusQuickInsertMenuItem';
7
7
  const previewImageUrls = {
8
- light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/se7cdbko55l5f1b6o8wp26lr470420wy.png',
9
- dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/7tnn52vck25nq56ornv4q55e065uhxyc.png'
8
+ light: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVKM.png',
9
+ dark: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVH8.png'
10
10
  };
11
11
  export const getStatusQuickInsertComponents = ({
12
12
  api
@@ -455,7 +455,7 @@ class StatusPickerWithIntl extends React.Component {
455
455
  text
456
456
  } = this.state;
457
457
  const suggestionsPatchEnabled = isExperimentEnabled('platform_editor_status_popup_suggestions') && fg('platform_editor_status_popup_suggestions_patch_1');
458
- const isUpdateStatusColorsEnabled = isExperimentEnabled('platform_editor_update_status_colors');
458
+ const isUpdateStatusColorsEnabled = isExperimentEnabled('platform_editor_update_status_colors') || isExperimentEnabled('platform_editor_update_status_colors_jira');
459
459
  const suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length && isExperimentEnabled('platform_editor_status_popup_suggestions') ? jsx("div", {
460
460
  css: [suggestedStatusesContainerStyles, suggestionsPatchEnabled ? suggestedStatusesContainerPatchStyles : undefined, suggestionsPatchEnabled && (isUpdateStatusColorsEnabled || fg('platform_editor_status_popup_suggestions_patch_3')) ? suggestedStatusesContainerAlignedBottomPaddingStyles : undefined],
461
461
  "data-suggested-status-list": true
@@ -508,7 +508,7 @@ class StatusPickerWithIntl extends React.Component {
508
508
  if (!(editorView !== null && editorView !== void 0 && editorView.editable)) {
509
509
  return null;
510
510
  }
511
- const fitHeight = isExperimentEnabled('platform_editor_update_status_colors') ? STATUS_PICKER_TEN_COLOR_FIT_HEIGHT : fg('platform_editor_status_popup_suggestions_patch_3') ? STATUS_PICKER_FIT_HEIGHT : STATUS_PICKER_FIT_HEIGHT_OLD;
511
+ const fitHeight = isExperimentEnabled('platform_editor_update_status_colors') || isExperimentEnabled('platform_editor_update_status_colors_jira') ? STATUS_PICKER_TEN_COLOR_FIT_HEIGHT : fg('platform_editor_status_popup_suggestions_patch_3') ? STATUS_PICKER_FIT_HEIGHT : STATUS_PICKER_FIT_HEIGHT_OLD;
512
512
  return target && jsx(PopupWithListeners, {
513
513
  ariaLabel: intl.formatMessage(messages.statusEditorLabel),
514
514
  target: target
@@ -1,8 +1,9 @@
1
- import React, { useCallback } from 'react';
1
+ import React, { useCallback, useMemo } from 'react';
2
2
  import { useIntl } from 'react-intl';
3
3
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
6
+ import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
6
7
  import LozengeIcon from '@atlaskit/icon-lab/core/lozenge';
7
8
  import { insertStatus } from '../../pm-plugins/actions';
8
9
  export var StatusQuickInsertMenuItem = function StatusQuickInsertMenuItem(_ref) {
@@ -10,6 +11,14 @@ export var StatusQuickInsertMenuItem = function StatusQuickInsertMenuItem(_ref)
10
11
  previewImageUrls = _ref.previewImageUrls;
11
12
  var _useIntl = useIntl(),
12
13
  formatMessage = _useIntl.formatMessage;
14
+ var preview = useMemo(function () {
15
+ return previewImageUrls ? {
16
+ image: previewImageUrls,
17
+ attribution: {
18
+ name: formatMessage(quickInsertMessages.previewAttributionAtlassian)
19
+ }
20
+ } : undefined;
21
+ }, [formatMessage, previewImageUrls]);
13
22
  var onSelect = useCallback(function (_ref2) {
14
23
  var _insertStatus, _api$analytics;
15
24
  var insert = _ref2.insert;
@@ -19,11 +28,12 @@ export var StatusQuickInsertMenuItem = function StatusQuickInsertMenuItem(_ref)
19
28
  })) !== null && _insertStatus !== void 0 ? _insertStatus : tr;
20
29
  }, [api]);
21
30
  return /*#__PURE__*/React.createElement(QuickInsertMenuItem, {
31
+ description: formatMessage(messages.statusDescription),
22
32
  iconBefore: /*#__PURE__*/React.createElement(LozengeIcon, {
23
33
  label: ""
24
34
  }),
25
35
  onSelect: onSelect,
26
- previewImageUrls: previewImageUrls,
36
+ preview: preview,
27
37
  title: formatMessage(messages.status)
28
38
  });
29
39
  };
@@ -5,8 +5,8 @@ import { STATUS_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/qui
5
5
  import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
6
6
  import { StatusQuickInsertMenuItem } from './StatusQuickInsertMenuItem';
7
7
  var previewImageUrls = {
8
- light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/se7cdbko55l5f1b6o8wp26lr470420wy.png',
9
- dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/7tnn52vck25nq56ornv4q55e065uhxyc.png'
8
+ light: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVKM.png',
9
+ dark: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVH8.png'
10
10
  };
11
11
  export var getStatusQuickInsertComponents = function getStatusQuickInsertComponents(_ref) {
12
12
  var api = _ref.api;
@@ -478,7 +478,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
478
478
  color = _this$state3.color,
479
479
  text = _this$state3.text;
480
480
  var suggestionsPatchEnabled = isExperimentEnabled('platform_editor_status_popup_suggestions') && fg('platform_editor_status_popup_suggestions_patch_1');
481
- var isUpdateStatusColorsEnabled = isExperimentEnabled('platform_editor_update_status_colors');
481
+ var isUpdateStatusColorsEnabled = isExperimentEnabled('platform_editor_update_status_colors') || isExperimentEnabled('platform_editor_update_status_colors_jira');
482
482
  var suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length && isExperimentEnabled('platform_editor_status_popup_suggestions') ? jsx("div", {
483
483
  css: [suggestedStatusesContainerStyles, suggestionsPatchEnabled ? suggestedStatusesContainerPatchStyles : undefined, suggestionsPatchEnabled && (isUpdateStatusColorsEnabled || fg('platform_editor_status_popup_suggestions_patch_3')) ? suggestedStatusesContainerAlignedBottomPaddingStyles : undefined],
484
484
  "data-suggested-status-list": true
@@ -536,7 +536,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
536
536
  if (!(editorView !== null && editorView !== void 0 && editorView.editable)) {
537
537
  return null;
538
538
  }
539
- var fitHeight = isExperimentEnabled('platform_editor_update_status_colors') ? STATUS_PICKER_TEN_COLOR_FIT_HEIGHT : fg('platform_editor_status_popup_suggestions_patch_3') ? STATUS_PICKER_FIT_HEIGHT : STATUS_PICKER_FIT_HEIGHT_OLD;
539
+ var fitHeight = isExperimentEnabled('platform_editor_update_status_colors') || isExperimentEnabled('platform_editor_update_status_colors_jira') ? STATUS_PICKER_TEN_COLOR_FIT_HEIGHT : fg('platform_editor_status_popup_suggestions_patch_3') ? STATUS_PICKER_FIT_HEIGHT : STATUS_PICKER_FIT_HEIGHT_OLD;
540
540
  return target && jsx(PopupWithListeners, {
541
541
  ariaLabel: intl.formatMessage(messages.statusEditorLabel),
542
542
  target: target
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-status",
3
- "version": "22.0.3",
3
+ "version": "22.0.5",
4
4
  "description": "Status plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,21 +31,21 @@
31
31
  "@atlaskit/editor-plugin-ui-control-registry": "^15.0.0",
32
32
  "@atlaskit/editor-prosemirror": "^9.0.0",
33
33
  "@atlaskit/editor-shared-styles": "^4.3.0",
34
- "@atlaskit/editor-toolbar": "^2.7.0",
34
+ "@atlaskit/editor-toolbar": "^2.8.0",
35
35
  "@atlaskit/editor-ui-control-model": "^2.10.0",
36
36
  "@atlaskit/icon": "^38.0.0",
37
- "@atlaskit/icon-lab": "^7.9.0",
37
+ "@atlaskit/icon-lab": "^7.10.0",
38
38
  "@atlaskit/platform-feature-experiments": "^0.3.0",
39
39
  "@atlaskit/platform-feature-flags": "^2.2.0",
40
40
  "@atlaskit/status": "^5.12.0",
41
- "@atlaskit/tmp-editor-statsig": "^208.0.0",
41
+ "@atlaskit/tmp-editor-statsig": "^209.0.0",
42
42
  "@atlaskit/tokens": "^20.0.0",
43
43
  "@atlaskit/visually-hidden": "^4.4.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@emotion/react": "^11.7.1"
46
46
  },
47
47
  "peerDependencies": {
48
- "@atlaskit/editor-common": "^125.2.0",
48
+ "@atlaskit/editor-common": "^125.4.0",
49
49
  "react": "^18.2.0 || ^19.2.0",
50
50
  "react-dom": "^18.2.0 || ^19.2.0",
51
51
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"