@atlaskit/reactions 24.5.1 → 24.7.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 (33) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/analytics/index.js +1 -1
  3. package/dist/cjs/components/ReactionDialog/ReactionView.js +9 -4
  4. package/dist/cjs/components/ReactionDialog/ReactionsList.js +11 -3
  5. package/dist/cjs/components/ReactionDialog/styles.js +2 -2
  6. package/dist/cjs/components/ReactionSummary/ReactionSummaryView.js +23 -3
  7. package/dist/cjs/components/Reactions/Reactions.js +40 -15
  8. package/dist/cjs/components/Reactions/styles.js +1 -12
  9. package/dist/es2019/analytics/index.js +1 -1
  10. package/dist/es2019/components/ReactionDialog/ReactionView.js +10 -5
  11. package/dist/es2019/components/ReactionDialog/ReactionsList.js +11 -3
  12. package/dist/es2019/components/ReactionDialog/styles.js +2 -2
  13. package/dist/es2019/components/ReactionSummary/ReactionSummaryView.js +22 -4
  14. package/dist/es2019/components/Reactions/Reactions.js +37 -15
  15. package/dist/es2019/components/Reactions/styles.js +0 -11
  16. package/dist/esm/analytics/index.js +1 -1
  17. package/dist/esm/components/ReactionDialog/ReactionView.js +10 -5
  18. package/dist/esm/components/ReactionDialog/ReactionsList.js +11 -3
  19. package/dist/esm/components/ReactionDialog/styles.js +2 -2
  20. package/dist/esm/components/ReactionSummary/ReactionSummaryView.js +24 -4
  21. package/dist/esm/components/Reactions/Reactions.js +40 -16
  22. package/dist/esm/components/Reactions/styles.js +0 -11
  23. package/dist/types/components/ReactionPicker/RepositionOnUpdate.d.ts +1 -1
  24. package/dist/types/components/ReactionSummary/ReactionSummaryView.d.ts +7 -3
  25. package/dist/types/components/Reactions/styles.d.ts +0 -1
  26. package/dist/types/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +1 -1
  27. package/dist/types/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +1 -1
  28. package/dist/types-ts4.5/components/ReactionPicker/RepositionOnUpdate.d.ts +1 -1
  29. package/dist/types-ts4.5/components/ReactionSummary/ReactionSummaryView.d.ts +7 -3
  30. package/dist/types-ts4.5/components/Reactions/styles.d.ts +0 -1
  31. package/dist/types-ts4.5/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +1 -1
  32. package/dist/types-ts4.5/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +1 -1
  33. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/reactions
2
2
 
3
+ ## 24.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#110663](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110663)
8
+ [`ec41000e84d80`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ec41000e84d80) -
9
+ [ux] Update styling of Reactions Dialog entrypoint and the Dialog itself
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 24.6.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#108823](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/108823)
20
+ [`2789da849cf6c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2789da849cf6c) -
21
+ [ux] Add reactions dialog entrypoint into ReactionSummaryView primarily for live pages
22
+
3
23
  ## 24.5.1
4
24
 
5
25
  ### Patch 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.5.1";
14
+ var packageVersion = "24.7.0";
15
15
  /**
16
16
  * TODO: move to utility package?
17
17
  * A random sampling function
@@ -29,6 +29,9 @@ var _styles = require("./styles");
29
29
  var userDescriptionStyle = (0, _primitives.xcss)({
30
30
  marginLeft: 'space.200'
31
31
  });
32
+ var profileWrapperStyle = (0, _primitives.xcss)({
33
+ marginLeft: 'space.0'
34
+ });
32
35
  var ReactionView = exports.ReactionView = function ReactionView(_ref) {
33
36
  var selectedEmojiId = _ref.selectedEmojiId,
34
37
  emojiProvider = _ref.emojiProvider,
@@ -108,17 +111,19 @@ var ReactionView = exports.ReactionView = function ReactionView(_ref) {
108
111
  (0, _react2.jsx)("li", {
109
112
  css: _styles.userStyle,
110
113
  key: user.id
111
- }, ProfileCardWrapper && user.accountId ? (0, _react2.jsx)(ProfileCardWrapper, {
114
+ }, ProfileCardWrapper && user.accountId ? (0, _react2.jsx)(_primitives.Box, {
115
+ xcss: profileWrapperStyle
116
+ }, (0, _react2.jsx)(ProfileCardWrapper, {
112
117
  userId: user.accountId,
113
118
  isAnonymous: false,
114
119
  canViewProfile: true,
115
120
  position: "left-start"
116
121
  }, (0, _react2.jsx)(_Avatar.default, {
117
- size: "large",
122
+ size: "medium",
118
123
  src: profile,
119
124
  testId: "profile"
120
- })) : (0, _react2.jsx)(_Avatar.default, {
121
- size: "large",
125
+ }))) : (0, _react2.jsx)(_Avatar.default, {
126
+ size: "medium",
122
127
  src: profile,
123
128
  testId: "profile"
124
129
  }), (0, _react2.jsx)(_primitives.Flex, {
@@ -26,7 +26,13 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
26
26
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
27
27
 
28
28
  var emojiStyles = (0, _primitives.xcss)({
29
- minWidth: '36px'
29
+ transformOrigin: 'center center 0',
30
+ paddingInlineStart: 'space.100',
31
+ paddingBlock: 'space.050',
32
+ paddingInlineEnd: 'space.050'
33
+ });
34
+ var counterStyle = (0, _primitives.xcss)({
35
+ marginTop: 'space.025'
30
36
  });
31
37
  var ReactionsList = exports.ReactionsList = function ReactionsList(_ref) {
32
38
  var reactions = _ref.reactions,
@@ -103,9 +109,11 @@ var ReactionsList = exports.ReactionsList = function ReactionsList(_ref) {
103
109
  emojiId: emojiId,
104
110
  fitToHeight: 16,
105
111
  showTooltip: true
106
- })), (0, _react2.jsx)(_Counter.Counter, {
112
+ })), (0, _react2.jsx)(_primitives.Box, {
113
+ xcss: counterStyle
114
+ }, (0, _react2.jsx)(_Counter.Counter, {
107
115
  value: reaction.count
108
- }))));
116
+ })))));
109
117
  }))), reactions.map(function (reaction) {
110
118
  return (0, _react2.jsx)(_ReactionView.ReactionView, {
111
119
  key: reaction.emojiId,
@@ -110,7 +110,7 @@ var reactionViewStyle = exports.reactionViewStyle = (0, _react.css)({
110
110
  p: {
111
111
  margin: 0,
112
112
  color: "".concat("var(--ds-text, ".concat(_colors.N800, ")")),
113
- font: "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
113
+ font: "var(--ds-font-heading-xsmall, normal 600 14px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
114
114
  fontWeight: "var(--ds-font-weight-semibold, 600)",
115
115
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
116
116
  lineHeight: '20px',
@@ -138,7 +138,7 @@ var userListStyle = exports.userListStyle = (0, _react.css)({
138
138
  var userStyle = exports.userStyle = (0, _react.css)({
139
139
  display: 'flex',
140
140
  alignItems: 'center',
141
- padding: "var(--ds-space-100, 8px)".concat(" 0px ", "var(--ds-space-100, 8px)", " 0px"),
141
+ padding: "var(--ds-space-050, 4px)".concat(" 0px ", "var(--ds-space-050, 4px)", " 0px"),
142
142
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
143
143
  '> span': {
144
144
  marginLeft: "var(--ds-space-200, 16px)"
@@ -9,10 +9,13 @@ 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
11
  var _react = _interopRequireWildcard(require("react"));
12
+ var _reactIntlNext = require("react-intl-next");
12
13
  var _popup = _interopRequireDefault(require("@atlaskit/popup"));
13
14
  var _primitives = require("@atlaskit/primitives");
15
+ var _new = _interopRequireDefault(require("@atlaskit/button/new"));
14
16
  var _Reaction = require("../Reaction");
15
17
  var _ReactionSummaryButton = require("./ReactionSummaryButton");
18
+ var _i18n = require("../../shared/i18n");
16
19
  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); }
17
20
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
21
  var summaryPopupStyles = (0, _primitives.xcss)({
@@ -20,6 +23,9 @@ var summaryPopupStyles = (0, _primitives.xcss)({
20
23
  paddingTop: 'space.050',
21
24
  maxWidth: '325px'
22
25
  });
26
+ var viewAllButtonStyling = (0, _primitives.xcss)({
27
+ marginTop: 'space.050'
28
+ });
23
29
 
24
30
  /**
25
31
  * Test id for the Reactions summary view popup
@@ -41,7 +47,9 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
41
47
  _ref$showOpaqueBackgr = _ref.showOpaqueBackground,
42
48
  showOpaqueBackground = _ref$showOpaqueBackgr === void 0 ? false : _ref$showOpaqueBackgr,
43
49
  _ref$subtleReactionsS = _ref.subtleReactionsSummaryAndPicker,
44
- subtleReactionsSummaryAndPicker = _ref$subtleReactionsS === void 0 ? false : _ref$subtleReactionsS;
50
+ subtleReactionsSummaryAndPicker = _ref$subtleReactionsS === void 0 ? false : _ref$subtleReactionsS,
51
+ handleOpenReactionsDialog = _ref.handleOpenReactionsDialog,
52
+ allowUserDialog = _ref.allowUserDialog;
45
53
  var _useState = (0, _react.useState)(false),
46
54
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
47
55
  isSummaryPopupOpen = _useState2[0],
@@ -59,7 +67,8 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
59
67
  xcss: summaryPopupStyles,
60
68
  testId: RENDER_SUMMARY_VIEW_POPUP_TESTID,
61
69
  space: "space.025",
62
- shouldWrap: true
70
+ shouldWrap: true,
71
+ alignBlock: "center"
63
72
  }, reactions.map(function (reaction) {
64
73
  return /*#__PURE__*/_react.default.createElement(_Reaction.Reaction, {
65
74
  key: reaction.emojiId,
@@ -71,7 +80,18 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
71
80
  flash: flash[reaction.emojiId],
72
81
  showParticleEffect: particleEffectByEmoji[reaction.emojiId]
73
82
  });
74
- }));
83
+ }), allowUserDialog && /*#__PURE__*/_react.default.createElement(_primitives.Box, {
84
+ xcss: viewAllButtonStyling
85
+ }, /*#__PURE__*/_react.default.createElement(_new.default, {
86
+ appearance: "subtle",
87
+ onClick: function onClick() {
88
+ return handleOpenReactionsDialog === null || handleOpenReactionsDialog === void 0 ? void 0 : handleOpenReactionsDialog(reactions[0].emojiId);
89
+ },
90
+ spacing: "compact"
91
+ }, /*#__PURE__*/_react.default.createElement(_primitives.Text, {
92
+ color: "color.text.subtlest",
93
+ weight: "medium"
94
+ }, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _i18n.messages.seeWhoReacted)))));
75
95
  },
76
96
  isOpen: isSummaryPopupOpen,
77
97
  onClose: handlePopupClose,
@@ -8,14 +8,16 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.Reactions = exports.RENDER_VIEWALL_REACTED_USERS_DIALOG = exports.RENDER_REACTIONS_TESTID = exports.RENDER_REACTIONS_SUMMARY_TESTID = void 0;
9
9
  exports.getTooltip = getTooltip;
10
10
  exports.ufoExperiences = void 0;
11
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
12
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
12
13
  var _react = _interopRequireWildcard(require("react"));
13
14
  var _react2 = require("@emotion/react");
14
15
  var _reactIntlNext = require("react-intl-next");
15
16
  var _analyticsNext = require("@atlaskit/analytics-next");
16
17
  var _modalDialog = require("@atlaskit/modal-dialog");
17
- var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
18
+ var _new = _interopRequireDefault(require("@atlaskit/button/new"));
18
19
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
20
+ var _primitives = require("@atlaskit/primitives");
19
21
  var _analytics = require("../../analytics");
20
22
  var _constants = require("../../shared/constants");
21
23
  var _i18n = require("../../shared/i18n");
@@ -35,6 +37,10 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
35
37
 
36
38
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
37
39
 
40
+ var tooltipStyle = (0, _primitives.xcss)({
41
+ paddingLeft: 'space.050'
42
+ });
43
+
38
44
  /**
39
45
  * Set of all available UFO experiences relating to reactions dialog
40
46
  */
@@ -183,6 +189,25 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
183
189
  onSelection(emojiId);
184
190
  }, [createAnalyticsEvent, onSelection, reactions]);
185
191
 
192
+ /**
193
+ * event handler to open selected reaction from tooltip
194
+ * @param emojiId selected emoji id
195
+ */
196
+ var handleOpenReactionsDialog = function handleOpenReactionsDialog(emojiId) {
197
+ // ufo start opening reaction dialog
198
+ ufoExperiences.openDialog.start();
199
+ setSelectedEmojiId(emojiId);
200
+ onDialogOpenCallback(emojiId, 'tooltip');
201
+ // ufo opening reaction dialog success
202
+ ufoExperiences.openDialog.success({
203
+ metadata: {
204
+ emojiId: emojiId,
205
+ source: 'Reactions',
206
+ reason: 'Opening dialog from emoji tooltip link successfully'
207
+ }
208
+ });
209
+ };
210
+
186
211
  /**
187
212
  * Event handler to oepn all reactions link button
188
213
  */
@@ -296,7 +321,9 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
296
321
  onReactionMouseEnter: handleReactionMouseEnter,
297
322
  placement: summaryViewPlacement,
298
323
  showOpaqueBackground: showOpaqueBackground,
299
- subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker
324
+ subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
325
+ handleOpenReactionsDialog: handleOpenReactionsDialog,
326
+ allowUserDialog: allowUserDialog
300
327
  })) : memorizedReactions.map(function (reaction) {
301
328
  return (0, _react2.jsx)(_Reaction.Reaction, {
302
329
  key: reaction.emojiId,
@@ -327,21 +354,19 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
327
354
  showOpaqueBackground: showOpaqueBackground,
328
355
  showAddReactionText: showAddReactionText,
329
356
  subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker
330
- }), allowUserDialog && hasEmojiWithFivePlusReactions && (0, _react2.jsx)(_tooltip.default, {
357
+ }), allowUserDialog && hasEmojiWithFivePlusReactions && !shouldShowSummaryView && (0, _react2.jsx)(_primitives.Box, {
358
+ xcss: tooltipStyle
359
+ }, (0, _react2.jsx)(_tooltip.default, {
331
360
  content: (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.seeWhoReactedTooltip),
332
361
  hideTooltipOnClick: true
333
- }, (0, _react2.jsx)(_standardButton.default
334
- // TODO: (from codemod) "link" and "subtle-link" appearances are only available in LinkButton, please either provide a href prop then migrate to LinkButton, or remove the appearance from the default button.
335
- // https://product-fabric.atlassian.net/browse/DSP-18982
336
- , {
337
- appearance: "subtle-link",
338
- onClick: handleOpenAllReactionsDialog
339
- // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
340
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
341
- ,
342
- css: _styles.seeWhoReactedStyle,
343
- testId: RENDER_VIEWALL_REACTED_USERS_DIALOG
344
- }, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.seeWhoReacted))), (0, _react2.jsx)(_modalDialog.ModalTransition, null, !!selectedEmojiId && (0, _react2.jsx)(_ReactionDialog.ReactionsDialog, {
362
+ }, function (tooltipProps) {
363
+ return (0, _react2.jsx)(_new.default, (0, _extends2.default)({}, tooltipProps, {
364
+ appearance: "subtle",
365
+ spacing: "compact",
366
+ onClick: handleOpenAllReactionsDialog,
367
+ testId: RENDER_VIEWALL_REACTED_USERS_DIALOG
368
+ }), (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.seeWhoReacted));
369
+ })), (0, _react2.jsx)(_modalDialog.ModalTransition, null, !!selectedEmojiId && (0, _react2.jsx)(_ReactionDialog.ReactionsDialog, {
345
370
  selectedEmojiId: selectedEmojiId,
346
371
  reactions: memorizedReactions,
347
372
  emojiProvider: emojiProvider,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.wrapperStyle = exports.seeWhoReactedStyle = exports.reactionPickerStyle = void 0;
6
+ exports.wrapperStyle = exports.reactionPickerStyle = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  /**
9
9
  * @jsxRuntime classic
@@ -17,17 +17,6 @@ var reactionPickerStyle = exports.reactionPickerStyle = (0, _react.css)({
17
17
  marginTop: "var(--ds-space-050, 4px)"
18
18
  });
19
19
 
20
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
21
- var seeWhoReactedStyle = exports.seeWhoReactedStyle = (0, _react.css)({
22
- height: '24px',
23
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
24
- lineHeight: '24px',
25
- paddingLeft: 0,
26
- paddingRight: 0,
27
- marginTop: "var(--ds-space-050, 4px)",
28
- marginLeft: "var(--ds-space-050, 4px)"
29
- });
30
-
31
20
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
32
21
  var wrapperStyle = exports.wrapperStyle = (0, _react.css)({
33
22
  display: 'flex',
@@ -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.5.1";
4
+ const packageVersion = "24.7.0";
5
5
  /**
6
6
  * TODO: move to utility package?
7
7
  * A random sampling function
@@ -11,12 +11,15 @@ 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, Flex, xcss } from '@atlaskit/primitives';
14
+ import { Box, Text, Flex, xcss } from '@atlaskit/primitives';
15
15
  import { messages } from '../../shared/i18n';
16
16
  import { reactionViewStyle, userListStyle, userStyle, centerSpinner } from './styles';
17
17
  const userDescriptionStyle = xcss({
18
18
  marginLeft: 'space.200'
19
19
  });
20
+ const profileWrapperStyle = xcss({
21
+ marginLeft: 'space.0'
22
+ });
20
23
  export const ReactionView = ({
21
24
  selectedEmojiId,
22
25
  emojiProvider,
@@ -77,17 +80,19 @@ export const ReactionView = ({
77
80
  jsx("li", {
78
81
  css: userStyle,
79
82
  key: user.id
80
- }, ProfileCardWrapper && user.accountId ? jsx(ProfileCardWrapper, {
83
+ }, ProfileCardWrapper && user.accountId ? jsx(Box, {
84
+ xcss: profileWrapperStyle
85
+ }, jsx(ProfileCardWrapper, {
81
86
  userId: user.accountId,
82
87
  isAnonymous: false,
83
88
  canViewProfile: true,
84
89
  position: "left-start"
85
90
  }, jsx(Avatar, {
86
- size: "large",
91
+ size: "medium",
87
92
  src: profile,
88
93
  testId: "profile"
89
- })) : jsx(Avatar, {
90
- size: "large",
94
+ }))) : jsx(Avatar, {
95
+ size: "medium",
91
96
  src: profile,
92
97
  testId: "profile"
93
98
  }), jsx(Flex, {
@@ -13,7 +13,13 @@ import { Counter } from '../Counter';
13
13
  import { customTabWrapper, customTabListStyles } from './styles';
14
14
  import { ReactionView } from './ReactionView';
15
15
  const emojiStyles = xcss({
16
- minWidth: '36px'
16
+ transformOrigin: 'center center 0',
17
+ paddingInlineStart: 'space.100',
18
+ paddingBlock: 'space.050',
19
+ paddingInlineEnd: 'space.050'
20
+ });
21
+ const counterStyle = xcss({
22
+ marginTop: 'space.025'
17
23
  });
18
24
  export const ReactionsList = ({
19
25
  reactions,
@@ -85,9 +91,11 @@ export const ReactionsList = ({
85
91
  emojiId: emojiId,
86
92
  fitToHeight: 16,
87
93
  showTooltip: true
88
- })), jsx(Counter, {
94
+ })), jsx(Box, {
95
+ xcss: counterStyle
96
+ }, jsx(Counter, {
89
97
  value: reaction.count
90
- }))));
98
+ })))));
91
99
  }))), reactions.map(reaction => jsx(ReactionView, {
92
100
  key: reaction.emojiId,
93
101
  reaction: reaction,
@@ -97,7 +97,7 @@ export const reactionViewStyle = css({
97
97
  p: {
98
98
  margin: 0,
99
99
  color: `${`var(--ds-text, ${N800})`}`,
100
- font: "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
100
+ font: "var(--ds-font-heading-xsmall, normal 600 14px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
101
101
  fontWeight: "var(--ds-font-weight-semibold, 600)",
102
102
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
103
103
  lineHeight: '20px',
@@ -125,7 +125,7 @@ export const userListStyle = css({
125
125
  export const userStyle = css({
126
126
  display: 'flex',
127
127
  alignItems: 'center',
128
- padding: `${"var(--ds-space-100, 8px)"} 0px ${"var(--ds-space-100, 8px)"} 0px`,
128
+ padding: `${"var(--ds-space-050, 4px)"} 0px ${"var(--ds-space-050, 4px)"} 0px`,
129
129
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
130
130
  '> span': {
131
131
  marginLeft: "var(--ds-space-200, 16px)"
@@ -1,14 +1,20 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useCallback, useState } from 'react';
3
+ import { FormattedMessage } from 'react-intl-next';
3
4
  import Popup from '@atlaskit/popup';
4
- import { Inline, xcss } from '@atlaskit/primitives';
5
+ import { Box, Inline, Text, xcss } from '@atlaskit/primitives';
6
+ import Button from '@atlaskit/button/new';
5
7
  import { Reaction } from '../Reaction';
6
8
  import { ReactionSummaryButton } from './ReactionSummaryButton';
9
+ import { messages } from '../../shared/i18n';
7
10
  const summaryPopupStyles = xcss({
8
11
  padding: 'space.100',
9
12
  paddingTop: 'space.050',
10
13
  maxWidth: '325px'
11
14
  });
15
+ const viewAllButtonStyling = xcss({
16
+ marginTop: 'space.050'
17
+ });
12
18
 
13
19
  /**
14
20
  * Test id for the Reactions summary view popup
@@ -24,7 +30,9 @@ export const ReactionSummaryView = ({
24
30
  onReactionFocused,
25
31
  onReactionMouseEnter,
26
32
  showOpaqueBackground = false,
27
- subtleReactionsSummaryAndPicker = false
33
+ subtleReactionsSummaryAndPicker = false,
34
+ handleOpenReactionsDialog,
35
+ allowUserDialog
28
36
  }) => {
29
37
  const [isSummaryPopupOpen, setSummaryPopupOpen] = useState(false);
30
38
  const handlePopupClose = useCallback(() => setSummaryPopupOpen(false), []);
@@ -35,7 +43,8 @@ export const ReactionSummaryView = ({
35
43
  xcss: summaryPopupStyles,
36
44
  testId: RENDER_SUMMARY_VIEW_POPUP_TESTID,
37
45
  space: "space.025",
38
- shouldWrap: true
46
+ shouldWrap: true,
47
+ alignBlock: "center"
39
48
  }, reactions.map(reaction => /*#__PURE__*/React.createElement(Reaction, {
40
49
  key: reaction.emojiId,
41
50
  reaction: reaction,
@@ -45,7 +54,16 @@ export const ReactionSummaryView = ({
45
54
  onMouseEnter: onReactionMouseEnter,
46
55
  flash: flash[reaction.emojiId],
47
56
  showParticleEffect: particleEffectByEmoji[reaction.emojiId]
48
- }))),
57
+ })), allowUserDialog && /*#__PURE__*/React.createElement(Box, {
58
+ xcss: viewAllButtonStyling
59
+ }, /*#__PURE__*/React.createElement(Button, {
60
+ appearance: "subtle",
61
+ onClick: () => handleOpenReactionsDialog === null || handleOpenReactionsDialog === void 0 ? void 0 : handleOpenReactionsDialog(reactions[0].emojiId),
62
+ spacing: "compact"
63
+ }, /*#__PURE__*/React.createElement(Text, {
64
+ color: "color.text.subtlest",
65
+ weight: "medium"
66
+ }, /*#__PURE__*/React.createElement(FormattedMessage, messages.seeWhoReacted))))),
49
67
  isOpen: isSummaryPopupOpen,
50
68
  onClose: handlePopupClose,
51
69
  trigger: triggerProps => /*#__PURE__*/React.createElement(ReactionSummaryButton, _extends({}, triggerProps, {
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  /**
2
3
  * @jsxRuntime classic
3
4
  * @jsx jsx
@@ -8,8 +9,9 @@ import { jsx } from '@emotion/react';
8
9
  import { FormattedMessage } from 'react-intl-next';
9
10
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
10
11
  import { ModalTransition } from '@atlaskit/modal-dialog';
11
- import Button from '@atlaskit/button/standard-button';
12
+ import Button from '@atlaskit/button/new';
12
13
  import Tooltip from '@atlaskit/tooltip';
14
+ import { Box, xcss } from '@atlaskit/primitives';
13
15
  import { createAndFireSafe, createPickerButtonClickedEvent, createPickerCancelledEvent, createPickerMoreClickedEvent, createReactionsRenderedEvent, createReactionSelectionEvent, isSampled } from '../../analytics';
14
16
  import { SAMPLING_RATE_REACTIONS_RENDERED_EXP } from '../../shared/constants';
15
17
  import { messages } from '../../shared/i18n';
@@ -19,7 +21,10 @@ import { Reaction } from '../Reaction';
19
21
  import { ReactionsDialog } from '../ReactionDialog';
20
22
  import { ReactionPicker } from '../ReactionPicker';
21
23
  import { ReactionSummaryView } from '../ReactionSummary/';
22
- import { reactionPickerStyle, seeWhoReactedStyle, wrapperStyle } from './styles';
24
+ import { reactionPickerStyle, wrapperStyle } from './styles';
25
+ const tooltipStyle = xcss({
26
+ paddingLeft: 'space.050'
27
+ });
23
28
 
24
29
  /**
25
30
  * Set of all available UFO experiences relating to reactions dialog
@@ -150,6 +155,25 @@ export const Reactions = /*#__PURE__*/React.memo(({
150
155
  onSelection(emojiId);
151
156
  }, [createAnalyticsEvent, onSelection, reactions]);
152
157
 
158
+ /**
159
+ * event handler to open selected reaction from tooltip
160
+ * @param emojiId selected emoji id
161
+ */
162
+ const handleOpenReactionsDialog = emojiId => {
163
+ // ufo start opening reaction dialog
164
+ ufoExperiences.openDialog.start();
165
+ setSelectedEmojiId(emojiId);
166
+ onDialogOpenCallback(emojiId, 'tooltip');
167
+ // ufo opening reaction dialog success
168
+ ufoExperiences.openDialog.success({
169
+ metadata: {
170
+ emojiId,
171
+ source: 'Reactions',
172
+ reason: 'Opening dialog from emoji tooltip link successfully'
173
+ }
174
+ });
175
+ };
176
+
153
177
  /**
154
178
  * Event handler to oepn all reactions link button
155
179
  */
@@ -259,7 +283,9 @@ export const Reactions = /*#__PURE__*/React.memo(({
259
283
  onReactionMouseEnter: handleReactionMouseEnter,
260
284
  placement: summaryViewPlacement,
261
285
  showOpaqueBackground: showOpaqueBackground,
262
- subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker
286
+ subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
287
+ handleOpenReactionsDialog: handleOpenReactionsDialog,
288
+ allowUserDialog: allowUserDialog
263
289
  })) : memorizedReactions.map(reaction => jsx(Reaction, {
264
290
  key: reaction.emojiId,
265
291
  reaction: reaction,
@@ -288,21 +314,17 @@ export const Reactions = /*#__PURE__*/React.memo(({
288
314
  showOpaqueBackground: showOpaqueBackground,
289
315
  showAddReactionText: showAddReactionText,
290
316
  subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker
291
- }), allowUserDialog && hasEmojiWithFivePlusReactions && jsx(Tooltip, {
317
+ }), allowUserDialog && hasEmojiWithFivePlusReactions && !shouldShowSummaryView && jsx(Box, {
318
+ xcss: tooltipStyle
319
+ }, jsx(Tooltip, {
292
320
  content: jsx(FormattedMessage, messages.seeWhoReactedTooltip),
293
321
  hideTooltipOnClick: true
294
- }, jsx(Button
295
- // TODO: (from codemod) "link" and "subtle-link" appearances are only available in LinkButton, please either provide a href prop then migrate to LinkButton, or remove the appearance from the default button.
296
- // https://product-fabric.atlassian.net/browse/DSP-18982
297
- , {
298
- appearance: "subtle-link",
299
- onClick: handleOpenAllReactionsDialog
300
- // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
301
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
302
- ,
303
- css: seeWhoReactedStyle,
322
+ }, tooltipProps => jsx(Button, _extends({}, tooltipProps, {
323
+ appearance: "subtle",
324
+ spacing: "compact",
325
+ onClick: handleOpenAllReactionsDialog,
304
326
  testId: RENDER_VIEWALL_REACTED_USERS_DIALOG
305
- }, jsx(FormattedMessage, messages.seeWhoReacted))), jsx(ModalTransition, null, !!selectedEmojiId && jsx(ReactionsDialog, {
327
+ }), jsx(FormattedMessage, messages.seeWhoReacted)))), jsx(ModalTransition, null, !!selectedEmojiId && jsx(ReactionsDialog, {
306
328
  selectedEmojiId: selectedEmojiId,
307
329
  reactions: memorizedReactions,
308
330
  emojiProvider: emojiProvider,
@@ -10,17 +10,6 @@ export const reactionPickerStyle = css({
10
10
  marginTop: "var(--ds-space-050, 4px)"
11
11
  });
12
12
 
13
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
14
- export const seeWhoReactedStyle = css({
15
- height: '24px',
16
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
17
- lineHeight: '24px',
18
- paddingLeft: 0,
19
- paddingRight: 0,
20
- marginTop: "var(--ds-space-050, 4px)",
21
- marginLeft: "var(--ds-space-050, 4px)"
22
- });
23
-
24
13
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
25
14
  export const wrapperStyle = css({
26
15
  display: 'flex',
@@ -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.5.1";
7
+ var packageVersion = "24.7.0";
8
8
  /**
9
9
  * TODO: move to utility package?
10
10
  * A random sampling function
@@ -14,12 +14,15 @@ import { ResourcedEmoji } from '@atlaskit/emoji/element';
14
14
  import Avatar from '@atlaskit/avatar/Avatar';
15
15
  import Spinner from '@atlaskit/spinner';
16
16
  import { useTabPanel } from '@atlaskit/tabs';
17
- import { Text, Flex, xcss } from '@atlaskit/primitives';
17
+ import { Box, Text, Flex, xcss } from '@atlaskit/primitives';
18
18
  import { messages } from '../../shared/i18n';
19
19
  import { reactionViewStyle, userListStyle, userStyle, centerSpinner } from './styles';
20
20
  var userDescriptionStyle = xcss({
21
21
  marginLeft: 'space.200'
22
22
  });
23
+ var profileWrapperStyle = xcss({
24
+ marginLeft: 'space.0'
25
+ });
23
26
  export var ReactionView = function ReactionView(_ref) {
24
27
  var selectedEmojiId = _ref.selectedEmojiId,
25
28
  emojiProvider = _ref.emojiProvider,
@@ -99,17 +102,19 @@ export var ReactionView = function ReactionView(_ref) {
99
102
  jsx("li", {
100
103
  css: userStyle,
101
104
  key: user.id
102
- }, ProfileCardWrapper && user.accountId ? jsx(ProfileCardWrapper, {
105
+ }, ProfileCardWrapper && user.accountId ? jsx(Box, {
106
+ xcss: profileWrapperStyle
107
+ }, jsx(ProfileCardWrapper, {
103
108
  userId: user.accountId,
104
109
  isAnonymous: false,
105
110
  canViewProfile: true,
106
111
  position: "left-start"
107
112
  }, jsx(Avatar, {
108
- size: "large",
113
+ size: "medium",
109
114
  src: profile,
110
115
  testId: "profile"
111
- })) : jsx(Avatar, {
112
- size: "large",
116
+ }))) : jsx(Avatar, {
117
+ size: "medium",
113
118
  src: profile,
114
119
  testId: "profile"
115
120
  }), jsx(Flex, {
@@ -14,7 +14,13 @@ import { Counter } from '../Counter';
14
14
  import { customTabWrapper, customTabListStyles } from './styles';
15
15
  import { ReactionView } from './ReactionView';
16
16
  var emojiStyles = xcss({
17
- minWidth: '36px'
17
+ transformOrigin: 'center center 0',
18
+ paddingInlineStart: 'space.100',
19
+ paddingBlock: 'space.050',
20
+ paddingInlineEnd: 'space.050'
21
+ });
22
+ var counterStyle = xcss({
23
+ marginTop: 'space.025'
18
24
  });
19
25
  export var ReactionsList = function ReactionsList(_ref) {
20
26
  var reactions = _ref.reactions,
@@ -91,9 +97,11 @@ export var ReactionsList = function ReactionsList(_ref) {
91
97
  emojiId: emojiId,
92
98
  fitToHeight: 16,
93
99
  showTooltip: true
94
- })), jsx(Counter, {
100
+ })), jsx(Box, {
101
+ xcss: counterStyle
102
+ }, jsx(Counter, {
95
103
  value: reaction.count
96
- }))));
104
+ })))));
97
105
  }))), reactions.map(function (reaction) {
98
106
  return jsx(ReactionView, {
99
107
  key: reaction.emojiId,
@@ -103,7 +103,7 @@ export var reactionViewStyle = css({
103
103
  p: {
104
104
  margin: 0,
105
105
  color: "".concat("var(--ds-text, ".concat(N800, ")")),
106
- font: "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
106
+ font: "var(--ds-font-heading-xsmall, normal 600 14px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
107
107
  fontWeight: "var(--ds-font-weight-semibold, 600)",
108
108
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
109
109
  lineHeight: '20px',
@@ -131,7 +131,7 @@ export var userListStyle = css({
131
131
  export var userStyle = css({
132
132
  display: 'flex',
133
133
  alignItems: 'center',
134
- padding: "var(--ds-space-100, 8px)".concat(" 0px ", "var(--ds-space-100, 8px)", " 0px"),
134
+ padding: "var(--ds-space-050, 4px)".concat(" 0px ", "var(--ds-space-050, 4px)", " 0px"),
135
135
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
136
136
  '> span': {
137
137
  marginLeft: "var(--ds-space-200, 16px)"
@@ -1,15 +1,21 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import React, { useCallback, useState } from 'react';
4
+ import { FormattedMessage } from 'react-intl-next';
4
5
  import Popup from '@atlaskit/popup';
5
- import { Inline, xcss } from '@atlaskit/primitives';
6
+ import { Box, Inline, Text, xcss } from '@atlaskit/primitives';
7
+ import Button from '@atlaskit/button/new';
6
8
  import { Reaction } from '../Reaction';
7
9
  import { ReactionSummaryButton } from './ReactionSummaryButton';
10
+ import { messages } from '../../shared/i18n';
8
11
  var summaryPopupStyles = xcss({
9
12
  padding: 'space.100',
10
13
  paddingTop: 'space.050',
11
14
  maxWidth: '325px'
12
15
  });
16
+ var viewAllButtonStyling = xcss({
17
+ marginTop: 'space.050'
18
+ });
13
19
 
14
20
  /**
15
21
  * Test id for the Reactions summary view popup
@@ -31,7 +37,9 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
31
37
  _ref$showOpaqueBackgr = _ref.showOpaqueBackground,
32
38
  showOpaqueBackground = _ref$showOpaqueBackgr === void 0 ? false : _ref$showOpaqueBackgr,
33
39
  _ref$subtleReactionsS = _ref.subtleReactionsSummaryAndPicker,
34
- subtleReactionsSummaryAndPicker = _ref$subtleReactionsS === void 0 ? false : _ref$subtleReactionsS;
40
+ subtleReactionsSummaryAndPicker = _ref$subtleReactionsS === void 0 ? false : _ref$subtleReactionsS,
41
+ handleOpenReactionsDialog = _ref.handleOpenReactionsDialog,
42
+ allowUserDialog = _ref.allowUserDialog;
35
43
  var _useState = useState(false),
36
44
  _useState2 = _slicedToArray(_useState, 2),
37
45
  isSummaryPopupOpen = _useState2[0],
@@ -49,7 +57,8 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
49
57
  xcss: summaryPopupStyles,
50
58
  testId: RENDER_SUMMARY_VIEW_POPUP_TESTID,
51
59
  space: "space.025",
52
- shouldWrap: true
60
+ shouldWrap: true,
61
+ alignBlock: "center"
53
62
  }, reactions.map(function (reaction) {
54
63
  return /*#__PURE__*/React.createElement(Reaction, {
55
64
  key: reaction.emojiId,
@@ -61,7 +70,18 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
61
70
  flash: flash[reaction.emojiId],
62
71
  showParticleEffect: particleEffectByEmoji[reaction.emojiId]
63
72
  });
64
- }));
73
+ }), allowUserDialog && /*#__PURE__*/React.createElement(Box, {
74
+ xcss: viewAllButtonStyling
75
+ }, /*#__PURE__*/React.createElement(Button, {
76
+ appearance: "subtle",
77
+ onClick: function onClick() {
78
+ return handleOpenReactionsDialog === null || handleOpenReactionsDialog === void 0 ? void 0 : handleOpenReactionsDialog(reactions[0].emojiId);
79
+ },
80
+ spacing: "compact"
81
+ }, /*#__PURE__*/React.createElement(Text, {
82
+ color: "color.text.subtlest",
83
+ weight: "medium"
84
+ }, /*#__PURE__*/React.createElement(FormattedMessage, messages.seeWhoReacted)))));
65
85
  },
66
86
  isOpen: isSummaryPopupOpen,
67
87
  onClose: handlePopupClose,
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
  /**
3
4
  * @jsxRuntime classic
@@ -9,8 +10,9 @@ import { jsx } from '@emotion/react';
9
10
  import { FormattedMessage } from 'react-intl-next';
10
11
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
11
12
  import { ModalTransition } from '@atlaskit/modal-dialog';
12
- import Button from '@atlaskit/button/standard-button';
13
+ import Button from '@atlaskit/button/new';
13
14
  import Tooltip from '@atlaskit/tooltip';
15
+ import { Box, xcss } from '@atlaskit/primitives';
14
16
  import { createAndFireSafe, createPickerButtonClickedEvent, createPickerCancelledEvent, createPickerMoreClickedEvent, createReactionsRenderedEvent, createReactionSelectionEvent, isSampled } from '../../analytics';
15
17
  import { SAMPLING_RATE_REACTIONS_RENDERED_EXP } from '../../shared/constants';
16
18
  import { messages } from '../../shared/i18n';
@@ -20,7 +22,10 @@ import { Reaction } from '../Reaction';
20
22
  import { ReactionsDialog } from '../ReactionDialog';
21
23
  import { ReactionPicker } from '../ReactionPicker';
22
24
  import { ReactionSummaryView } from '../ReactionSummary/';
23
- import { reactionPickerStyle, seeWhoReactedStyle, wrapperStyle } from './styles';
25
+ import { reactionPickerStyle, wrapperStyle } from './styles';
26
+ var tooltipStyle = xcss({
27
+ paddingLeft: 'space.050'
28
+ });
24
29
 
25
30
  /**
26
31
  * Set of all available UFO experiences relating to reactions dialog
@@ -170,6 +175,25 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
170
175
  onSelection(emojiId);
171
176
  }, [createAnalyticsEvent, onSelection, reactions]);
172
177
 
178
+ /**
179
+ * event handler to open selected reaction from tooltip
180
+ * @param emojiId selected emoji id
181
+ */
182
+ var handleOpenReactionsDialog = function handleOpenReactionsDialog(emojiId) {
183
+ // ufo start opening reaction dialog
184
+ ufoExperiences.openDialog.start();
185
+ setSelectedEmojiId(emojiId);
186
+ onDialogOpenCallback(emojiId, 'tooltip');
187
+ // ufo opening reaction dialog success
188
+ ufoExperiences.openDialog.success({
189
+ metadata: {
190
+ emojiId: emojiId,
191
+ source: 'Reactions',
192
+ reason: 'Opening dialog from emoji tooltip link successfully'
193
+ }
194
+ });
195
+ };
196
+
173
197
  /**
174
198
  * Event handler to oepn all reactions link button
175
199
  */
@@ -283,7 +307,9 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
283
307
  onReactionMouseEnter: handleReactionMouseEnter,
284
308
  placement: summaryViewPlacement,
285
309
  showOpaqueBackground: showOpaqueBackground,
286
- subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker
310
+ subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
311
+ handleOpenReactionsDialog: handleOpenReactionsDialog,
312
+ allowUserDialog: allowUserDialog
287
313
  })) : memorizedReactions.map(function (reaction) {
288
314
  return jsx(Reaction, {
289
315
  key: reaction.emojiId,
@@ -314,21 +340,19 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
314
340
  showOpaqueBackground: showOpaqueBackground,
315
341
  showAddReactionText: showAddReactionText,
316
342
  subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker
317
- }), allowUserDialog && hasEmojiWithFivePlusReactions && jsx(Tooltip, {
343
+ }), allowUserDialog && hasEmojiWithFivePlusReactions && !shouldShowSummaryView && jsx(Box, {
344
+ xcss: tooltipStyle
345
+ }, jsx(Tooltip, {
318
346
  content: jsx(FormattedMessage, messages.seeWhoReactedTooltip),
319
347
  hideTooltipOnClick: true
320
- }, jsx(Button
321
- // TODO: (from codemod) "link" and "subtle-link" appearances are only available in LinkButton, please either provide a href prop then migrate to LinkButton, or remove the appearance from the default button.
322
- // https://product-fabric.atlassian.net/browse/DSP-18982
323
- , {
324
- appearance: "subtle-link",
325
- onClick: handleOpenAllReactionsDialog
326
- // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
327
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
328
- ,
329
- css: seeWhoReactedStyle,
330
- testId: RENDER_VIEWALL_REACTED_USERS_DIALOG
331
- }, jsx(FormattedMessage, messages.seeWhoReacted))), jsx(ModalTransition, null, !!selectedEmojiId && jsx(ReactionsDialog, {
348
+ }, function (tooltipProps) {
349
+ return jsx(Button, _extends({}, tooltipProps, {
350
+ appearance: "subtle",
351
+ spacing: "compact",
352
+ onClick: handleOpenAllReactionsDialog,
353
+ testId: RENDER_VIEWALL_REACTED_USERS_DIALOG
354
+ }), jsx(FormattedMessage, messages.seeWhoReacted));
355
+ })), jsx(ModalTransition, null, !!selectedEmojiId && jsx(ReactionsDialog, {
332
356
  selectedEmojiId: selectedEmojiId,
333
357
  reactions: memorizedReactions,
334
358
  emojiProvider: emojiProvider,
@@ -10,17 +10,6 @@ export var reactionPickerStyle = css({
10
10
  marginTop: "var(--ds-space-050, 4px)"
11
11
  });
12
12
 
13
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
14
- export var seeWhoReactedStyle = css({
15
- height: '24px',
16
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
17
- lineHeight: '24px',
18
- paddingLeft: 0,
19
- paddingRight: 0,
20
- marginTop: "var(--ds-space-050, 4px)",
21
- marginLeft: "var(--ds-space-050, 4px)"
22
- });
23
-
24
13
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
25
14
  export var wrapperStyle = css({
26
15
  display: 'flex',
@@ -10,4 +10,4 @@ export type RepositionOnUpdateProps = {
10
10
  showFullPicker: boolean;
11
11
  };
12
12
  };
13
- export declare const RepositionOnUpdate: ({ children, update, settings, }: React.PropsWithChildren<RepositionOnUpdateProps>) => JSX.Element;
13
+ export declare const RepositionOnUpdate: ({ children, update, settings, }: React.PropsWithChildren<RepositionOnUpdateProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { type Placement } from '@atlaskit/popper';
3
3
  import { type ReactionClick, type ReactionFocused, type ReactionMouseEnter } from '../../types';
4
4
  import { type ReactionsProps } from '../Reactions';
@@ -6,7 +6,7 @@ import { type ReactionsProps } from '../Reactions';
6
6
  * Test id for the Reactions summary view popup
7
7
  */
8
8
  export declare const RENDER_SUMMARY_VIEW_POPUP_TESTID = "render-summary-view-popup";
9
- interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'flash' | 'particleEffectByEmoji'> {
9
+ interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'flash' | 'particleEffectByEmoji' | 'allowUserDialog'> {
10
10
  /**
11
11
  * Optional prop to change the placement of the summary popup reaction list
12
12
  */
@@ -31,6 +31,10 @@ interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider'
31
31
  * Optional prop for applying subtle styling to reaction picker
32
32
  */
33
33
  subtleReactionsSummaryAndPicker?: boolean;
34
+ /**
35
+ * Optional function when the user wants to see more users in a modal
36
+ */
37
+ handleOpenReactionsDialog?: (emojiId: string) => void;
34
38
  }
35
- export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, }: ReactionSummaryViewProps) => JSX.Element;
39
+ export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, handleOpenReactionsDialog, allowUserDialog, }: ReactionSummaryViewProps) => React.JSX.Element;
36
40
  export {};
@@ -1,3 +1,2 @@
1
1
  export declare const reactionPickerStyle: import("@emotion/react").SerializedStyles;
2
- export declare const seeWhoReactedStyle: import("@emotion/react").SerializedStyles;
3
2
  export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
@@ -20,4 +20,4 @@ export interface ConnectedReactionPickerProps extends Omit<ReactionPickerProps,
20
20
  /**
21
21
  * Reaction Picker component
22
22
  */
23
- export declare const ConnectedReactionPicker: (props: React.PropsWithChildren<ConnectedReactionPickerProps>) => JSX.Element;
23
+ export declare const ConnectedReactionPicker: (props: React.PropsWithChildren<ConnectedReactionPickerProps>) => React.JSX.Element;
@@ -53,4 +53,4 @@ export declare const mapDispatchToPropsHelper: (actions: Actions, containerAri:
53
53
  getReactionDetails: (emojiId: string) => void;
54
54
  onSelection: (emojiId: string) => void;
55
55
  };
56
- export declare const ConnectedReactionsView: (props: React.PropsWithChildren<ConnectedReactionsViewProps>) => JSX.Element;
56
+ export declare const ConnectedReactionsView: (props: React.PropsWithChildren<ConnectedReactionsViewProps>) => React.JSX.Element;
@@ -10,4 +10,4 @@ export type RepositionOnUpdateProps = {
10
10
  showFullPicker: boolean;
11
11
  };
12
12
  };
13
- export declare const RepositionOnUpdate: ({ children, update, settings, }: React.PropsWithChildren<RepositionOnUpdateProps>) => JSX.Element;
13
+ export declare const RepositionOnUpdate: ({ children, update, settings, }: React.PropsWithChildren<RepositionOnUpdateProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { type Placement } from '@atlaskit/popper';
3
3
  import { type ReactionClick, type ReactionFocused, type ReactionMouseEnter } from '../../types';
4
4
  import { type ReactionsProps } from '../Reactions';
@@ -6,7 +6,7 @@ import { type ReactionsProps } from '../Reactions';
6
6
  * Test id for the Reactions summary view popup
7
7
  */
8
8
  export declare const RENDER_SUMMARY_VIEW_POPUP_TESTID = "render-summary-view-popup";
9
- interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'flash' | 'particleEffectByEmoji'> {
9
+ interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'flash' | 'particleEffectByEmoji' | 'allowUserDialog'> {
10
10
  /**
11
11
  * Optional prop to change the placement of the summary popup reaction list
12
12
  */
@@ -31,6 +31,10 @@ interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider'
31
31
  * Optional prop for applying subtle styling to reaction picker
32
32
  */
33
33
  subtleReactionsSummaryAndPicker?: boolean;
34
+ /**
35
+ * Optional function when the user wants to see more users in a modal
36
+ */
37
+ handleOpenReactionsDialog?: (emojiId: string) => void;
34
38
  }
35
- export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, }: ReactionSummaryViewProps) => JSX.Element;
39
+ export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, handleOpenReactionsDialog, allowUserDialog, }: ReactionSummaryViewProps) => React.JSX.Element;
36
40
  export {};
@@ -1,3 +1,2 @@
1
1
  export declare const reactionPickerStyle: import("@emotion/react").SerializedStyles;
2
- export declare const seeWhoReactedStyle: import("@emotion/react").SerializedStyles;
3
2
  export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
@@ -20,4 +20,4 @@ export interface ConnectedReactionPickerProps extends Omit<ReactionPickerProps,
20
20
  /**
21
21
  * Reaction Picker component
22
22
  */
23
- export declare const ConnectedReactionPicker: (props: React.PropsWithChildren<ConnectedReactionPickerProps>) => JSX.Element;
23
+ export declare const ConnectedReactionPicker: (props: React.PropsWithChildren<ConnectedReactionPickerProps>) => React.JSX.Element;
@@ -53,4 +53,4 @@ export declare const mapDispatchToPropsHelper: (actions: Actions, containerAri:
53
53
  getReactionDetails: (emojiId: string) => void;
54
54
  onSelection: (emojiId: string) => void;
55
55
  };
56
- export declare const ConnectedReactionsView: (props: React.PropsWithChildren<ConnectedReactionsViewProps>) => JSX.Element;
56
+ export declare const ConnectedReactionsView: (props: React.PropsWithChildren<ConnectedReactionsViewProps>) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/reactions",
3
- "version": "24.5.1",
3
+ "version": "24.7.0",
4
4
  "description": "Reactions component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,10 +36,10 @@
36
36
  "@atlaskit/analytics-namespaced-context": "^6.13.0",
37
37
  "@atlaskit/analytics-next": "^10.3.0",
38
38
  "@atlaskit/avatar": "^21.18.0",
39
- "@atlaskit/button": "^20.4.0",
39
+ "@atlaskit/button": "^20.5.0",
40
40
  "@atlaskit/emoji": "^67.13.0",
41
41
  "@atlaskit/heading": "^4.1.0",
42
- "@atlaskit/icon": "^23.6.0",
42
+ "@atlaskit/icon": "^23.7.0",
43
43
  "@atlaskit/modal-dialog": "^12.20.0",
44
44
  "@atlaskit/motion": "^1.10.0",
45
45
  "@atlaskit/platform-feature-flags": "^1.0.0",