@atlaskit/mention 30.2.7 → 30.2.9

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,19 @@
1
1
  # @atlaskit/mention
2
2
 
3
+ ## 30.2.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`190c5847617e8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/190c5847617e8) -
8
+ Align agent mention avatar hexagon geometry with agent avatars behind the
9
+ `platform_editor_agent_hexagon_ui_fix` experiment.
10
+
11
+ ## 30.2.8
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 30.2.7
4
18
 
5
19
  ### Patch Changes
@@ -12,6 +12,7 @@
12
12
  ._4t3i1osq{height:100%}
13
13
  ._4t3i1x4e{height:1em}
14
14
  ._5ral1dfr{object-fit:cover}
15
+ ._mkrz1k6g{clip-path:polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,89.64102% 21.33975%,91.06889% 22.33956%,92.30146% 23.57212%,93.30127% 25%,94.03794% 26.5798%,94.48909% 28.26352%,94.64102% 30%,94.64102% 70%,94.48909% 71.73648%,94.03794% 73.4202%,93.30127% 75%,92.30146% 76.42788%,91.06889% 77.66044%,89.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,10.35898% 78.66025%,8.93111% 77.66044%,7.69854% 76.42788%,6.69873% 75%,5.96206% 73.4202%,5.51091% 71.73648%,5.35898% 70%,5.35898% 30%,5.51091% 28.26352%,5.96206% 26.5798%,6.69873% 25%,7.69854% 23.57212%,8.93111% 22.33956%,10.35898% 21.33975%)}
15
16
  ._mkrz1l17{clip-path:polygon(25% 6.7%,75% 6.7%,100% 50%,75% 93.3%,25% 93.3%,0 50%)}
16
17
  ._s7n410e5{vertical-align:-.125em}
17
18
  ._s7n4ux7c{vertical-align:.05em}
@@ -17,6 +17,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
17
17
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
18
18
  var _react = _interopRequireDefault(require("react"));
19
19
  var _focusRing = _interopRequireDefault(require("@atlaskit/focus-ring/focus-ring"));
20
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
20
21
  var _fg = require("@atlaskit/platform-feature-flags/fg");
21
22
  var _experienceState = require("@atlaskit/ufo/experience-state");
22
23
  var _constants = require("../../_constants");
@@ -37,6 +38,7 @@ var avatarStyles = null;
37
38
  var avatarFallbackStyles = null;
38
39
  var avatarImageStyles = null;
39
40
  var agentAvatarStyles = null;
41
+ var fixedAgentAvatarStyles = null;
40
42
  var MentionInternal = exports.MentionInternal = /*#__PURE__*/function (_React$PureComponent) {
41
43
  function MentionInternal(props) {
42
44
  var _this;
@@ -199,6 +201,7 @@ var MentionInternal = exports.MentionInternal = /*#__PURE__*/function (_React$Pu
199
201
  var showAvatarSlot = Boolean(renderAvatarSlot) && !failedMention;
200
202
  var visibleText = showAvatarSlot && text.startsWith('@') ? text.slice(1) : text;
201
203
  var shouldApplyAgentShape = appType === 'agent' && !isAvatarImagePreShaped;
204
+ var shouldApplyFixedAgentShape = shouldApplyAgentShape && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_agent_hexagon_ui_fix');
202
205
  var shouldRenderAvatar = avatarUrl && !this.state.hasAvatarError;
203
206
  var showRestrictedTooltip = mentionType === _types.MentionType.RESTRICTED;
204
207
  var showDisabledTooltip = mentionType === _types.MentionType.DISABLED && !!disabledTooltip;
@@ -229,7 +232,7 @@ var MentionInternal = exports.MentionInternal = /*#__PURE__*/function (_React$Pu
229
232
  }, disabledA11yProps), failedMention ? this.renderUnknownUserError(id) : showAvatarSlot ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
230
233
  "aria-hidden": "true",
231
234
  "data-testid": "mention-avatar-slot",
232
- className: (0, _runtime.ax)(["_1reo15vq _18m915vq _2rko1rr0 _1e0c116y _1bsb1x4e _4t3i1x4e _4cvr1h6o _1bah1h6o _1o9zidpf _12l21b66 _s7n410e5", shouldApplyAgentShape && "_2rkoidpf _mkrz1l17", this.state.hasAvatarError && "_s7n4ux7c"])
235
+ className: (0, _runtime.ax)(["_1reo15vq _18m915vq _2rko1rr0 _1e0c116y _1bsb1x4e _4t3i1x4e _4cvr1h6o _1bah1h6o _1o9zidpf _12l21b66 _s7n410e5", shouldApplyAgentShape && "_2rkoidpf _mkrz1l17", shouldApplyFixedAgentShape && "_mkrz1k6g", this.state.hasAvatarError && "_s7n4ux7c"])
233
236
  }, shouldRenderAvatar ? /*#__PURE__*/_react.default.createElement("img", {
234
237
  alt: "",
235
238
  ref: this.avatarImageRef,
@@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.packageVersion = void 0;
7
- var packageVersion = exports.packageVersion = "30.2.6";
7
+ var packageVersion = exports.packageVersion = "30.2.8";
@@ -12,6 +12,7 @@
12
12
  ._4t3i1osq{height:100%}
13
13
  ._4t3i1x4e{height:1em}
14
14
  ._5ral1dfr{object-fit:cover}
15
+ ._mkrz1k6g{clip-path:polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,89.64102% 21.33975%,91.06889% 22.33956%,92.30146% 23.57212%,93.30127% 25%,94.03794% 26.5798%,94.48909% 28.26352%,94.64102% 30%,94.64102% 70%,94.48909% 71.73648%,94.03794% 73.4202%,93.30127% 75%,92.30146% 76.42788%,91.06889% 77.66044%,89.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,10.35898% 78.66025%,8.93111% 77.66044%,7.69854% 76.42788%,6.69873% 75%,5.96206% 73.4202%,5.51091% 71.73648%,5.35898% 70%,5.35898% 30%,5.51091% 28.26352%,5.96206% 26.5798%,6.69873% 25%,7.69854% 23.57212%,8.93111% 22.33956%,10.35898% 21.33975%)}
15
16
  ._mkrz1l17{clip-path:polygon(25% 6.7%,75% 6.7%,100% 50%,75% 93.3%,25% 93.3%,0 50%)}
16
17
  ._s7n410e5{vertical-align:-.125em}
17
18
  ._s7n4ux7c{vertical-align:.05em}
@@ -7,6 +7,7 @@ import { ax, ix } from "@compiled/react/runtime";
7
7
 
8
8
  import React from 'react';
9
9
  import FocusRing from '@atlaskit/focus-ring/focus-ring';
10
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
10
11
  import { fg } from '@atlaskit/platform-feature-flags/fg';
11
12
  import { UFOExperienceState } from '@atlaskit/ufo/experience-state';
12
13
  import { ELEMENTS_CHANNEL, UNKNOWN_USER_ID } from '../../_constants';
@@ -23,6 +24,7 @@ const avatarStyles = null;
23
24
  const avatarFallbackStyles = null;
24
25
  const avatarImageStyles = null;
25
26
  const agentAvatarStyles = null;
27
+ const fixedAgentAvatarStyles = null;
26
28
  export class MentionInternal extends React.PureComponent {
27
29
  constructor(props) {
28
30
  super(props);
@@ -186,6 +188,7 @@ export class MentionInternal extends React.PureComponent {
186
188
  const showAvatarSlot = Boolean(renderAvatarSlot) && !failedMention;
187
189
  const visibleText = showAvatarSlot && text.startsWith('@') ? text.slice(1) : text;
188
190
  const shouldApplyAgentShape = appType === 'agent' && !isAvatarImagePreShaped;
191
+ const shouldApplyFixedAgentShape = shouldApplyAgentShape && isExperimentEnabled('platform_editor_agent_hexagon_ui_fix');
189
192
  const shouldRenderAvatar = avatarUrl && !this.state.hasAvatarError;
190
193
  const showRestrictedTooltip = mentionType === MentionType.RESTRICTED;
191
194
  const showDisabledTooltip = mentionType === MentionType.DISABLED && !!disabledTooltip;
@@ -217,7 +220,7 @@ export class MentionInternal extends React.PureComponent {
217
220
  }, disabledA11yProps), failedMention ? this.renderUnknownUserError(id) : showAvatarSlot ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
218
221
  "aria-hidden": "true",
219
222
  "data-testid": "mention-avatar-slot",
220
- className: ax(["_1reo15vq _18m915vq _2rko1rr0 _1e0c116y _1bsb1x4e _4t3i1x4e _4cvr1h6o _1bah1h6o _1o9zidpf _12l21b66 _s7n410e5", shouldApplyAgentShape && "_2rkoidpf _mkrz1l17", this.state.hasAvatarError && "_s7n4ux7c"])
223
+ className: ax(["_1reo15vq _18m915vq _2rko1rr0 _1e0c116y _1bsb1x4e _4t3i1x4e _4cvr1h6o _1bah1h6o _1o9zidpf _12l21b66 _s7n410e5", shouldApplyAgentShape && "_2rkoidpf _mkrz1l17", shouldApplyFixedAgentShape && "_mkrz1k6g", this.state.hasAvatarError && "_s7n4ux7c"])
221
224
  }, shouldRenderAvatar ? /*#__PURE__*/React.createElement("img", {
222
225
  alt: "",
223
226
  ref: this.avatarImageRef,
@@ -1 +1 @@
1
- export const packageVersion = "30.2.6";
1
+ export const packageVersion = "30.2.8";
@@ -12,6 +12,7 @@
12
12
  ._4t3i1osq{height:100%}
13
13
  ._4t3i1x4e{height:1em}
14
14
  ._5ral1dfr{object-fit:cover}
15
+ ._mkrz1k6g{clip-path:polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,89.64102% 21.33975%,91.06889% 22.33956%,92.30146% 23.57212%,93.30127% 25%,94.03794% 26.5798%,94.48909% 28.26352%,94.64102% 30%,94.64102% 70%,94.48909% 71.73648%,94.03794% 73.4202%,93.30127% 75%,92.30146% 76.42788%,91.06889% 77.66044%,89.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,10.35898% 78.66025%,8.93111% 77.66044%,7.69854% 76.42788%,6.69873% 75%,5.96206% 73.4202%,5.51091% 71.73648%,5.35898% 70%,5.35898% 30%,5.51091% 28.26352%,5.96206% 26.5798%,6.69873% 25%,7.69854% 23.57212%,8.93111% 22.33956%,10.35898% 21.33975%)}
15
16
  ._mkrz1l17{clip-path:polygon(25% 6.7%,75% 6.7%,100% 50%,75% 93.3%,25% 93.3%,0 50%)}
16
17
  ._s7n410e5{vertical-align:-.125em}
17
18
  ._s7n4ux7c{vertical-align:.05em}
@@ -16,6 +16,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
16
16
 
17
17
  import React from 'react';
18
18
  import FocusRing from '@atlaskit/focus-ring/focus-ring';
19
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
19
20
  import { fg } from '@atlaskit/platform-feature-flags/fg';
20
21
  import { UFOExperienceState } from '@atlaskit/ufo/experience-state';
21
22
  import { ELEMENTS_CHANNEL, UNKNOWN_USER_ID } from '../../_constants';
@@ -32,6 +33,7 @@ var avatarStyles = null;
32
33
  var avatarFallbackStyles = null;
33
34
  var avatarImageStyles = null;
34
35
  var agentAvatarStyles = null;
36
+ var fixedAgentAvatarStyles = null;
35
37
  export var MentionInternal = /*#__PURE__*/function (_React$PureComponent) {
36
38
  function MentionInternal(props) {
37
39
  var _this;
@@ -194,6 +196,7 @@ export var MentionInternal = /*#__PURE__*/function (_React$PureComponent) {
194
196
  var showAvatarSlot = Boolean(renderAvatarSlot) && !failedMention;
195
197
  var visibleText = showAvatarSlot && text.startsWith('@') ? text.slice(1) : text;
196
198
  var shouldApplyAgentShape = appType === 'agent' && !isAvatarImagePreShaped;
199
+ var shouldApplyFixedAgentShape = shouldApplyAgentShape && isExperimentEnabled('platform_editor_agent_hexagon_ui_fix');
197
200
  var shouldRenderAvatar = avatarUrl && !this.state.hasAvatarError;
198
201
  var showRestrictedTooltip = mentionType === MentionType.RESTRICTED;
199
202
  var showDisabledTooltip = mentionType === MentionType.DISABLED && !!disabledTooltip;
@@ -224,7 +227,7 @@ export var MentionInternal = /*#__PURE__*/function (_React$PureComponent) {
224
227
  }, disabledA11yProps), failedMention ? this.renderUnknownUserError(id) : showAvatarSlot ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
225
228
  "aria-hidden": "true",
226
229
  "data-testid": "mention-avatar-slot",
227
- className: ax(["_1reo15vq _18m915vq _2rko1rr0 _1e0c116y _1bsb1x4e _4t3i1x4e _4cvr1h6o _1bah1h6o _1o9zidpf _12l21b66 _s7n410e5", shouldApplyAgentShape && "_2rkoidpf _mkrz1l17", this.state.hasAvatarError && "_s7n4ux7c"])
230
+ className: ax(["_1reo15vq _18m915vq _2rko1rr0 _1e0c116y _1bsb1x4e _4t3i1x4e _4cvr1h6o _1bah1h6o _1o9zidpf _12l21b66 _s7n410e5", shouldApplyAgentShape && "_2rkoidpf _mkrz1l17", shouldApplyFixedAgentShape && "_mkrz1k6g", this.state.hasAvatarError && "_s7n4ux7c"])
228
231
  }, shouldRenderAvatar ? /*#__PURE__*/React.createElement("img", {
229
232
  alt: "",
230
233
  ref: this.avatarImageRef,
@@ -1 +1 @@
1
- export var packageVersion = "30.2.6";
1
+ export var packageVersion = "30.2.8";
package/package.json CHANGED
@@ -45,8 +45,8 @@
45
45
  "@atlaskit/skeleton": "^4.4.0",
46
46
  "@atlaskit/tag": "^17.0.0",
47
47
  "@atlaskit/teams-avatar": "^4.1.0",
48
- "@atlaskit/tmp-editor-statsig": "^239.0.0",
49
- "@atlaskit/tokens": "^20.5.0",
48
+ "@atlaskit/tmp-editor-statsig": "^240.0.0",
49
+ "@atlaskit/tokens": "^20.6.0",
50
50
  "@atlaskit/tooltip": "^24.4.0",
51
51
  "@atlaskit/ufo": "^2.0.0",
52
52
  "@atlaskit/util-service-support": "^7.4.0",
@@ -67,7 +67,7 @@
67
67
  "@atlassian/a11y-playwright-testing": "^0.13.0",
68
68
  "@atlassian/experiment-test-utils": "^0.2.0",
69
69
  "@atlassian/feature-flags-test-utils": "^1.3.0",
70
- "@atlassian/testing-library": "^0.11.0",
70
+ "@atlassian/testing-library": "^0.12.0",
71
71
  "@atlassian/workbench": "workspace:*",
72
72
  "@testing-library/react": "^16.3.0",
73
73
  "@testing-library/user-event": "^14.4.3",
@@ -124,5 +124,5 @@
124
124
  "*.compiled.css"
125
125
  ],
126
126
  "types": "dist/types/index.d.ts",
127
- "version": "30.2.7"
127
+ "version": "30.2.9"
128
128
  }