@atlaskit/editor-plugin-mentions 32.0.2 → 32.0.4

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,35 @@
1
1
  # @atlaskit/editor-plugin-mentions
2
2
 
3
+ ## 32.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`69008f6bdcb98`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/69008f6bdcb98) -
8
+ Adjust all mention picker rows and emoji results to use 6px vertical padding, 8px between rows,
9
+ and 2px between primary and secondary text behind platform_editor_mentions_email_search.
10
+
11
+ Center the avatar and text within the 50px selection row and reserve the 8px gap outside the
12
+ selection and focus backgrounds.
13
+
14
+ Share the presentational picker row between mentions and emoji through
15
+ `@atlaskit/user-picker/picker-item-content`.
16
+
17
+ Apply the same gated preview spacing to the emoji picker footer, and use 12px horizontal padding
18
+ and avatar-to-text spacing for both mentions and emoji.
19
+
20
+ Consolidate byline formatting within the email-search layout, keeping the original byline
21
+ components in the legacy path and subtext presentation internal to each layout.
22
+
23
+ - Updated dependencies
24
+
25
+ ## 32.0.3
26
+
27
+ ### Patch Changes
28
+
29
+ - [`7efec208f3bb4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7efec208f3bb4) -
30
+ Remove unused runtime dependencies
31
+ - Updated dependencies
32
+
3
33
  ## 32.0.2
4
34
 
5
35
  ### Patch Changes
@@ -45,7 +45,7 @@ var ACTIONS = exports.ACTIONS = {
45
45
  CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
46
46
  };
47
47
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
48
- var PACKAGE_VERSION = "32.0.1";
48
+ var PACKAGE_VERSION = "32.0.3";
49
49
  var setProvider = function setProvider(provider) {
50
50
  return function (state, dispatch) {
51
51
  if (dispatch) {
@@ -1,9 +1,11 @@
1
1
  ._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
2
  ._189eidpf{border-width:0}
3
3
  ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
4
+ ._1rjc12x7{padding-block:var(--ds-space-075,6px)}
4
5
  ._1rjcu2gc{padding-block:var(--ds-space-100,8px)}
5
6
  ._1bsb1osq{width:100%}
6
7
  ._1e0c1txw{display:flex}
8
+ ._1tke12am{min-height:50px}
7
9
  ._1tke1ylp{min-height:40px}
8
10
  ._4cvr1h6o{align-items:center}
9
11
  ._80omtlke{cursor:pointer}
@@ -14,12 +14,14 @@ var _runtime = require("@compiled/react/runtime");
14
14
  var _reactIntl = require("react-intl");
15
15
  var _mentions = require("@atlaskit/editor-common/messages/mentions");
16
16
  var _statusError = _interopRequireDefault(require("@atlaskit/icon/core/status-error"));
17
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
17
18
  var _inline = require("@atlaskit/primitives/compiled/inline");
18
19
  var _text = require("@atlaskit/primitives/compiled/text");
19
20
  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); }
20
21
  var styles = {
21
22
  retryRow: "_11c8fhey _189eidpf _1rjcu2gc _18zrutpp _4cvr1h6o _bfhk1j28 _vchhusvi _syazazsu _80omtlke _1e0c1txw _1tke1ylp _y3gn1e5h _1bsb1osq",
22
- retryText: "_11c8fhey _syaz13af"
23
+ retryText: "_11c8fhey _syaz13af",
24
+ spacedRow: "_1rjc12x7 _1tke12am"
23
25
  };
24
26
  var AgentMentionLoadErrorItem = exports.AgentMentionLoadErrorItem = function AgentMentionLoadErrorItem(_ref) {
25
27
  var onRetry = _ref.onRetry;
@@ -37,7 +39,7 @@ var AgentMentionLoadErrorItem = exports.AgentMentionLoadErrorItem = function Age
37
39
  onMouseDown: handleMouseDown,
38
40
  onClick: handleClick,
39
41
  "data-testid": "agent-mention-load-error-item",
40
- className: (0, _runtime.ax)([styles.retryRow])
42
+ className: (0, _runtime.ax)([styles.retryRow, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mentions_email_search') && styles.spacedRow])
41
43
  }, /*#__PURE__*/React.createElement(_inline.Inline, {
42
44
  alignBlock: "center",
43
45
  space: "space.100"
@@ -25,6 +25,7 @@ var _styles = require("@atlaskit/mention/mention-item/styles");
25
25
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
26
26
  var _fg = require("@atlaskit/platform-feature-flags/fg");
27
27
  var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
28
+ var _pickerItemContent = require("@atlaskit/user-picker/picker-item-content");
28
29
  var _editorCommands = require("../../editor-commands");
29
30
  var _key = require("../../pm-plugins/key");
30
31
  var _main = require("../../pm-plugins/main");
@@ -126,7 +127,8 @@ var makeMentionToTypeaheadItem = function makeMentionToTypeaheadItem(_ref4) {
126
127
  var useRefreshedItemHeight = _ref4.useRefreshedItemHeight,
127
128
  profilecardProvider = _ref4.profilecardProvider;
128
129
  return function (mention) {
129
- var itemHeight = useRefreshedItemHeight ? _styles.MENTION_ITEM_HEIGHT_REFRESHED : _styles.MENTION_ITEM_HEIGHT;
130
+ var itemHeight = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mentions_email_search') ? _pickerItemContent.PICKER_ITEM_HEIGHT : useRefreshedItemHeight ? _styles.MENTION_ITEM_HEIGHT_REFRESHED : _styles.MENTION_ITEM_HEIGHT;
131
+ var customComponentHeight = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mentions_email_search') ? itemHeight + 8 : itemHeight;
130
132
  if (isAgentMentionLoadErrorEnabled(mention)) {
131
133
  return {
132
134
  title: mention.id,
@@ -137,7 +139,7 @@ var makeMentionToTypeaheadItem = function makeMentionToTypeaheadItem(_ref4) {
137
139
  });
138
140
  },
139
141
  getCustomComponentHeight: function getCustomComponentHeight() {
140
- return itemHeight;
142
+ return customComponentHeight;
141
143
  },
142
144
  mention: mention
143
145
  };
@@ -158,7 +160,7 @@ var makeMentionToTypeaheadItem = function makeMentionToTypeaheadItem(_ref4) {
158
160
  });
159
161
  },
160
162
  getCustomComponentHeight: function getCustomComponentHeight() {
161
- return itemHeight;
163
+ return customComponentHeight;
162
164
  },
163
165
  mention: mention
164
166
  };
@@ -184,7 +186,7 @@ var makeMentionToTypeaheadItem = function makeMentionToTypeaheadItem(_ref4) {
184
186
  });
185
187
  },
186
188
  getCustomComponentHeight: function getCustomComponentHeight() {
187
- return itemHeight;
189
+ return customComponentHeight;
188
190
  },
189
191
  mention: mention
190
192
  };
@@ -34,7 +34,7 @@ export const ACTIONS = {
34
34
  CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
35
35
  };
36
36
  const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
37
- const PACKAGE_VERSION = "32.0.1";
37
+ const PACKAGE_VERSION = "32.0.3";
38
38
  const setProvider = provider => (state, dispatch) => {
39
39
  if (dispatch) {
40
40
  dispatch(state.tr.setMeta(mentionPluginKey, {
@@ -1,9 +1,11 @@
1
1
  ._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
2
  ._189eidpf{border-width:0}
3
3
  ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
4
+ ._1rjc12x7{padding-block:var(--ds-space-075,6px)}
4
5
  ._1rjcu2gc{padding-block:var(--ds-space-100,8px)}
5
6
  ._1bsb1osq{width:100%}
6
7
  ._1e0c1txw{display:flex}
8
+ ._1tke12am{min-height:50px}
7
9
  ._1tke1ylp{min-height:40px}
8
10
  ._4cvr1h6o{align-items:center}
9
11
  ._80omtlke{cursor:pointer}
@@ -6,11 +6,13 @@ import { useCallback } from 'react';
6
6
  import { useIntl } from 'react-intl';
7
7
  import { mentionMessages } from '@atlaskit/editor-common/messages/mentions';
8
8
  import StatusErrorIcon from '@atlaskit/icon/core/status-error';
9
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
9
10
  import { Inline } from '@atlaskit/primitives/compiled/inline';
10
11
  import { Text } from '@atlaskit/primitives/compiled/text';
11
12
  const styles = {
12
13
  retryRow: "_11c8fhey _189eidpf _1rjcu2gc _18zrutpp _4cvr1h6o _bfhk1j28 _vchhusvi _syazazsu _80omtlke _1e0c1txw _1tke1ylp _y3gn1e5h _1bsb1osq",
13
- retryText: "_11c8fhey _syaz13af"
14
+ retryText: "_11c8fhey _syaz13af",
15
+ spacedRow: "_1rjc12x7 _1tke12am"
14
16
  };
15
17
  export const AgentMentionLoadErrorItem = ({
16
18
  onRetry
@@ -29,7 +31,7 @@ export const AgentMentionLoadErrorItem = ({
29
31
  onMouseDown: handleMouseDown,
30
32
  onClick: handleClick,
31
33
  "data-testid": "agent-mention-load-error-item",
32
- className: ax([styles.retryRow])
34
+ className: ax([styles.retryRow, isExperimentEnabled('platform_editor_mentions_email_search') && styles.spacedRow])
33
35
  }, /*#__PURE__*/React.createElement(Inline, {
34
36
  alignBlock: "center",
35
37
  space: "space.100"
@@ -15,6 +15,7 @@ import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from '@atlaskit/me
15
15
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
16
16
  import { fg } from '@atlaskit/platform-feature-flags/fg';
17
17
  import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
18
+ import { PICKER_ITEM_HEIGHT } from '@atlaskit/user-picker/picker-item-content';
18
19
  import { createSingleMentionFragment } from '../../editor-commands';
19
20
  import { mentionPluginKey } from '../../pm-plugins/key';
20
21
  import { ACTIONS } from '../../pm-plugins/main';
@@ -95,7 +96,8 @@ const makeMentionToTypeaheadItem = ({
95
96
  useRefreshedItemHeight,
96
97
  profilecardProvider
97
98
  }) => mention => {
98
- const itemHeight = useRefreshedItemHeight ? MENTION_ITEM_HEIGHT_REFRESHED : MENTION_ITEM_HEIGHT;
99
+ const itemHeight = isExperimentEnabled('platform_editor_mentions_email_search') ? PICKER_ITEM_HEIGHT : useRefreshedItemHeight ? MENTION_ITEM_HEIGHT_REFRESHED : MENTION_ITEM_HEIGHT;
100
+ const customComponentHeight = isExperimentEnabled('platform_editor_mentions_email_search') ? itemHeight + 8 : itemHeight;
99
101
  if (isAgentMentionLoadErrorEnabled(mention)) {
100
102
  return {
101
103
  title: mention.id,
@@ -105,7 +107,7 @@ const makeMentionToTypeaheadItem = ({
105
107
  onRetry: onClick
106
108
  }),
107
109
  getCustomComponentHeight: () => {
108
- return itemHeight;
110
+ return customComponentHeight;
109
111
  },
110
112
  mention
111
113
  };
@@ -125,7 +127,7 @@ const makeMentionToTypeaheadItem = ({
125
127
  profilecardProvider: profilecardProvider
126
128
  }),
127
129
  getCustomComponentHeight: () => {
128
- return itemHeight;
130
+ return customComponentHeight;
129
131
  },
130
132
  mention
131
133
  };
@@ -150,7 +152,7 @@ const makeMentionToTypeaheadItem = ({
150
152
  height: itemHeight
151
153
  }),
152
154
  getCustomComponentHeight: () => {
153
- return itemHeight;
155
+ return customComponentHeight;
154
156
  },
155
157
  mention
156
158
  };
@@ -37,7 +37,7 @@ export var ACTIONS = {
37
37
  CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
38
38
  };
39
39
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
40
- var PACKAGE_VERSION = "32.0.1";
40
+ var PACKAGE_VERSION = "32.0.3";
41
41
  var setProvider = function setProvider(provider) {
42
42
  return function (state, dispatch) {
43
43
  if (dispatch) {
@@ -1,9 +1,11 @@
1
1
  ._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
2
  ._189eidpf{border-width:0}
3
3
  ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
4
+ ._1rjc12x7{padding-block:var(--ds-space-075,6px)}
4
5
  ._1rjcu2gc{padding-block:var(--ds-space-100,8px)}
5
6
  ._1bsb1osq{width:100%}
6
7
  ._1e0c1txw{display:flex}
8
+ ._1tke12am{min-height:50px}
7
9
  ._1tke1ylp{min-height:40px}
8
10
  ._4cvr1h6o{align-items:center}
9
11
  ._80omtlke{cursor:pointer}
@@ -6,11 +6,13 @@ import { useCallback } from 'react';
6
6
  import { useIntl } from 'react-intl';
7
7
  import { mentionMessages } from '@atlaskit/editor-common/messages/mentions';
8
8
  import StatusErrorIcon from '@atlaskit/icon/core/status-error';
9
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
9
10
  import { Inline } from '@atlaskit/primitives/compiled/inline';
10
11
  import { Text } from '@atlaskit/primitives/compiled/text';
11
12
  var styles = {
12
13
  retryRow: "_11c8fhey _189eidpf _1rjcu2gc _18zrutpp _4cvr1h6o _bfhk1j28 _vchhusvi _syazazsu _80omtlke _1e0c1txw _1tke1ylp _y3gn1e5h _1bsb1osq",
13
- retryText: "_11c8fhey _syaz13af"
14
+ retryText: "_11c8fhey _syaz13af",
15
+ spacedRow: "_1rjc12x7 _1tke12am"
14
16
  };
15
17
  export var AgentMentionLoadErrorItem = function AgentMentionLoadErrorItem(_ref) {
16
18
  var onRetry = _ref.onRetry;
@@ -28,7 +30,7 @@ export var AgentMentionLoadErrorItem = function AgentMentionLoadErrorItem(_ref)
28
30
  onMouseDown: handleMouseDown,
29
31
  onClick: handleClick,
30
32
  "data-testid": "agent-mention-load-error-item",
31
- className: ax([styles.retryRow])
33
+ className: ax([styles.retryRow, isExperimentEnabled('platform_editor_mentions_email_search') && styles.spacedRow])
32
34
  }, /*#__PURE__*/React.createElement(Inline, {
33
35
  alignBlock: "center",
34
36
  space: "space.100"
@@ -22,6 +22,7 @@ import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from '@atlaskit/me
22
22
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
23
23
  import { fg } from '@atlaskit/platform-feature-flags/fg';
24
24
  import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
25
+ import { PICKER_ITEM_HEIGHT } from '@atlaskit/user-picker/picker-item-content';
25
26
  import { createSingleMentionFragment } from '../../editor-commands';
26
27
  import { mentionPluginKey } from '../../pm-plugins/key';
27
28
  import { ACTIONS } from '../../pm-plugins/main';
@@ -117,7 +118,8 @@ var makeMentionToTypeaheadItem = function makeMentionToTypeaheadItem(_ref4) {
117
118
  var useRefreshedItemHeight = _ref4.useRefreshedItemHeight,
118
119
  profilecardProvider = _ref4.profilecardProvider;
119
120
  return function (mention) {
120
- var itemHeight = useRefreshedItemHeight ? MENTION_ITEM_HEIGHT_REFRESHED : MENTION_ITEM_HEIGHT;
121
+ var itemHeight = isExperimentEnabled('platform_editor_mentions_email_search') ? PICKER_ITEM_HEIGHT : useRefreshedItemHeight ? MENTION_ITEM_HEIGHT_REFRESHED : MENTION_ITEM_HEIGHT;
122
+ var customComponentHeight = isExperimentEnabled('platform_editor_mentions_email_search') ? itemHeight + 8 : itemHeight;
121
123
  if (isAgentMentionLoadErrorEnabled(mention)) {
122
124
  return {
123
125
  title: mention.id,
@@ -128,7 +130,7 @@ var makeMentionToTypeaheadItem = function makeMentionToTypeaheadItem(_ref4) {
128
130
  });
129
131
  },
130
132
  getCustomComponentHeight: function getCustomComponentHeight() {
131
- return itemHeight;
133
+ return customComponentHeight;
132
134
  },
133
135
  mention: mention
134
136
  };
@@ -149,7 +151,7 @@ var makeMentionToTypeaheadItem = function makeMentionToTypeaheadItem(_ref4) {
149
151
  });
150
152
  },
151
153
  getCustomComponentHeight: function getCustomComponentHeight() {
152
- return itemHeight;
154
+ return customComponentHeight;
153
155
  },
154
156
  mention: mention
155
157
  };
@@ -175,7 +177,7 @@ var makeMentionToTypeaheadItem = function makeMentionToTypeaheadItem(_ref4) {
175
177
  });
176
178
  },
177
179
  getCustomComponentHeight: function getCustomComponentHeight() {
178
- return itemHeight;
180
+ return customComponentHeight;
179
181
  },
180
182
  mention: mention
181
183
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-mentions",
3
- "version": "32.0.2",
3
+ "version": "32.0.4",
4
4
  "description": "Mentions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,27 +30,26 @@
30
30
  "@atlaskit/editor-plugin-selection": "^30.0.0",
31
31
  "@atlaskit/editor-plugin-type-ahead": "^31.0.0",
32
32
  "@atlaskit/editor-prosemirror": "^9.0.0",
33
- "@atlaskit/feature-gate-js-client": "^7.0.0",
34
33
  "@atlaskit/icon": "^38.0.0",
35
34
  "@atlaskit/insm": "^3.0.0",
36
35
  "@atlaskit/link": "^5.1.0",
37
36
  "@atlaskit/lozenge": "^17.0.0",
38
- "@atlaskit/mention": "^30.5.0",
37
+ "@atlaskit/mention": "^30.7.0",
39
38
  "@atlaskit/node-data-provider": "^31.0.0",
40
39
  "@atlaskit/platform-feature-experiments": "^0.3.0",
41
40
  "@atlaskit/platform-feature-flags": "^2.2.0",
42
41
  "@atlaskit/popper": "^9.4.0",
43
- "@atlaskit/popup": "^10.0.0",
42
+ "@atlaskit/popup": "^10.1.0",
44
43
  "@atlaskit/portal": "^7.1.0",
45
44
  "@atlaskit/primitives": "^22.6.0",
46
- "@atlaskit/profilecard": "^27.3.0",
45
+ "@atlaskit/profilecard": "^27.4.0",
47
46
  "@atlaskit/section-message": "^10.2.0",
48
47
  "@atlaskit/teams-app-config": "^3.1.0",
49
48
  "@atlaskit/theme": "^28.2.0",
50
- "@atlaskit/tmp-editor-statsig": "^248.0.0",
49
+ "@atlaskit/tmp-editor-statsig": "^248.1.0",
51
50
  "@atlaskit/tokens": "^20.8.0",
52
51
  "@atlaskit/tooltip": "^24.4.0",
53
- "@atlaskit/user-picker": "^14.3.0",
52
+ "@atlaskit/user-picker": "^14.5.0",
54
53
  "@babel/runtime": "^7.0.0",
55
54
  "@compiled/react": "^1.0.2",
56
55
  "bind-event-listener": "^3.0.0",
@@ -60,16 +59,15 @@
60
59
  "uuid": "^11.1.1"
61
60
  },
62
61
  "peerDependencies": {
63
- "@atlaskit/editor-common": "^134.1.0",
62
+ "@atlaskit/editor-common": "^134.2.0",
64
63
  "react": "^18.2.0 || ^19.2.0",
65
64
  "react-dom": "^18.2.0 || ^19.2.0",
66
65
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
67
66
  },
68
67
  "devDependencies": {
69
68
  "@atlaskit/button": "^25.6.0",
70
- "@atlaskit/editor-core": "^241.0.0",
69
+ "@atlaskit/editor-core": "^242.0.0",
71
70
  "@atlassian/workbench": "workspace:*",
72
- "@testing-library/react": "^16.3.0",
73
71
  "react": "^19.2.0",
74
72
  "react-dom": "^19.2.0",
75
73
  "react-intl": "^7.0.0"