@atlaskit/editor-plugin-synced-block 21.0.1 → 21.0.2

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,14 @@
1
1
  # @atlaskit/editor-plugin-synced-block
2
2
 
3
+ ## 21.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`21140f5f58c3f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/21140f5f58c3f) -
8
+ EDITOR-9292: Synced locations show the Jira work item avatar for every issue type, matching smart
9
+ links and breadcrumbs, behind the platform_editor_blocks_patch_11 experiment.
10
+ - Updated dependencies
11
+
3
12
  ## 21.0.1
4
13
 
5
14
  ### Patch Changes
@@ -18,6 +18,7 @@
18
18
  ._1bto1l2s{text-overflow:ellipsis}
19
19
  ._1e0c1txw{display:flex}
20
20
  ._1hmsglyw{text-decoration-line:none}
21
+ ._1o9zidpf{flex-shrink:0}
21
22
  ._1reo15vq{overflow-x:hidden}
22
23
  ._1tkeqkoa{min-height:9pc}
23
24
  ._1ul91wqb{min-width:60px}
@@ -56,6 +56,10 @@ var dropdownItemStyles = null;
56
56
 
57
57
  // logo icon does not fit in ADS IconTile, hence we need custom styles to match with other icons
58
58
  var logoTileStyles = null;
59
+
60
+ // Breadcrumbs and smart links draw the work item avatar without a tile. The 20px box keeps
61
+ // Jira rows aligned with the tiled Confluence rows.
62
+ var issueTypeAvatarStyles = null;
59
63
  var SYNCED_LOCATIONS_DROPDOWN_TEST_ID = 'synced-block-synced-locations-dropdown';
60
64
  var styles = {
61
65
  title: "_1reo15vq _18m915vq _syazazsu _1bto1l2s _o5721q9c",
@@ -150,8 +154,8 @@ var ProductIcon = function ProductIcon(_ref2) {
150
154
  };
151
155
 
152
156
  // Map AGG issue-type names to ADS icons. The mapping is by the English `name` returned
153
- // from AGG because Jira's REST/GraphQL API does not localise it at this layer. Custom
154
- // (non-default) issue types fall through to the AGG `iconUrl`.
157
+ // from AGG because Jira's REST/GraphQL API does not localise it at this layer. With
158
+ // `platform_editor_blocks_patch_11` the AGG `iconUrl` wins and these icons are the fallback.
155
159
  //
156
160
  // Type the icons as the same shape as `TaskIcon` so we don't import `NewCoreIconProps`
157
161
  // from a private icon entrypoint.
@@ -223,8 +227,18 @@ var createCustomIssueTypeIcon = function createCustomIssueTypeIcon(iconUrl) {
223
227
  */
224
228
  var renderJiraIssueTypeIcon = function renderJiraIssueTypeIcon(issueType, intl) {
225
229
  var mapped = jiraIssueTypeIconMap[issueType.name];
230
+ var label = intl.formatMessage(mapped ? _messages.syncBlockMessages[mapped.messageKey] : _messages.syncBlockMessages.syncedLocationDropdownIssueTypeGeneric);
231
+ if (issueType.iconUrl && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_blocks_patch_11')) {
232
+ return /*#__PURE__*/React.createElement("span", {
233
+ className: (0, _runtime.ax)(["_1bsbgktf _4t3igktf _1e0c1txw _1o9zidpf _4cvr1h6o _1bah1h6o"])
234
+ }, /*#__PURE__*/React.createElement("img", {
235
+ src: issueType.iconUrl,
236
+ alt: label,
237
+ width: "16",
238
+ height: "16"
239
+ }));
240
+ }
226
241
  if (mapped) {
227
- var label = intl.formatMessage(_messages.syncBlockMessages[mapped.messageKey]);
228
242
  return /*#__PURE__*/React.createElement(_iconTile.default, {
229
243
  icon: mapped.icon,
230
244
  label: label,
@@ -237,10 +251,9 @@ var renderJiraIssueTypeIcon = function renderJiraIssueTypeIcon(issueType, intl)
237
251
  // icon gets the same tile background, border-radius, and sizing as known issue types.
238
252
  if (issueType.iconUrl) {
239
253
  var CustomIcon = createCustomIssueTypeIcon(issueType.iconUrl);
240
- var _label = intl.formatMessage(_messages.syncBlockMessages.syncedLocationDropdownIssueTypeGeneric);
241
254
  return /*#__PURE__*/React.createElement(_iconTile.default, {
242
255
  icon: CustomIcon,
243
- label: _label,
256
+ label: label,
244
257
  appearance: 'gray',
245
258
  size: "xsmall"
246
259
  });
@@ -18,6 +18,7 @@
18
18
  ._1bto1l2s{text-overflow:ellipsis}
19
19
  ._1e0c1txw{display:flex}
20
20
  ._1hmsglyw{text-decoration-line:none}
21
+ ._1o9zidpf{flex-shrink:0}
21
22
  ._1reo15vq{overflow-x:hidden}
22
23
  ._1tkeqkoa{min-height:9pc}
23
24
  ._1ul91wqb{min-width:60px}
@@ -39,6 +39,10 @@ const dropdownItemStyles = null;
39
39
 
40
40
  // logo icon does not fit in ADS IconTile, hence we need custom styles to match with other icons
41
41
  const logoTileStyles = null;
42
+
43
+ // Breadcrumbs and smart links draw the work item avatar without a tile. The 20px box keeps
44
+ // Jira rows aligned with the tiled Confluence rows.
45
+ const issueTypeAvatarStyles = null;
42
46
  const SYNCED_LOCATIONS_DROPDOWN_TEST_ID = 'synced-block-synced-locations-dropdown';
43
47
  const styles = {
44
48
  title: "_1reo15vq _18m915vq _syazazsu _1bto1l2s _o5721q9c",
@@ -134,8 +138,8 @@ const ProductIcon = ({
134
138
  };
135
139
 
136
140
  // Map AGG issue-type names to ADS icons. The mapping is by the English `name` returned
137
- // from AGG because Jira's REST/GraphQL API does not localise it at this layer. Custom
138
- // (non-default) issue types fall through to the AGG `iconUrl`.
141
+ // from AGG because Jira's REST/GraphQL API does not localise it at this layer. With
142
+ // `platform_editor_blocks_patch_11` the AGG `iconUrl` wins and these icons are the fallback.
139
143
  //
140
144
  // Type the icons as the same shape as `TaskIcon` so we don't import `NewCoreIconProps`
141
145
  // from a private icon entrypoint.
@@ -205,8 +209,18 @@ const createCustomIssueTypeIcon = iconUrl => {
205
209
  */
206
210
  const renderJiraIssueTypeIcon = (issueType, intl) => {
207
211
  const mapped = jiraIssueTypeIconMap[issueType.name];
212
+ const label = intl.formatMessage(mapped ? messages[mapped.messageKey] : messages.syncedLocationDropdownIssueTypeGeneric);
213
+ if (issueType.iconUrl && isExperimentEnabled('platform_editor_blocks_patch_11')) {
214
+ return /*#__PURE__*/React.createElement("span", {
215
+ className: ax(["_1bsbgktf _4t3igktf _1e0c1txw _1o9zidpf _4cvr1h6o _1bah1h6o"])
216
+ }, /*#__PURE__*/React.createElement("img", {
217
+ src: issueType.iconUrl,
218
+ alt: label,
219
+ width: "16",
220
+ height: "16"
221
+ }));
222
+ }
208
223
  if (mapped) {
209
- const label = intl.formatMessage(messages[mapped.messageKey]);
210
224
  return /*#__PURE__*/React.createElement(IconTile, {
211
225
  icon: mapped.icon,
212
226
  label: label,
@@ -219,7 +233,6 @@ const renderJiraIssueTypeIcon = (issueType, intl) => {
219
233
  // icon gets the same tile background, border-radius, and sizing as known issue types.
220
234
  if (issueType.iconUrl) {
221
235
  const CustomIcon = createCustomIssueTypeIcon(issueType.iconUrl);
222
- const label = intl.formatMessage(messages.syncedLocationDropdownIssueTypeGeneric);
223
236
  return /*#__PURE__*/React.createElement(IconTile, {
224
237
  icon: CustomIcon,
225
238
  label: label,
@@ -18,6 +18,7 @@
18
18
  ._1bto1l2s{text-overflow:ellipsis}
19
19
  ._1e0c1txw{display:flex}
20
20
  ._1hmsglyw{text-decoration-line:none}
21
+ ._1o9zidpf{flex-shrink:0}
21
22
  ._1reo15vq{overflow-x:hidden}
22
23
  ._1tkeqkoa{min-height:9pc}
23
24
  ._1ul91wqb{min-width:60px}
@@ -48,6 +48,10 @@ var dropdownItemStyles = null;
48
48
 
49
49
  // logo icon does not fit in ADS IconTile, hence we need custom styles to match with other icons
50
50
  var logoTileStyles = null;
51
+
52
+ // Breadcrumbs and smart links draw the work item avatar without a tile. The 20px box keeps
53
+ // Jira rows aligned with the tiled Confluence rows.
54
+ var issueTypeAvatarStyles = null;
51
55
  var SYNCED_LOCATIONS_DROPDOWN_TEST_ID = 'synced-block-synced-locations-dropdown';
52
56
  var styles = {
53
57
  title: "_1reo15vq _18m915vq _syazazsu _1bto1l2s _o5721q9c",
@@ -142,8 +146,8 @@ var ProductIcon = function ProductIcon(_ref2) {
142
146
  };
143
147
 
144
148
  // Map AGG issue-type names to ADS icons. The mapping is by the English `name` returned
145
- // from AGG because Jira's REST/GraphQL API does not localise it at this layer. Custom
146
- // (non-default) issue types fall through to the AGG `iconUrl`.
149
+ // from AGG because Jira's REST/GraphQL API does not localise it at this layer. With
150
+ // `platform_editor_blocks_patch_11` the AGG `iconUrl` wins and these icons are the fallback.
147
151
  //
148
152
  // Type the icons as the same shape as `TaskIcon` so we don't import `NewCoreIconProps`
149
153
  // from a private icon entrypoint.
@@ -215,8 +219,18 @@ var createCustomIssueTypeIcon = function createCustomIssueTypeIcon(iconUrl) {
215
219
  */
216
220
  var renderJiraIssueTypeIcon = function renderJiraIssueTypeIcon(issueType, intl) {
217
221
  var mapped = jiraIssueTypeIconMap[issueType.name];
222
+ var label = intl.formatMessage(mapped ? messages[mapped.messageKey] : messages.syncedLocationDropdownIssueTypeGeneric);
223
+ if (issueType.iconUrl && isExperimentEnabled('platform_editor_blocks_patch_11')) {
224
+ return /*#__PURE__*/React.createElement("span", {
225
+ className: ax(["_1bsbgktf _4t3igktf _1e0c1txw _1o9zidpf _4cvr1h6o _1bah1h6o"])
226
+ }, /*#__PURE__*/React.createElement("img", {
227
+ src: issueType.iconUrl,
228
+ alt: label,
229
+ width: "16",
230
+ height: "16"
231
+ }));
232
+ }
218
233
  if (mapped) {
219
- var label = intl.formatMessage(messages[mapped.messageKey]);
220
234
  return /*#__PURE__*/React.createElement(IconTile, {
221
235
  icon: mapped.icon,
222
236
  label: label,
@@ -229,10 +243,9 @@ var renderJiraIssueTypeIcon = function renderJiraIssueTypeIcon(issueType, intl)
229
243
  // icon gets the same tile background, border-radius, and sizing as known issue types.
230
244
  if (issueType.iconUrl) {
231
245
  var CustomIcon = createCustomIssueTypeIcon(issueType.iconUrl);
232
- var _label = intl.formatMessage(messages.syncedLocationDropdownIssueTypeGeneric);
233
246
  return /*#__PURE__*/React.createElement(IconTile, {
234
247
  icon: CustomIcon,
235
- label: _label,
248
+ label: label,
236
249
  appearance: 'gray',
237
250
  size: "xsmall"
238
251
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-synced-block",
3
- "version": "21.0.1",
3
+ "version": "21.0.2",
4
4
  "description": "SyncedBlock plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -53,7 +53,7 @@
53
53
  "@atlaskit/platform-feature-flags": "^2.2.0",
54
54
  "@atlaskit/primitives": "^22.5.0",
55
55
  "@atlaskit/spinner": "20.4.4",
56
- "@atlaskit/tmp-editor-statsig": "^219.0.0",
56
+ "@atlaskit/tmp-editor-statsig": "^220.0.0",
57
57
  "@atlaskit/tokens": "20.1.0",
58
58
  "@atlaskit/tooltip": "^24.4.0",
59
59
  "@atlaskit/visually-hidden": "^4.4.0",
@@ -65,7 +65,7 @@
65
65
  "memoize-one": "^6.0.0"
66
66
  },
67
67
  "peerDependencies": {
68
- "@atlaskit/editor-common": "^127.1.0",
68
+ "@atlaskit/editor-common": "^127.2.0",
69
69
  "react": "^18.2.0 || ^19.2.0",
70
70
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
71
71
  },