@atlaskit/reactions 24.1.0 → 24.3.0

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/analytics/index.js +1 -1
  3. package/dist/cjs/components/Reaction/Reaction.js +0 -9
  4. package/dist/cjs/components/ReactionDialog/ReactionView.js +20 -4
  5. package/dist/cjs/components/ReactionDialog/ReactionsDialog.js +4 -2
  6. package/dist/cjs/components/ReactionDialog/ReactionsList.js +4 -2
  7. package/dist/cjs/components/ReactionSummary/ReactionSummaryView.js +1 -5
  8. package/dist/cjs/components/ReactionTooltip/ReactionTooltip.js +4 -15
  9. package/dist/cjs/components/ReactionTooltip/styles.js +1 -12
  10. package/dist/cjs/components/Reactions/Reactions.js +4 -26
  11. package/dist/cjs/shared/i18n.js +0 -5
  12. package/dist/es2019/analytics/index.js +1 -1
  13. package/dist/es2019/components/Reaction/Reaction.js +0 -8
  14. package/dist/es2019/components/ReactionDialog/ReactionView.js +21 -5
  15. package/dist/es2019/components/ReactionDialog/ReactionsDialog.js +4 -2
  16. package/dist/es2019/components/ReactionDialog/ReactionsList.js +4 -2
  17. package/dist/es2019/components/ReactionSummary/ReactionSummaryView.js +1 -5
  18. package/dist/es2019/components/ReactionTooltip/ReactionTooltip.js +5 -13
  19. package/dist/es2019/components/ReactionTooltip/styles.js +1 -12
  20. package/dist/es2019/components/Reactions/Reactions.js +4 -26
  21. package/dist/es2019/shared/i18n.js +0 -5
  22. package/dist/esm/analytics/index.js +1 -1
  23. package/dist/esm/components/Reaction/Reaction.js +0 -9
  24. package/dist/esm/components/ReactionDialog/ReactionView.js +21 -5
  25. package/dist/esm/components/ReactionDialog/ReactionsDialog.js +4 -2
  26. package/dist/esm/components/ReactionDialog/ReactionsList.js +4 -2
  27. package/dist/esm/components/ReactionSummary/ReactionSummaryView.js +1 -5
  28. package/dist/esm/components/ReactionTooltip/ReactionTooltip.js +5 -16
  29. package/dist/esm/components/ReactionTooltip/styles.js +1 -12
  30. package/dist/esm/components/Reactions/Reactions.js +4 -26
  31. package/dist/esm/shared/i18n.js +0 -5
  32. package/dist/types/components/Reaction/Reaction.d.ts +2 -7
  33. package/dist/types/components/ReactionDialog/ReactionView.d.ts +3 -2
  34. package/dist/types/components/ReactionDialog/ReactionsDialog.d.ts +3 -2
  35. package/dist/types/components/ReactionDialog/ReactionsList.d.ts +6 -2
  36. package/dist/types/components/ReactionSummary/ReactionSummaryView.d.ts +2 -7
  37. package/dist/types/components/ReactionTooltip/ReactionTooltip.d.ts +1 -9
  38. package/dist/types/components/ReactionTooltip/styles.d.ts +0 -1
  39. package/dist/types/components/Reactions/Reactions.d.ts +11 -4
  40. package/dist/types/shared/i18n.d.ts +0 -5
  41. package/dist/types/types/User.d.ts +1 -0
  42. package/dist/types/types/index.d.ts +15 -0
  43. package/dist/types-ts4.5/components/Reaction/Reaction.d.ts +2 -7
  44. package/dist/types-ts4.5/components/ReactionDialog/ReactionView.d.ts +3 -2
  45. package/dist/types-ts4.5/components/ReactionDialog/ReactionsDialog.d.ts +3 -2
  46. package/dist/types-ts4.5/components/ReactionDialog/ReactionsList.d.ts +6 -2
  47. package/dist/types-ts4.5/components/ReactionSummary/ReactionSummaryView.d.ts +2 -7
  48. package/dist/types-ts4.5/components/ReactionTooltip/ReactionTooltip.d.ts +1 -9
  49. package/dist/types-ts4.5/components/ReactionTooltip/styles.d.ts +0 -1
  50. package/dist/types-ts4.5/components/Reactions/Reactions.d.ts +11 -4
  51. package/dist/types-ts4.5/shared/i18n.d.ts +0 -5
  52. package/dist/types-ts4.5/types/User.d.ts +1 -0
  53. package/dist/types-ts4.5/types/index.d.ts +18 -0
  54. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/reactions
2
2
 
3
+ ## 24.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#108357](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/108357)
8
+ [`dd0053af6d370`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dd0053af6d370) -
9
+ [ux] "And X others" entrypoint into Reactions Dialog removed. "More info" entrypoint removed and
10
+ completely deleted from ReactionTooltip
11
+
12
+ ## 24.2.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#108078](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/108078)
17
+ [`d7e3f8c56ff08`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d7e3f8c56ff08) -
18
+ [ux] Adds the profileCardWrapper prop which adds an on-hover interaction to the Avatar picture and
19
+ shows the user's profile card
20
+
3
21
  ## 24.1.0
4
22
 
5
23
  ### Minor Changes
@@ -11,7 +11,7 @@ var _analyticsGasTypes = require("@atlaskit/analytics-gas-types");
11
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
13
  var packageName = "@atlaskit/reactions";
14
- var packageVersion = "24.1.0";
14
+ var packageVersion = "24.3.0";
15
15
  /**
16
16
  * TODO: move to utility package?
17
17
  * A random sampling function
@@ -74,9 +74,6 @@ var Reaction = exports.Reaction = function Reaction(_ref) {
74
74
  flash = _ref$flash === void 0 ? false : _ref$flash,
75
75
  _ref$showParticleEffe = _ref.showParticleEffect,
76
76
  showParticleEffect = _ref$showParticleEffe === void 0 ? false : _ref$showParticleEffe,
77
- _ref$handleUserListCl = _ref.handleUserListClick,
78
- handleUserListClick = _ref$handleUserListCl === void 0 ? function () {} : _ref$handleUserListCl,
79
- allowUserDialog = _ref.allowUserDialog,
80
77
  _ref$showOpaqueBackgr = _ref.showOpaqueBackground,
81
78
  showOpaqueBackground = _ref$showOpaqueBackgr === void 0 ? false : _ref$showOpaqueBackgr;
82
79
  var intl = (0, _reactIntlNext.useIntl)();
@@ -151,10 +148,6 @@ var Reaction = exports.Reaction = function Reaction(_ref) {
151
148
  (0, _analytics.createAndFireSafe)(createAnalyticsEvent, _analytics.createReactionFocusedEvent, hoverStart.current);
152
149
  onFocused(reaction.emojiId, event);
153
150
  }, [createAnalyticsEvent, reaction, onFocused]);
154
- var handleOpenReactionsDialog = function handleOpenReactionsDialog(emojiId) {
155
- handleUserListClick(emojiId);
156
- setIsTooltipEnabled(false);
157
- };
158
151
  var buttonStyles = showOpaqueBackground ? [opaqueBackgroundStyles] : [];
159
152
  return (0, _react2.jsx)(_primitives.Box, {
160
153
  xcss: containerStyles
@@ -164,8 +157,6 @@ var Reaction = exports.Reaction = function Reaction(_ref) {
164
157
  }), (0, _react2.jsx)(_ReactionTooltip.ReactionTooltip, {
165
158
  emojiName: emojiName,
166
159
  reaction: reaction,
167
- handleUserListClick: handleOpenReactionsDialog,
168
- allowUserDialog: allowUserDialog,
169
160
  isEnabled: isTooltipEnabled
170
161
  }, (0, _react2.jsx)(_ReactionButton.ReactionButton, {
171
162
  onClick: handleClick,
@@ -26,10 +26,14 @@ var _styles = require("./styles");
26
26
 
27
27
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
28
28
 
29
+ var userDescriptionStyle = (0, _primitives.xcss)({
30
+ marginLeft: 'space.200'
31
+ });
29
32
  var ReactionView = exports.ReactionView = function ReactionView(_ref) {
30
33
  var selectedEmojiId = _ref.selectedEmojiId,
31
34
  emojiProvider = _ref.emojiProvider,
32
- reaction = _ref.reaction;
35
+ reaction = _ref.reaction,
36
+ ProfileCardWrapper = _ref.ProfileCardWrapper;
33
37
  var _useState = (0, _react.useState)(''),
34
38
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
35
39
  emojiShortName = _useState2[0],
@@ -85,7 +89,7 @@ var ReactionView = exports.ReactionView = function ReactionView(_ref) {
85
89
  id: selectedEmojiId,
86
90
  shortName: ''
87
91
  },
88
- fitToHeight: 16
92
+ fitToHeight: 24
89
93
  })), alphabeticalNames.length === 0 ?
90
94
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
91
95
  (0, _react2.jsx)("div", {
@@ -104,10 +108,22 @@ var ReactionView = exports.ReactionView = function ReactionView(_ref) {
104
108
  (0, _react2.jsx)("li", {
105
109
  css: _styles.userStyle,
106
110
  key: user.id
111
+ }, ProfileCardWrapper && user.accountId ? (0, _react2.jsx)(ProfileCardWrapper, {
112
+ userId: user.accountId,
113
+ isAnonymous: false,
114
+ canViewProfile: true,
115
+ position: "left-start"
107
116
  }, (0, _react2.jsx)(_Avatar.default, {
108
117
  size: "large",
109
- src: profile
110
- }), (0, _react2.jsx)("span", null, user.displayName))
118
+ src: profile,
119
+ testId: "profile"
120
+ })) : (0, _react2.jsx)(_Avatar.default, {
121
+ size: "large",
122
+ src: profile,
123
+ testId: "profile"
124
+ }), (0, _react2.jsx)(_primitives.Flex, {
125
+ xcss: userDescriptionStyle
126
+ }, (0, _react2.jsx)("div", null, user.displayName)))
111
127
  );
112
128
  })))
113
129
  );
@@ -110,7 +110,8 @@ var ReactionsDialog = exports.ReactionsDialog = function ReactionsDialog(_ref2)
110
110
  _ref2$handleSelectRea = _ref2.handleSelectReaction,
111
111
  handleSelectReaction = _ref2$handleSelectRea === void 0 ? function () {} : _ref2$handleSelectRea,
112
112
  _ref2$handlePaginatio = _ref2.handlePaginationChange,
113
- handlePaginationChange = _ref2$handlePaginatio === void 0 ? function () {} : _ref2$handlePaginatio;
113
+ handlePaginationChange = _ref2$handlePaginatio === void 0 ? function () {} : _ref2$handlePaginatio,
114
+ ProfileCardWrapper = _ref2.ProfileCardWrapper;
114
115
  var _useState = (0, _react.useState)(),
115
116
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
116
117
  elementToScroll = _useState2[0],
@@ -251,7 +252,8 @@ var ReactionsDialog = exports.ReactionsDialog = function ReactionsDialog(_ref2)
251
252
  initialEmojiId: selectedEmojiId,
252
253
  reactions: currentReactions,
253
254
  emojiProvider: emojiProvider,
254
- onReactionChanged: handleSelectReaction
255
+ onReactionChanged: handleSelectReaction,
256
+ ProfileCardWrapper: ProfileCardWrapper
255
257
  }))), (0, _react2.jsx)(_modalDialog.ModalFooter, null, (0, _react2.jsx)(_new.default, {
256
258
  appearance: "subtle",
257
259
  onClick: handleCloseReactionsDialog
@@ -32,7 +32,8 @@ var ReactionsList = exports.ReactionsList = function ReactionsList(_ref) {
32
32
  var reactions = _ref.reactions,
33
33
  initialEmojiId = _ref.initialEmojiId,
34
34
  emojiProvider = _ref.emojiProvider,
35
- onReactionChanged = _ref.onReactionChanged;
35
+ onReactionChanged = _ref.onReactionChanged,
36
+ ProfileCardWrapper = _ref.ProfileCardWrapper;
36
37
  var _useState = (0, _react.useState)(function () {
37
38
  // Calculate this only on initialize the List of Tabs and each Reactions View collection
38
39
  return {
@@ -110,7 +111,8 @@ var ReactionsList = exports.ReactionsList = function ReactionsList(_ref) {
110
111
  key: reaction.emojiId,
111
112
  reaction: reaction,
112
113
  selectedEmojiId: selectedEmoji.id,
113
- emojiProvider: emojiProvider
114
+ emojiProvider: emojiProvider,
115
+ ProfileCardWrapper: ProfileCardWrapper
114
116
  });
115
117
  }));
116
118
  };
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.ReactionSummaryView = exports.RENDER_SUMMARY_VIEW_POPUP_TESTID = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
+ var _react = _interopRequireWildcard(require("react"));
11
12
  var _popup = _interopRequireDefault(require("@atlaskit/popup"));
12
13
  var _primitives = require("@atlaskit/primitives");
13
- var _react = _interopRequireWildcard(require("react"));
14
14
  var _Reaction = require("../Reaction");
15
15
  var _ReactionSummaryButton = require("./ReactionSummaryButton");
16
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -33,8 +33,6 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
33
33
  flash = _ref$flash === void 0 ? {} : _ref$flash,
34
34
  _ref$particleEffectBy = _ref.particleEffectByEmoji,
35
35
  particleEffectByEmoji = _ref$particleEffectBy === void 0 ? {} : _ref$particleEffectBy,
36
- handleOpenReactionsDialog = _ref.handleOpenReactionsDialog,
37
- allowUserDialog = _ref.allowUserDialog,
38
36
  _ref$placement = _ref.placement,
39
37
  placement = _ref$placement === void 0 ? 'auto-start' : _ref$placement,
40
38
  onReactionClick = _ref.onReactionClick,
@@ -71,8 +69,6 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
71
69
  onFocused: onReactionFocused,
72
70
  onMouseEnter: onReactionMouseEnter,
73
71
  flash: flash[reaction.emojiId],
74
- handleUserListClick: handleOpenReactionsDialog,
75
- allowUserDialog: allowUserDialog,
76
72
  showParticleEffect: particleEffectByEmoji[reaction.emojiId]
77
73
  });
78
74
  }));
@@ -27,16 +27,10 @@ var RENDER_REACTIONTOOLTIP_TESTID = exports.RENDER_REACTIONTOOLTIP_TESTID = 'ren
27
27
  var ReactionTooltip = exports.ReactionTooltip = function ReactionTooltip(_ref) {
28
28
  var children = _ref.children,
29
29
  emojiName = _ref.emojiName,
30
- _ref$reaction = _ref.reaction,
31
- _ref$reaction$users = _ref$reaction.users,
30
+ _ref$reaction$users = _ref.reaction.users,
32
31
  users = _ref$reaction$users === void 0 ? [] : _ref$reaction$users,
33
- _ref$reaction$emojiId = _ref$reaction.emojiId,
34
- emojiId = _ref$reaction$emojiId === void 0 ? '' : _ref$reaction$emojiId,
35
32
  _ref$maxReactions = _ref.maxReactions,
36
33
  maxReactions = _ref$maxReactions === void 0 ? _constants.TOOLTIP_USERS_LIMIT : _ref$maxReactions,
37
- handleUserListClick = _ref.handleUserListClick,
38
- _ref$allowUserDialog = _ref.allowUserDialog,
39
- allowUserDialog = _ref$allowUserDialog === void 0 ? false : _ref$allowUserDialog,
40
34
  _ref$isEnabled = _ref.isEnabled,
41
35
  isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled;
42
36
  /**
@@ -55,17 +49,12 @@ var ReactionTooltip = exports.ReactionTooltip = function ReactionTooltip(_ref) {
55
49
  }, user.displayName);
56
50
  }), (0, _react2.jsx)("li", {
57
51
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
58
- css: allowUserDialog ? [_styles.footerStyle, _styles.underlineStyle] : _styles.footerStyle,
59
- onClick: function onClick() {
60
- if (allowUserDialog && handleUserListClick) {
61
- handleUserListClick(emojiId);
62
- }
63
- }
64
- }, users.length > maxReactions ? (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _i18n.messages.otherUsers, {
52
+ css: _styles.footerStyle
53
+ }, users.length > maxReactions && (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _i18n.messages.otherUsers, {
65
54
  values: {
66
55
  count: users.length - maxReactions
67
56
  }
68
- })) : allowUserDialog && (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.moreInfo))));
57
+ })))));
69
58
  return (0, _react2.jsx)(_tooltip.default, {
70
59
  content: content,
71
60
  position: "bottom",
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.verticalMargin = exports.underlineStyle = exports.tooltipStyle = exports.footerStyle = exports.emojiNameStyle = void 0;
6
+ exports.verticalMargin = exports.tooltipStyle = exports.footerStyle = exports.emojiNameStyle = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _colors = require("@atlaskit/theme/colors");
9
9
  /**
@@ -46,15 +46,4 @@ var emojiNameStyle = exports.emojiNameStyle = (0, _react.css)({
46
46
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
47
47
  var footerStyle = exports.footerStyle = (0, _react.css)({
48
48
  color: "var(--ds-text-inverse, ".concat(_colors.N90, ")")
49
- });
50
-
51
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
52
- var underlineStyle = exports.underlineStyle = (0, _react.css)({
53
- cursor: 'pointer',
54
- textDecoration: 'underline',
55
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
56
- ':hover': {
57
- backgroundColor: "var(--ds-background-neutral-bold, ".concat(_colors.N800, ")"),
58
- color: "var(--ds-text-inverse, ".concat(_colors.N0, ")")
59
- }
60
49
  });
@@ -130,7 +130,8 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
130
130
  _ref$showAddReactionT = _ref.showAddReactionText,
131
131
  showAddReactionText = _ref$showAddReactionT === void 0 ? false : _ref$showAddReactionT,
132
132
  _ref$hideDefaultReact = _ref.hideDefaultReactions,
133
- hideDefaultReactions = _ref$hideDefaultReact === void 0 ? false : _ref$hideDefaultReact;
133
+ hideDefaultReactions = _ref$hideDefaultReact === void 0 ? false : _ref$hideDefaultReact,
134
+ ProfileCardWrapper = _ref.ProfileCardWrapper;
134
135
  var _useState = (0, _react.useState)(),
135
136
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
136
137
  selectedEmojiId = _useState2[0],
@@ -182,26 +183,6 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
182
183
  onSelection(emojiId);
183
184
  }, [createAnalyticsEvent, onSelection, reactions]);
184
185
 
185
- /**
186
- * event handler to open selected reaction from tooltip
187
- * @param emojiId selected emoji id
188
- */
189
- var handleOpenReactionsDialog = function handleOpenReactionsDialog(emojiId) {
190
- // ufo start opening reaction dialog
191
- ufoExperiences.openDialog.start();
192
- setSelectedEmojiId(emojiId);
193
- onDialogOpenCallback(emojiId, 'tooltip');
194
-
195
- // ufo opening reaction dialog success
196
- ufoExperiences.openDialog.success({
197
- metadata: {
198
- emojiId: emojiId,
199
- source: 'Reactions',
200
- reason: 'Opening dialog from emoji tooltip link successfully'
201
- }
202
- });
203
- };
204
-
205
186
  /**
206
187
  * Event handler to oepn all reactions link button
207
188
  */
@@ -310,8 +291,6 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
310
291
  emojiProvider: emojiProvider,
311
292
  flash: flash,
312
293
  particleEffectByEmoji: particleEffectByEmoji,
313
- handleOpenReactionsDialog: handleOpenReactionsDialog,
314
- allowUserDialog: allowUserDialog,
315
294
  onReactionClick: onReactionClick,
316
295
  onReactionFocused: handleReactionFocused,
317
296
  onReactionMouseEnter: handleReactionMouseEnter,
@@ -327,8 +306,6 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
327
306
  onMouseEnter: handleReactionMouseEnter,
328
307
  onFocused: handleReactionFocused,
329
308
  flash: flash[reaction.emojiId],
330
- handleUserListClick: handleOpenReactionsDialog,
331
- allowUserDialog: allowUserDialog,
332
309
  showParticleEffect: particleEffectByEmoji[reaction.emojiId],
333
310
  showOpaqueBackground: showOpaqueBackground
334
311
  });
@@ -370,7 +347,8 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
370
347
  emojiProvider: emojiProvider,
371
348
  handleCloseReactionsDialog: handleCloseReactionsDialog,
372
349
  handleSelectReaction: handleSelectReactionInDialog,
373
- handlePaginationChange: handlePaginationChange
350
+ handlePaginationChange: handlePaginationChange,
351
+ ProfileCardWrapper: ProfileCardWrapper
374
352
  })))
375
353
  );
376
354
  });
@@ -21,11 +21,6 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
21
21
  defaultMessage: 'More emojis',
22
22
  description: 'Tooltip of the "show more" button in the quick reaction selector. The full emoji selector is displayed when the user clicks on it.'
23
23
  },
24
- moreInfo: {
25
- id: 'fabric.reactions.more.info',
26
- defaultMessage: 'More info',
27
- description: 'Clickable text in a tooltip that will display more information about the users who reacted'
28
- },
29
24
  reactWithEmoji: {
30
25
  id: 'fabric.reactions.reactwithemoji',
31
26
  defaultMessage: 'React with {emoji} emoji',
@@ -1,7 +1,7 @@
1
1
  import { createAndFireEvent } from '@atlaskit/analytics-next';
2
2
  import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
3
3
  const packageName = "@atlaskit/reactions";
4
- const packageVersion = "24.1.0";
4
+ const packageVersion = "24.3.0";
5
5
  /**
6
6
  * TODO: move to utility package?
7
7
  * A random sampling function
@@ -56,8 +56,6 @@ export const Reaction = ({
56
56
  onFocused = () => {},
57
57
  flash = false,
58
58
  showParticleEffect = false,
59
- handleUserListClick = () => {},
60
- allowUserDialog,
61
59
  showOpaqueBackground = false
62
60
  }) => {
63
61
  const intl = useIntl();
@@ -116,10 +114,6 @@ export const Reaction = ({
116
114
  createAndFireSafe(createAnalyticsEvent, createReactionFocusedEvent, hoverStart.current);
117
115
  onFocused(reaction.emojiId, event);
118
116
  }, [createAnalyticsEvent, reaction, onFocused]);
119
- const handleOpenReactionsDialog = emojiId => {
120
- handleUserListClick(emojiId);
121
- setIsTooltipEnabled(false);
122
- };
123
117
  const buttonStyles = showOpaqueBackground ? [opaqueBackgroundStyles] : [];
124
118
  return jsx(Box, {
125
119
  xcss: containerStyles
@@ -129,8 +123,6 @@ export const Reaction = ({
129
123
  }), jsx(ReactionTooltip, {
130
124
  emojiName: emojiName,
131
125
  reaction: reaction,
132
- handleUserListClick: handleOpenReactionsDialog,
133
- allowUserDialog: allowUserDialog,
134
126
  isEnabled: isTooltipEnabled
135
127
  }, jsx(ReactionButton, {
136
128
  onClick: handleClick,
@@ -11,13 +11,17 @@ import { ResourcedEmoji } from '@atlaskit/emoji/element';
11
11
  import Avatar from '@atlaskit/avatar/Avatar';
12
12
  import Spinner from '@atlaskit/spinner';
13
13
  import { useTabPanel } from '@atlaskit/tabs';
14
- import { Text } from '@atlaskit/primitives';
14
+ import { Text, Flex, xcss } from '@atlaskit/primitives';
15
15
  import { messages } from '../../shared/i18n';
16
16
  import { reactionViewStyle, userListStyle, userStyle, centerSpinner } from './styles';
17
+ const userDescriptionStyle = xcss({
18
+ marginLeft: 'space.200'
19
+ });
17
20
  export const ReactionView = ({
18
21
  selectedEmojiId,
19
22
  emojiProvider,
20
- reaction
23
+ reaction,
24
+ ProfileCardWrapper
21
25
  }) => {
22
26
  const [emojiShortName, setEmojiShortName] = useState('');
23
27
  useEffect(() => {
@@ -54,7 +58,7 @@ export const ReactionView = ({
54
58
  id: selectedEmojiId,
55
59
  shortName: ''
56
60
  },
57
- fitToHeight: 16
61
+ fitToHeight: 24
58
62
  })), alphabeticalNames.length === 0 ?
59
63
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
60
64
  jsx("div", {
@@ -73,10 +77,22 @@ export const ReactionView = ({
73
77
  jsx("li", {
74
78
  css: userStyle,
75
79
  key: user.id
80
+ }, ProfileCardWrapper && user.accountId ? jsx(ProfileCardWrapper, {
81
+ userId: user.accountId,
82
+ isAnonymous: false,
83
+ canViewProfile: true,
84
+ position: "left-start"
76
85
  }, jsx(Avatar, {
77
86
  size: "large",
78
- src: profile
79
- }), jsx("span", null, user.displayName))
87
+ src: profile,
88
+ testId: "profile"
89
+ })) : jsx(Avatar, {
90
+ size: "large",
91
+ src: profile,
92
+ testId: "profile"
93
+ }), jsx(Flex, {
94
+ xcss: userDescriptionStyle
95
+ }, jsx("div", null, user.displayName)))
80
96
  );
81
97
  })))
82
98
  );
@@ -86,7 +86,8 @@ export const ReactionsDialog = ({
86
86
  emojiProvider,
87
87
  selectedEmojiId,
88
88
  handleSelectReaction = () => {},
89
- handlePaginationChange = () => {}
89
+ handlePaginationChange = () => {},
90
+ ProfileCardWrapper
90
91
  }) => {
91
92
  var _currentReactions$;
92
93
  const [elementToScroll, setElementToScroll] = useState();
@@ -215,7 +216,8 @@ export const ReactionsDialog = ({
215
216
  initialEmojiId: selectedEmojiId,
216
217
  reactions: currentReactions,
217
218
  emojiProvider: emojiProvider,
218
- onReactionChanged: handleSelectReaction
219
+ onReactionChanged: handleSelectReaction,
220
+ ProfileCardWrapper: ProfileCardWrapper
219
221
  }))), jsx(ModalFooter, null, jsx(Button, {
220
222
  appearance: "subtle",
221
223
  onClick: handleCloseReactionsDialog
@@ -19,7 +19,8 @@ export const ReactionsList = ({
19
19
  reactions,
20
20
  initialEmojiId,
21
21
  emojiProvider,
22
- onReactionChanged
22
+ onReactionChanged,
23
+ ProfileCardWrapper
23
24
  }) => {
24
25
  const [selectedEmoji, setSelectedEmoji] = useState(() => {
25
26
  // Calculate this only on initialize the List of Tabs and each Reactions View collection
@@ -91,6 +92,7 @@ export const ReactionsList = ({
91
92
  key: reaction.emojiId,
92
93
  reaction: reaction,
93
94
  selectedEmojiId: selectedEmoji.id,
94
- emojiProvider: emojiProvider
95
+ emojiProvider: emojiProvider,
96
+ ProfileCardWrapper: ProfileCardWrapper
95
97
  })));
96
98
  };
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import React, { useCallback, useState } from 'react';
2
3
  import Popup from '@atlaskit/popup';
3
4
  import { Inline, xcss } from '@atlaskit/primitives';
4
- import React, { useCallback, useState } from 'react';
5
5
  import { Reaction } from '../Reaction';
6
6
  import { ReactionSummaryButton } from './ReactionSummaryButton';
7
7
  const summaryPopupStyles = xcss({
@@ -19,8 +19,6 @@ export const ReactionSummaryView = ({
19
19
  reactions = [],
20
20
  flash = {},
21
21
  particleEffectByEmoji = {},
22
- handleOpenReactionsDialog,
23
- allowUserDialog,
24
22
  placement = 'auto-start',
25
23
  onReactionClick,
26
24
  onReactionFocused,
@@ -46,8 +44,6 @@ export const ReactionSummaryView = ({
46
44
  onFocused: onReactionFocused,
47
45
  onMouseEnter: onReactionMouseEnter,
48
46
  flash: flash[reaction.emojiId],
49
- handleUserListClick: handleOpenReactionsDialog,
50
- allowUserDialog: allowUserDialog,
51
47
  showParticleEffect: particleEffectByEmoji[reaction.emojiId]
52
48
  }))),
53
49
  isOpen: isSummaryPopupOpen,
@@ -10,7 +10,7 @@ import Tooltip from '@atlaskit/tooltip';
10
10
  import { FormattedMessage } from 'react-intl-next';
11
11
  import { TOOLTIP_USERS_LIMIT } from '../../shared/constants';
12
12
  import { messages } from '../../shared/i18n';
13
- import { emojiNameStyle, footerStyle, tooltipStyle, underlineStyle } from './styles';
13
+ import { emojiNameStyle, footerStyle, tooltipStyle } from './styles';
14
14
 
15
15
  /**
16
16
  * Test id for wrapper ReactionTooltip div
@@ -20,12 +20,9 @@ export const ReactionTooltip = ({
20
20
  children,
21
21
  emojiName,
22
22
  reaction: {
23
- users = [],
24
- emojiId = ''
23
+ users = []
25
24
  },
26
25
  maxReactions = TOOLTIP_USERS_LIMIT,
27
- handleUserListClick,
28
- allowUserDialog = false,
29
26
  isEnabled = true
30
27
  }) => {
31
28
  /**
@@ -44,17 +41,12 @@ export const ReactionTooltip = ({
44
41
  }, user.displayName);
45
42
  }), jsx("li", {
46
43
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
47
- css: allowUserDialog ? [footerStyle, underlineStyle] : footerStyle,
48
- onClick: () => {
49
- if (allowUserDialog && handleUserListClick) {
50
- handleUserListClick(emojiId);
51
- }
52
- }
53
- }, users.length > maxReactions ? jsx(FormattedMessage, _extends({}, messages.otherUsers, {
44
+ css: footerStyle
45
+ }, users.length > maxReactions && jsx(FormattedMessage, _extends({}, messages.otherUsers, {
54
46
  values: {
55
47
  count: users.length - maxReactions
56
48
  }
57
- })) : allowUserDialog && jsx(FormattedMessage, messages.moreInfo))));
49
+ })))));
58
50
  return jsx(Tooltip, {
59
51
  content: content,
60
52
  position: "bottom",
@@ -4,7 +4,7 @@
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css } from '@emotion/react';
7
- import { N90, N800, N0 } from '@atlaskit/theme/colors';
7
+ import { N90 } from '@atlaskit/theme/colors';
8
8
  export const verticalMargin = 5;
9
9
 
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -39,15 +39,4 @@ export const emojiNameStyle = css({
39
39
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
40
40
  export const footerStyle = css({
41
41
  color: `var(--ds-text-inverse, ${N90})`
42
- });
43
-
44
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
45
- export const underlineStyle = css({
46
- cursor: 'pointer',
47
- textDecoration: 'underline',
48
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
49
- ':hover': {
50
- backgroundColor: `var(--ds-background-neutral-bold, ${N800})`,
51
- color: `var(--ds-text-inverse, ${N0})`
52
- }
53
42
  });
@@ -100,7 +100,8 @@ export const Reactions = /*#__PURE__*/React.memo(({
100
100
  showOpaqueBackground = false,
101
101
  subtleReactionsSummaryAndPicker = false,
102
102
  showAddReactionText = false,
103
- hideDefaultReactions = false
103
+ hideDefaultReactions = false,
104
+ ProfileCardWrapper
104
105
  }) => {
105
106
  const [selectedEmojiId, setSelectedEmojiId] = useState();
106
107
  const {
@@ -149,26 +150,6 @@ export const Reactions = /*#__PURE__*/React.memo(({
149
150
  onSelection(emojiId);
150
151
  }, [createAnalyticsEvent, onSelection, reactions]);
151
152
 
152
- /**
153
- * event handler to open selected reaction from tooltip
154
- * @param emojiId selected emoji id
155
- */
156
- const handleOpenReactionsDialog = emojiId => {
157
- // ufo start opening reaction dialog
158
- ufoExperiences.openDialog.start();
159
- setSelectedEmojiId(emojiId);
160
- onDialogOpenCallback(emojiId, 'tooltip');
161
-
162
- // ufo opening reaction dialog success
163
- ufoExperiences.openDialog.success({
164
- metadata: {
165
- emojiId,
166
- source: 'Reactions',
167
- reason: 'Opening dialog from emoji tooltip link successfully'
168
- }
169
- });
170
- };
171
-
172
153
  /**
173
154
  * Event handler to oepn all reactions link button
174
155
  */
@@ -273,8 +254,6 @@ export const Reactions = /*#__PURE__*/React.memo(({
273
254
  emojiProvider: emojiProvider,
274
255
  flash: flash,
275
256
  particleEffectByEmoji: particleEffectByEmoji,
276
- handleOpenReactionsDialog: handleOpenReactionsDialog,
277
- allowUserDialog: allowUserDialog,
278
257
  onReactionClick: onReactionClick,
279
258
  onReactionFocused: handleReactionFocused,
280
259
  onReactionMouseEnter: handleReactionMouseEnter,
@@ -289,8 +268,6 @@ export const Reactions = /*#__PURE__*/React.memo(({
289
268
  onMouseEnter: handleReactionMouseEnter,
290
269
  onFocused: handleReactionFocused,
291
270
  flash: flash[reaction.emojiId],
292
- handleUserListClick: handleOpenReactionsDialog,
293
- allowUserDialog: allowUserDialog,
294
271
  showParticleEffect: particleEffectByEmoji[reaction.emojiId],
295
272
  showOpaqueBackground: showOpaqueBackground
296
273
  })), jsx(ReactionPicker
@@ -331,7 +308,8 @@ export const Reactions = /*#__PURE__*/React.memo(({
331
308
  emojiProvider: emojiProvider,
332
309
  handleCloseReactionsDialog: handleCloseReactionsDialog,
333
310
  handleSelectReaction: handleSelectReactionInDialog,
334
- handlePaginationChange: handlePaginationChange
311
+ handlePaginationChange: handlePaginationChange,
312
+ ProfileCardWrapper: ProfileCardWrapper
335
313
  })))
336
314
  );
337
315
  });
@@ -15,11 +15,6 @@ export const messages = defineMessages({
15
15
  defaultMessage: 'More emojis',
16
16
  description: 'Tooltip of the "show more" button in the quick reaction selector. The full emoji selector is displayed when the user clicks on it.'
17
17
  },
18
- moreInfo: {
19
- id: 'fabric.reactions.more.info',
20
- defaultMessage: 'More info',
21
- description: 'Clickable text in a tooltip that will display more information about the users who reacted'
22
- },
23
18
  reactWithEmoji: {
24
19
  id: 'fabric.reactions.reactwithemoji',
25
20
  defaultMessage: 'React with {emoji} emoji',
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import { createAndFireEvent } from '@atlaskit/analytics-next';
5
5
  import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
6
6
  var packageName = "@atlaskit/reactions";
7
- var packageVersion = "24.1.0";
7
+ var packageVersion = "24.3.0";
8
8
  /**
9
9
  * TODO: move to utility package?
10
10
  * A random sampling function