@atlaskit/reactions 31.2.0 → 31.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/reactions
2
2
 
3
+ ## 31.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#143861](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/143861)
8
+ [`54b42c1ffa021`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/54b42c1ffa021) -
9
+ [ux] Updating the UI for the summary tray that includes the reaction picker
10
+
3
11
  ## 31.2.0
4
12
 
5
13
  ### 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 = "31.2.0";
14
+ var packageVersion = "31.3.0";
15
15
  /**
16
16
  * TODO: move to utility package?
17
17
  * A random sampling function
@@ -116,7 +116,18 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
116
116
  testId: RENDER_SUMMARY_VIEW_POPUP_TESTID,
117
117
  onMouseEnter: handleSummaryViewTrayMouseEnter,
118
118
  onMouseLeave: handleSummaryViewTrayMouseLeave
119
- }, /*#__PURE__*/React.createElement(_compiled.Inline, {
119
+ }, allowSelectFromSummaryView && /*#__PURE__*/React.createElement(_compiled.Flex, {
120
+ justifyContent: "center"
121
+ }, /*#__PURE__*/React.createElement(_ReactionSummaryViewEmojiPicker.ReactionSummaryViewEmojiPicker, {
122
+ emojiProvider: emojiProvider,
123
+ disabled: disabled,
124
+ onSelection: handleEmojiSelection,
125
+ emojiPickerSize: emojiPickerSize,
126
+ tooltipContent: tooltipContent,
127
+ reactionPickerTriggerIcon: reactionPickerTriggerIcon,
128
+ reactionPickerTriggerText: reactionPickerTriggerText,
129
+ onOpen: onOpen
130
+ })), /*#__PURE__*/React.createElement(_compiled.Inline, {
120
131
  xcss: styles.summaryPopup,
121
132
  space: "space.025",
122
133
  shouldWrap: true,
@@ -135,17 +146,6 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
135
146
  handleOpenReactionsDialog: handleOpenReactionsDialog,
136
147
  isViewOnly: isViewOnly
137
148
  });
138
- })), allowSelectFromSummaryView && /*#__PURE__*/React.createElement(_compiled.Flex, {
139
- justifyContent: "center"
140
- }, /*#__PURE__*/React.createElement(_ReactionSummaryViewEmojiPicker.ReactionSummaryViewEmojiPicker, {
141
- emojiProvider: emojiProvider,
142
- disabled: disabled,
143
- onSelection: handleEmojiSelection,
144
- emojiPickerSize: emojiPickerSize,
145
- tooltipContent: tooltipContent,
146
- reactionPickerTriggerIcon: reactionPickerTriggerIcon,
147
- reactionPickerTriggerText: reactionPickerTriggerText,
148
- onOpen: onOpen
149
149
  })));
150
150
  },
151
151
  isOpen: isSummaryPopupOpen,
@@ -17,7 +17,6 @@ var _react = _interopRequireWildcard(require("react"));
17
17
  var _reactIntlNext = require("react-intl-next");
18
18
  var _analyticsNext = require("@atlaskit/analytics-next");
19
19
  var _modalDialog = require("@atlaskit/modal-dialog");
20
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
21
20
  var _segment = _interopRequireDefault(require("@atlaskit/react-ufo/segment"));
22
21
  var _analytics = require("../analytics");
23
22
  var _constants = require("../shared/constants");
@@ -163,7 +162,7 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
163
162
  if (status !== _types.ReactionStatus.ready) {
164
163
  renderTime.current = Date.now();
165
164
  } else {
166
- var isSSR = process.env.REACT_SSR && (0, _platformFeatureFlags.fg)('platform_fix_analytics_error');
165
+ var isSSR = process.env.REACT_SSR;
167
166
  if ((0, _analytics.isSampled)(_constants.SAMPLING_RATE_REACTIONS_RENDERED_EXP) && !isSSR) {
168
167
  var _renderTime$current;
169
168
  (0, _analytics.createAndFireSafe)(createAnalyticsEvent, _analytics.createReactionsRenderedEvent, (_renderTime$current = renderTime.current) !== null && _renderTime$current !== void 0 ? _renderTime$current : Date.now() //renderTime.current can be null during unit test cases
@@ -24,10 +24,11 @@
24
24
  ._bfhksyzs{background-color:var(--ds-background-disabled,#091e4208)}
25
25
  ._bfhkvuon{background-color:var(--ds-surface,#fff)}
26
26
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
27
+ ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
27
28
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
28
29
  ._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
29
- ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
30
30
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
31
+ ._p12f3xl8{max-width:305px}
31
32
  ._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
32
33
  ._u5f31b66{padding-right:var(--ds-space-050,4px)}
33
34
  ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
@@ -26,8 +26,8 @@ var styles = {
26
26
  opaqueEnabledTrigger: "_1h6dmuej _bfhkvuon _irr3108i _1di61ji5",
27
27
  disabledTrigger: "_1h6d13gt _bfhksyzs",
28
28
  miniMode: "_2rkoglpi _1dqoglyw _1ul91tcg _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66",
29
- fullWidthSummaryViewReactionPickerTrigger: "_1bsb1osq _19bvu2gc _u5f3u2gc _n3tdu2gc",
30
- fullWidth: "_1bsb1osq"
29
+ fullWidthSummaryViewReactionPickerTrigger: "_1bsb1osq _ca0qu2gc _19bvu2gc _u5f3u2gc",
30
+ fullWidth: "_1bsb1osq _p12f3xl8"
31
31
  };
32
32
 
33
33
  /**
@@ -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 = "31.2.0";
4
+ const packageVersion = "31.3.0";
5
5
  /**
6
6
  * TODO: move to utility package?
7
7
  * A random sampling function
@@ -84,7 +84,18 @@ export const ReactionSummaryView = ({
84
84
  testId: RENDER_SUMMARY_VIEW_POPUP_TESTID,
85
85
  onMouseEnter: handleSummaryViewTrayMouseEnter,
86
86
  onMouseLeave: handleSummaryViewTrayMouseLeave
87
- }, /*#__PURE__*/React.createElement(Inline, {
87
+ }, allowSelectFromSummaryView && /*#__PURE__*/React.createElement(Flex, {
88
+ justifyContent: "center"
89
+ }, /*#__PURE__*/React.createElement(ReactionSummaryViewEmojiPicker, {
90
+ emojiProvider: emojiProvider,
91
+ disabled: disabled,
92
+ onSelection: handleEmojiSelection,
93
+ emojiPickerSize: emojiPickerSize,
94
+ tooltipContent: tooltipContent,
95
+ reactionPickerTriggerIcon: reactionPickerTriggerIcon,
96
+ reactionPickerTriggerText: reactionPickerTriggerText,
97
+ onOpen: onOpen
98
+ })), /*#__PURE__*/React.createElement(Inline, {
88
99
  xcss: styles.summaryPopup,
89
100
  space: "space.025",
90
101
  shouldWrap: true,
@@ -101,18 +112,7 @@ export const ReactionSummaryView = ({
101
112
  allowUserDialog: allowUserDialog,
102
113
  handleOpenReactionsDialog: handleOpenReactionsDialog,
103
114
  isViewOnly: isViewOnly
104
- }))), allowSelectFromSummaryView && /*#__PURE__*/React.createElement(Flex, {
105
- justifyContent: "center"
106
- }, /*#__PURE__*/React.createElement(ReactionSummaryViewEmojiPicker, {
107
- emojiProvider: emojiProvider,
108
- disabled: disabled,
109
- onSelection: handleEmojiSelection,
110
- emojiPickerSize: emojiPickerSize,
111
- tooltipContent: tooltipContent,
112
- reactionPickerTriggerIcon: reactionPickerTriggerIcon,
113
- reactionPickerTriggerText: reactionPickerTriggerText,
114
- onOpen: onOpen
115
- }))),
115
+ })))),
116
116
  isOpen: isSummaryPopupOpen,
117
117
  onClose: handlePopupClose,
118
118
  trigger: triggerProps => /*#__PURE__*/React.createElement(ReactionSummaryButton, _extends({}, triggerProps, {
@@ -5,7 +5,6 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
5
5
  import { FormattedMessage } from 'react-intl-next';
6
6
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
7
7
  import { ModalTransition } from '@atlaskit/modal-dialog';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  import UFOSegment from '@atlaskit/react-ufo/segment';
10
9
  import { createAndFireSafe, createPickerButtonClickedEvent, createPickerCancelledEvent, createPickerMoreClickedEvent, createReactionsRenderedEvent, createReactionSelectionEvent, isSampled } from '../analytics';
11
10
  import { SAMPLING_RATE_REACTIONS_RENDERED_EXP } from '../shared/constants';
@@ -125,7 +124,7 @@ export const Reactions = /*#__PURE__*/React.memo(({
125
124
  if (status !== ReactionStatus.ready) {
126
125
  renderTime.current = Date.now();
127
126
  } else {
128
- const isSSR = process.env.REACT_SSR && fg('platform_fix_analytics_error');
127
+ const isSSR = process.env.REACT_SSR;
129
128
  if (isSampled(SAMPLING_RATE_REACTIONS_RENDERED_EXP) && !isSSR) {
130
129
  var _renderTime$current;
131
130
  createAndFireSafe(createAnalyticsEvent, createReactionsRenderedEvent, (_renderTime$current = renderTime.current) !== null && _renderTime$current !== void 0 ? _renderTime$current : Date.now() //renderTime.current can be null during unit test cases
@@ -24,10 +24,11 @@
24
24
  ._bfhksyzs{background-color:var(--ds-background-disabled,#091e4208)}
25
25
  ._bfhkvuon{background-color:var(--ds-surface,#fff)}
26
26
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
27
+ ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
27
28
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
28
29
  ._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
29
- ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
30
30
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
31
+ ._p12f3xl8{max-width:305px}
31
32
  ._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
32
33
  ._u5f31b66{padding-right:var(--ds-space-050,4px)}
33
34
  ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
@@ -19,8 +19,8 @@ const styles = {
19
19
  opaqueEnabledTrigger: "_1h6dmuej _bfhkvuon _irr3108i _1di61ji5",
20
20
  disabledTrigger: "_1h6d13gt _bfhksyzs",
21
21
  miniMode: "_2rkoglpi _1dqoglyw _1ul91tcg _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66",
22
- fullWidthSummaryViewReactionPickerTrigger: "_1bsb1osq _19bvu2gc _u5f3u2gc _n3tdu2gc",
23
- fullWidth: "_1bsb1osq"
22
+ fullWidthSummaryViewReactionPickerTrigger: "_1bsb1osq _ca0qu2gc _19bvu2gc _u5f3u2gc",
23
+ fullWidth: "_1bsb1osq _p12f3xl8"
24
24
  };
25
25
 
26
26
  /**
@@ -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 = "31.2.0";
7
+ var packageVersion = "31.3.0";
8
8
  /**
9
9
  * TODO: move to utility package?
10
10
  * A random sampling function
@@ -106,7 +106,18 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
106
106
  testId: RENDER_SUMMARY_VIEW_POPUP_TESTID,
107
107
  onMouseEnter: handleSummaryViewTrayMouseEnter,
108
108
  onMouseLeave: handleSummaryViewTrayMouseLeave
109
- }, /*#__PURE__*/React.createElement(Inline, {
109
+ }, allowSelectFromSummaryView && /*#__PURE__*/React.createElement(Flex, {
110
+ justifyContent: "center"
111
+ }, /*#__PURE__*/React.createElement(ReactionSummaryViewEmojiPicker, {
112
+ emojiProvider: emojiProvider,
113
+ disabled: disabled,
114
+ onSelection: handleEmojiSelection,
115
+ emojiPickerSize: emojiPickerSize,
116
+ tooltipContent: tooltipContent,
117
+ reactionPickerTriggerIcon: reactionPickerTriggerIcon,
118
+ reactionPickerTriggerText: reactionPickerTriggerText,
119
+ onOpen: onOpen
120
+ })), /*#__PURE__*/React.createElement(Inline, {
110
121
  xcss: styles.summaryPopup,
111
122
  space: "space.025",
112
123
  shouldWrap: true,
@@ -125,17 +136,6 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
125
136
  handleOpenReactionsDialog: handleOpenReactionsDialog,
126
137
  isViewOnly: isViewOnly
127
138
  });
128
- })), allowSelectFromSummaryView && /*#__PURE__*/React.createElement(Flex, {
129
- justifyContent: "center"
130
- }, /*#__PURE__*/React.createElement(ReactionSummaryViewEmojiPicker, {
131
- emojiProvider: emojiProvider,
132
- disabled: disabled,
133
- onSelection: handleEmojiSelection,
134
- emojiPickerSize: emojiPickerSize,
135
- tooltipContent: tooltipContent,
136
- reactionPickerTriggerIcon: reactionPickerTriggerIcon,
137
- reactionPickerTriggerText: reactionPickerTriggerText,
138
- onOpen: onOpen
139
139
  })));
140
140
  },
141
141
  isOpen: isSummaryPopupOpen,
@@ -7,7 +7,6 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
7
7
  import { FormattedMessage } from 'react-intl-next';
8
8
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
9
9
  import { ModalTransition } from '@atlaskit/modal-dialog';
10
- import { fg } from '@atlaskit/platform-feature-flags';
11
10
  import UFOSegment from '@atlaskit/react-ufo/segment';
12
11
  import { createAndFireSafe, createPickerButtonClickedEvent, createPickerCancelledEvent, createPickerMoreClickedEvent, createReactionsRenderedEvent, createReactionSelectionEvent, isSampled } from '../analytics';
13
12
  import { SAMPLING_RATE_REACTIONS_RENDERED_EXP } from '../shared/constants';
@@ -151,7 +150,7 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
151
150
  if (status !== ReactionStatus.ready) {
152
151
  renderTime.current = Date.now();
153
152
  } else {
154
- var isSSR = process.env.REACT_SSR && fg('platform_fix_analytics_error');
153
+ var isSSR = process.env.REACT_SSR;
155
154
  if (isSampled(SAMPLING_RATE_REACTIONS_RENDERED_EXP) && !isSSR) {
156
155
  var _renderTime$current;
157
156
  createAndFireSafe(createAnalyticsEvent, createReactionsRenderedEvent, (_renderTime$current = renderTime.current) !== null && _renderTime$current !== void 0 ? _renderTime$current : Date.now() //renderTime.current can be null during unit test cases
@@ -24,10 +24,11 @@
24
24
  ._bfhksyzs{background-color:var(--ds-background-disabled,#091e4208)}
25
25
  ._bfhkvuon{background-color:var(--ds-surface,#fff)}
26
26
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
27
+ ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
27
28
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
28
29
  ._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
29
- ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
30
30
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
31
+ ._p12f3xl8{max-width:305px}
31
32
  ._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
32
33
  ._u5f31b66{padding-right:var(--ds-space-050,4px)}
33
34
  ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
@@ -19,8 +19,8 @@ var styles = {
19
19
  opaqueEnabledTrigger: "_1h6dmuej _bfhkvuon _irr3108i _1di61ji5",
20
20
  disabledTrigger: "_1h6d13gt _bfhksyzs",
21
21
  miniMode: "_2rkoglpi _1dqoglyw _1ul91tcg _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66",
22
- fullWidthSummaryViewReactionPickerTrigger: "_1bsb1osq _19bvu2gc _u5f3u2gc _n3tdu2gc",
23
- fullWidth: "_1bsb1osq"
22
+ fullWidthSummaryViewReactionPickerTrigger: "_1bsb1osq _ca0qu2gc _19bvu2gc _u5f3u2gc",
23
+ fullWidth: "_1bsb1osq _p12f3xl8"
24
24
  };
25
25
 
26
26
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/reactions",
3
- "version": "31.2.0",
3
+ "version": "31.3.0",
4
4
  "description": "Reactions component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -121,9 +121,6 @@
121
121
  "platform-component-visual-refresh": {
122
122
  "type": "boolean"
123
123
  },
124
- "platform_fix_analytics_error": {
125
- "type": "boolean"
126
- },
127
124
  "platform-make-accessible-close-button": {
128
125
  "type": "boolean"
129
126
  }