@atlaskit/editor-plugin-type-ahead 6.5.0 → 6.5.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,22 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 6.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8159502f4e3ed`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8159502f4e3ed) -
8
+ [ux] [ENGHEALTH-32547] Changes the colour of the typeahead item description text to fix a colour
9
+ contrast a11y violation
10
+ - Updated dependencies
11
+
12
+ ## 6.5.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [`ae2119490a207`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ae2119490a207) -
17
+ [ENGHEALTH-32516] Adds an aria-label to the React virtualized grid used in the type ahead menu
18
+ - Updated dependencies
19
+
3
20
  ## 6.5.0
4
21
 
5
22
  ### Minor Changes
@@ -17,6 +17,7 @@ var _messages = require("@atlaskit/editor-common/messages");
17
17
  var _typeAhead = require("@atlaskit/editor-common/type-ahead");
18
18
  var _ui = require("@atlaskit/editor-common/ui");
19
19
  var _menu = require("@atlaskit/menu");
20
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
21
  var _compiled = require("@atlaskit/primitives/compiled");
21
22
  var _closeTypeAhead = require("../pm-plugins/commands/close-type-ahead");
22
23
  var _updateSelectedIndex = require("../pm-plugins/commands/update-selected-index");
@@ -355,11 +356,11 @@ var TypeAheadListComponent = /*#__PURE__*/_react.default.memo(function (_ref2) {
355
356
  width: LIST_WIDTH,
356
357
  onScroll: onScroll,
357
358
  height: height,
358
- overscanRowCount: 3
359
+ overscanRowCount: 3,
360
+ "aria-label": (0, _platformFeatureFlags.fg)('platform_editor_typeahead_aria_label') ? (0, _utils.getTypeAheadListAriaLabels)(undefined, intl).popupAriaLabel :
359
361
  // We need to make this walkaround to make TS happy, cannot pass undefined otherwise ReactVirualized will make it equal to "grid" which we want to avoid
360
362
  // https://github.com/bvaughn/react-virtualized/blob/master/source/Grid/Grid.js#L260
361
- ,
362
- "aria-label": null,
363
+ null,
363
364
  containerRole: "presentation",
364
365
  role: "listbox"
365
366
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -90,6 +90,11 @@ var itemDescription = (0, _react2.css)({
90
90
  color: "".concat("var(--ds-text-subtlest, ".concat(_colors.N200, ")"), ";"),
91
91
  marginTop: "var(--ds-space-050, 4px)".concat(";")
92
92
  });
93
+ // when cleaning up FG `platform_editor_typeahead_description_text_colour`
94
+ // replace above color with this and delete itemDescriptionColor
95
+ var itemDescriptionColor = (0, _react2.css)({
96
+ color: "var(--ds-text-subtle, #44546F)".concat(";")
97
+ });
93
98
  var itemDescriptionOverride = (0, _react2.css)({
94
99
  font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
95
100
  marginTop: 0
@@ -291,7 +296,7 @@ var TypeAheadListItem = exports.TypeAheadListItem = /*#__PURE__*/_react.default.
291
296
  }, item.keyshortcut && (0, _react2.jsx)("div", {
292
297
  css: _shortcut.shortcutStyle
293
298
  }, item.keyshortcut))), (0, _react2.jsx)("div", {
294
- css: [itemDescription, moreElementsInQuickInsertViewEnabled && itemDescriptionOverride, itemIsDisabled && disabledStyle]
299
+ css: [itemDescription, (0, _platformFeatureFlags.fg)('platform_editor_typeahead_description_text_colour') && itemDescriptionColor, moreElementsInQuickInsertViewEnabled && itemDescriptionOverride, itemIsDisabled && disabledStyle]
295
300
  }, item.description)))))
296
301
  );
297
302
  });
@@ -15,6 +15,7 @@ import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/
15
15
  import { SelectItemMode, typeAheadListMessages } from '@atlaskit/editor-common/type-ahead';
16
16
  import { AssistiveText } from '@atlaskit/editor-common/ui';
17
17
  import { MenuGroup } from '@atlaskit/menu';
18
+ import { fg } from '@atlaskit/platform-feature-flags';
18
19
  import { Text, Box } from '@atlaskit/primitives/compiled';
19
20
  import { closeTypeAhead } from '../pm-plugins/commands/close-type-ahead';
20
21
  import { updateSelectedIndex } from '../pm-plugins/commands/update-selected-index';
@@ -335,11 +336,11 @@ const TypeAheadListComponent = /*#__PURE__*/React.memo(({
335
336
  width: LIST_WIDTH,
336
337
  onScroll: onScroll,
337
338
  height: height,
338
- overscanRowCount: 3
339
+ overscanRowCount: 3,
340
+ "aria-label": fg('platform_editor_typeahead_aria_label') ? getTypeAheadListAriaLabels(undefined, intl).popupAriaLabel :
339
341
  // We need to make this walkaround to make TS happy, cannot pass undefined otherwise ReactVirualized will make it equal to "grid" which we want to avoid
340
342
  // https://github.com/bvaughn/react-virtualized/blob/master/source/Grid/Grid.js#L260
341
- ,
342
- "aria-label": null,
343
+ null,
343
344
  containerRole: "presentation",
344
345
  role: "listbox"
345
346
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -85,6 +85,11 @@ const itemDescription = css({
85
85
  color: `${`var(--ds-text-subtlest, ${N200})`};`,
86
86
  marginTop: `${"var(--ds-space-050, 4px)"};`
87
87
  });
88
+ // when cleaning up FG `platform_editor_typeahead_description_text_colour`
89
+ // replace above color with this and delete itemDescriptionColor
90
+ const itemDescriptionColor = css({
91
+ color: `${"var(--ds-text-subtle, #44546F)"};`
92
+ });
88
93
  const itemDescriptionOverride = css({
89
94
  font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
90
95
  marginTop: 0
@@ -305,7 +310,7 @@ export const TypeAheadListItem = /*#__PURE__*/React.memo(({
305
310
  }, item.keyshortcut && jsx("div", {
306
311
  css: shortcutStyle
307
312
  }, item.keyshortcut))), jsx("div", {
308
- css: [itemDescription, moreElementsInQuickInsertViewEnabled && itemDescriptionOverride, itemIsDisabled && disabledStyle]
313
+ css: [itemDescription, fg('platform_editor_typeahead_description_text_colour') && itemDescriptionColor, moreElementsInQuickInsertViewEnabled && itemDescriptionOverride, itemIsDisabled && disabledStyle]
309
314
  }, item.description)))))
310
315
  );
311
316
  });
@@ -16,6 +16,7 @@ import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/
16
16
  import { SelectItemMode, typeAheadListMessages } from '@atlaskit/editor-common/type-ahead';
17
17
  import { AssistiveText } from '@atlaskit/editor-common/ui';
18
18
  import { MenuGroup } from '@atlaskit/menu';
19
+ import { fg } from '@atlaskit/platform-feature-flags';
19
20
  import { Text, Box } from '@atlaskit/primitives/compiled';
20
21
  import { closeTypeAhead } from '../pm-plugins/commands/close-type-ahead';
21
22
  import { updateSelectedIndex } from '../pm-plugins/commands/update-selected-index';
@@ -346,11 +347,11 @@ var TypeAheadListComponent = /*#__PURE__*/React.memo(function (_ref2) {
346
347
  width: LIST_WIDTH,
347
348
  onScroll: onScroll,
348
349
  height: height,
349
- overscanRowCount: 3
350
+ overscanRowCount: 3,
351
+ "aria-label": fg('platform_editor_typeahead_aria_label') ? getTypeAheadListAriaLabels(undefined, intl).popupAriaLabel :
350
352
  // We need to make this walkaround to make TS happy, cannot pass undefined otherwise ReactVirualized will make it equal to "grid" which we want to avoid
351
353
  // https://github.com/bvaughn/react-virtualized/blob/master/source/Grid/Grid.js#L260
352
- ,
353
- "aria-label": null,
354
+ null,
354
355
  containerRole: "presentation",
355
356
  role: "listbox"
356
357
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -82,6 +82,11 @@ var itemDescription = css({
82
82
  color: "".concat("var(--ds-text-subtlest, ".concat(N200, ")"), ";"),
83
83
  marginTop: "var(--ds-space-050, 4px)".concat(";")
84
84
  });
85
+ // when cleaning up FG `platform_editor_typeahead_description_text_colour`
86
+ // replace above color with this and delete itemDescriptionColor
87
+ var itemDescriptionColor = css({
88
+ color: "var(--ds-text-subtle, #44546F)".concat(";")
89
+ });
85
90
  var itemDescriptionOverride = css({
86
91
  font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
87
92
  marginTop: 0
@@ -283,7 +288,7 @@ export var TypeAheadListItem = /*#__PURE__*/React.memo(function (_ref2) {
283
288
  }, item.keyshortcut && jsx("div", {
284
289
  css: shortcutStyle
285
290
  }, item.keyshortcut))), jsx("div", {
286
- css: [itemDescription, moreElementsInQuickInsertViewEnabled && itemDescriptionOverride, itemIsDisabled && disabledStyle]
291
+ css: [itemDescription, fg('platform_editor_typeahead_description_text_colour') && itemDescriptionColor, moreElementsInQuickInsertViewEnabled && itemDescriptionOverride, itemIsDisabled && disabledStyle]
287
292
  }, item.description)))))
288
293
  );
289
294
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "6.5.0",
3
+ "version": "6.5.2",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/editor-plugin-context-panel": "^8.0.0",
37
37
  "@atlaskit/editor-plugin-metrics": "^7.1.0",
38
38
  "@atlaskit/editor-prosemirror": "7.0.0",
39
- "@atlaskit/editor-shared-styles": "^3.7.0",
39
+ "@atlaskit/editor-shared-styles": "^3.8.0",
40
40
  "@atlaskit/heading": "^5.2.0",
41
41
  "@atlaskit/icon": "^28.5.0",
42
42
  "@atlaskit/insm": "^0.1.0",
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/prosemirror-history": "^0.2.0",
47
47
  "@atlaskit/prosemirror-input-rules": "^3.5.0",
48
48
  "@atlaskit/theme": "^21.0.0",
49
- "@atlaskit/tmp-editor-statsig": "^13.13.0",
49
+ "@atlaskit/tmp-editor-statsig": "^13.18.0",
50
50
  "@atlaskit/tokens": "^7.0.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "@emotion/react": "^11.7.1",
@@ -57,7 +57,7 @@
57
57
  "w3c-keyname": "^2.1.8"
58
58
  },
59
59
  "peerDependencies": {
60
- "@atlaskit/editor-common": "^110.14.0",
60
+ "@atlaskit/editor-common": "^110.17.0",
61
61
  "react": "^18.2.0",
62
62
  "react-dom": "^18.2.0",
63
63
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -112,6 +112,12 @@
112
112
  },
113
113
  "platform_editor_a11y_remove_input_query_on_click": {
114
114
  "type": "boolean"
115
+ },
116
+ "platform_editor_typeahead_aria_label": {
117
+ "type": "boolean"
118
+ },
119
+ "platform_editor_typeahead_description_text_colour": {
120
+ "type": "boolean"
115
121
  }
116
122
  }
117
123
  }