@atlaskit/reactions 36.7.20 → 36.7.21

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
+ ## 36.7.21
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f9f707e99929b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f9f707e99929b) -
8
+ Cleanup `experiment` `exp-comment-reaction-fail-fix`. A failed add/remove reaction now always
9
+ reverts the optimistic update and invokes the supplied `onFailure` callback.
10
+
3
11
  ## 36.7.20
4
12
 
5
13
  ### Patch Changes
@@ -11,7 +11,7 @@ var _createAndFireEvents = _interopRequireDefault(require("@atlaskit/analytics-n
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; } // eslint-disable-next-line @typescript-eslint/consistent-type-imports
13
13
  var packageName = "@atlaskit/reactions";
14
- var packageVersion = "36.7.19";
14
+ var packageVersion = "36.7.20";
15
15
  /**
16
16
  * TODO: move to utility package?
17
17
  * A random sampling function
@@ -8,7 +8,6 @@ exports.ufoExperiences = exports.MemoryReactionsStore = void 0;
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
- var _expVal = require("@atlaskit/platform-feature-experiments/exp-val");
12
11
  var _analytics = require("../analytics");
13
12
  var _constants = require("../shared/constants");
14
13
  var _types = require("../types");
@@ -170,7 +169,7 @@ var MemoryReactionsStore = exports.MemoryReactionsStore = /*#__PURE__*/function
170
169
  }
171
170
  });
172
171
  }
173
- if (onFailure && (0, _expVal.expVal)('exp-comment-reaction-fail-fix', 'isEnabled', false)) {
172
+ if (onFailure) {
174
173
  // revert the optimistic update since the request failed
175
174
  _this.optmisticUpdate(containerAri, ari, emojiId)(_utils.removeOne);
176
175
  onFailure(_reaction.ReactionUpdateType.added, ari, emojiId, error);
@@ -208,7 +207,7 @@ var MemoryReactionsStore = exports.MemoryReactionsStore = /*#__PURE__*/function
208
207
  reason: 'deleteReaction fetch failed'
209
208
  }
210
209
  });
211
- if (onFailure && (0, _expVal.expVal)('exp-comment-reaction-fail-fix', 'isEnabled', false)) {
210
+ if (onFailure) {
212
211
  // revert the optimistic update since the request failed
213
212
  _this.optmisticUpdate(containerAri, ari, emojiId)(_utils.addOne);
214
213
  onFailure(_reaction.ReactionUpdateType.removed, ari, emojiId, error);
@@ -2,7 +2,7 @@ import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-t
2
2
  // eslint-disable-next-line @typescript-eslint/consistent-type-imports
3
3
  import createAndFireEvent from '@atlaskit/analytics-next/createAndFireEvents';
4
4
  const packageName = "@atlaskit/reactions";
5
- const packageVersion = "36.7.19";
5
+ const packageVersion = "36.7.20";
6
6
  /**
7
7
  * TODO: move to utility package?
8
8
  * A random sampling function
@@ -1,5 +1,4 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
3
2
  import { createAndFireSafe, createRestFailedEvent, createRestSucceededEvent, extractErrorInfo } from '../analytics';
4
3
  import { SAMPLING_RATE_REACTIONS_RENDERED_EXP } from '../shared/constants';
5
4
  import { ReactionStatus } from '../types';
@@ -160,7 +159,7 @@ export class MemoryReactionsStore {
160
159
  }
161
160
  });
162
161
  }
163
- if (onFailure && expVal('exp-comment-reaction-fail-fix', 'isEnabled', false)) {
162
+ if (onFailure) {
164
163
  // revert the optimistic update since the request failed
165
164
  this.optmisticUpdate(containerAri, ari, emojiId)(removeOne);
166
165
  onFailure(ReactionUpdateType.added, ari, emojiId, error);
@@ -200,7 +199,7 @@ export class MemoryReactionsStore {
200
199
  reason: 'deleteReaction fetch failed'
201
200
  }
202
201
  });
203
- if (onFailure && expVal('exp-comment-reaction-fail-fix', 'isEnabled', false)) {
202
+ if (onFailure) {
204
203
  // revert the optimistic update since the request failed
205
204
  this.optmisticUpdate(containerAri, ari, emojiId)(addOne);
206
205
  onFailure(ReactionUpdateType.removed, ari, emojiId, error);
@@ -5,7 +5,7 @@ import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-t
5
5
  // eslint-disable-next-line @typescript-eslint/consistent-type-imports
6
6
  import createAndFireEvent from '@atlaskit/analytics-next/createAndFireEvents';
7
7
  var packageName = "@atlaskit/reactions";
8
- var packageVersion = "36.7.19";
8
+ var packageVersion = "36.7.20";
9
9
  /**
10
10
  * TODO: move to utility package?
11
11
  * A random sampling function
@@ -3,7 +3,6 @@ import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  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; }
5
5
  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) { _defineProperty(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; }
6
- import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
7
6
  import { createAndFireSafe, createRestFailedEvent, createRestSucceededEvent, extractErrorInfo } from '../analytics';
8
7
  import { SAMPLING_RATE_REACTIONS_RENDERED_EXP } from '../shared/constants';
9
8
  import { ReactionStatus } from '../types';
@@ -165,7 +164,7 @@ export var MemoryReactionsStore = /*#__PURE__*/function () {
165
164
  }
166
165
  });
167
166
  }
168
- if (onFailure && expVal('exp-comment-reaction-fail-fix', 'isEnabled', false)) {
167
+ if (onFailure) {
169
168
  // revert the optimistic update since the request failed
170
169
  _this.optmisticUpdate(containerAri, ari, emojiId)(removeOne);
171
170
  onFailure(ReactionUpdateType.added, ari, emojiId, error);
@@ -203,7 +202,7 @@ export var MemoryReactionsStore = /*#__PURE__*/function () {
203
202
  reason: 'deleteReaction fetch failed'
204
203
  }
205
204
  });
206
- if (onFailure && expVal('exp-comment-reaction-fail-fix', 'isEnabled', false)) {
205
+ if (onFailure) {
207
206
  // revert the optimistic update since the request failed
208
207
  _this.optmisticUpdate(containerAri, ari, emojiId)(addOne);
209
208
  onFailure(ReactionUpdateType.removed, ari, emojiId, error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/reactions",
3
- "version": "36.7.20",
3
+ "version": "36.7.21",
4
4
  "description": "Reactions component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -52,7 +52,7 @@
52
52
  "@atlaskit/popper": "^9.4.0",
53
53
  "@atlaskit/popup": "^9.0.0",
54
54
  "@atlaskit/portal": "^7.0.0",
55
- "@atlaskit/primitives": "^22.5.0",
55
+ "@atlaskit/primitives": "^22.6.0",
56
56
  "@atlaskit/react-compiler-gating": "^0.2.0",
57
57
  "@atlaskit/react-ufo": "^8.1.0",
58
58
  "@atlaskit/spinner": "^20.4.0",