@atlaskit/react-ufo 3.9.0 → 3.9.1

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/ufo-interaction-ignore
2
2
 
3
+ ## 3.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#147978](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/147978)
8
+ [`af8b516786ee8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/af8b516786ee8) -
9
+ FF cleanup ufo-calc-speed-index
10
+
3
11
  ## 3.9.0
4
12
 
5
13
  ### Minor Changes
@@ -107,7 +107,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
107
107
  (0, _defineProperty2.default)(this, "getVCResult", /*#__PURE__*/function () {
108
108
  var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref3) {
109
109
  var _getConfig, _getConfig2;
110
- var start, stop, tti, prefix, ssr, vc, isEventAborted, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, multiHeatmap, isTTVCv1Disabled, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, isVCClean, revisionsData, isCalcSpeedIndexEnabled, speedIndex, isTTVCv3Enabled;
110
+ var start, stop, tti, prefix, ssr, vc, isEventAborted, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, multiHeatmap, isTTVCv1Disabled, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, isVCClean, revisionsData, speedIndex, isTTVCv3Enabled;
111
111
  return _regenerator.default.wrap(function _callee$(_context) {
112
112
  while (1) switch (_context.prev = _context.next) {
113
113
  case 0:
@@ -283,20 +283,19 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
283
283
  VCBox: vcNext.VCBox
284
284
  },
285
285
  isEventAborted: isEventAborted
286
- }); // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
287
- isCalcSpeedIndexEnabled = (0, _platformFeatureFlags.fg)('ufo-calc-speed-index');
286
+ });
288
287
  speedIndex = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "ufo:speedIndex", isTTVCv1Disabled ? vcNext.VCEntries.speedIndex : VCEntries.speedIndex), "ufo:next:speedIndex", vcNext.VCEntries.speedIndex);
289
288
  if (!isTTVCv1Disabled) {
290
- _context.next = 26;
289
+ _context.next = 25;
291
290
  break;
292
291
  }
293
- return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, (0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), isCalcSpeedIndexEnabled ? speedIndex : {}));
294
- case 26:
292
+ return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, (0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
293
+ case 25:
295
294
  isTTVCv3Enabled = (0, _platformFeatureFlags.fg)('platform_ufo_vc_observer_new') || ((_getConfig2 = (0, _config.getConfig)()) === null || _getConfig2 === void 0 || (_getConfig2 = _getConfig2.vc) === null || _getConfig2 === void 0 || (_getConfig2 = _getConfig2.enabledVCRevisions) === null || _getConfig2 === void 0 ? void 0 : _getConfig2.includes('fy25.03'));
296
295
  return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
297
296
  'metrics:vc': VC
298
- }, "".concat(fullPrefix, "vc:state"), true), "".concat(fullPrefix, "vc:clean"), isVCClean), "".concat(fullPrefix, "vc:dom"), VCBox), "".concat(fullPrefix, "vc:updates"), isTTVCv3Enabled ? undefined : VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:total"), totalPainted), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:next"), vcNext.VC), "".concat(fullPrefix, "vc:next:updates"), isTTVCv3Enabled ? undefined : vcNext.VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:next:dom"), vcNext.VCBox), "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), isCalcSpeedIndexEnabled ? speedIndex : {}));
299
- case 28:
297
+ }, "".concat(fullPrefix, "vc:state"), true), "".concat(fullPrefix, "vc:clean"), isVCClean), "".concat(fullPrefix, "vc:dom"), VCBox), "".concat(fullPrefix, "vc:updates"), isTTVCv3Enabled ? undefined : VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:total"), totalPainted), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:next"), vcNext.VC), "".concat(fullPrefix, "vc:next:updates"), isTTVCv3Enabled ? undefined : vcNext.VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:next:dom"), vcNext.VCBox), "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
298
+ case 27:
300
299
  case "end":
301
300
  return _context.stop();
302
301
  }
@@ -680,9 +679,6 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
680
679
  });
681
680
  var VC = VCObserver.makeVCReturnObj();
682
681
  var VCBox = VCObserver.makeVCReturnObj();
683
-
684
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
685
- var isCalcSpeedIndexEnabled = (0, _platformFeatureFlags.fg)('ufo-calc-speed-index');
686
682
  entries.reduce(function () {
687
683
  var acc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
688
684
  var v = arguments.length > 1 ? arguments[1] : undefined;
@@ -719,10 +715,8 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
719
715
  return v.targetName;
720
716
  })));
721
717
  var ratioDelta = (currentlyPaintedRatio - ((_acc$rel$vc = (_acc$rel = acc.rel[i - 1]) === null || _acc$rel === void 0 ? void 0 : _acc$rel.vc) !== null && _acc$rel$vc !== void 0 ? _acc$rel$vc : 0)) / 100;
722
- if (isCalcSpeedIndexEnabled) {
723
- var speedIndex = timestamp * ratioDelta;
724
- acc.speedIndex += speedIndex;
725
- }
718
+ var speedIndex = timestamp * ratioDelta;
719
+ acc.speedIndex += speedIndex;
726
720
  acc.abs.push([timestamp, currentlyPainted]);
727
721
  acc.rel.push({
728
722
  time: timestamp,
@@ -291,8 +291,6 @@ export class VCObserver {
291
291
  },
292
292
  isEventAborted
293
293
  });
294
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
295
- const isCalcSpeedIndexEnabled = fg('ufo-calc-speed-index');
296
294
  const speedIndex = {
297
295
  [`ufo:speedIndex`]: isTTVCv1Disabled ? vcNext.VCEntries.speedIndex : VCEntries.speedIndex,
298
296
  [`ufo:next:speedIndex`]: vcNext.VCEntries.speedIndex
@@ -305,7 +303,7 @@ export class VCObserver {
305
303
  ...outOfBoundary,
306
304
  [`${fullPrefix}vc:ignored`]: this.getIgnoredElements(componentsLog),
307
305
  ...revisionsData,
308
- ...(isCalcSpeedIndexEnabled ? speedIndex : {})
306
+ ...speedIndex
309
307
  };
310
308
  }
311
309
  const isTTVCv3Enabled = fg('platform_ufo_vc_observer_new') || ((_getConfig2 = getConfig()) === null || _getConfig2 === void 0 ? void 0 : (_getConfig2$vc = _getConfig2.vc) === null || _getConfig2$vc === void 0 ? void 0 : (_getConfig2$vc$enable = _getConfig2$vc.enabledVCRevisions) === null || _getConfig2$vc$enable === void 0 ? void 0 : _getConfig2$vc$enable.includes('fy25.03'));
@@ -327,7 +325,7 @@ export class VCObserver {
327
325
  [`${fullPrefix}vc:next:dom`]: vcNext.VCBox,
328
326
  [`${fullPrefix}vc:ignored`]: this.getIgnoredElements(componentsLog),
329
327
  ...revisionsData,
330
- ...(isCalcSpeedIndexEnabled ? speedIndex : {})
328
+ ...speedIndex
331
329
  };
332
330
  });
333
331
  _defineProperty(this, "handleUpdate", (rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue) => {
@@ -580,9 +578,6 @@ export class VCObserver {
580
578
  const entries = Object.entries(lastUpdate).map(a => [parseInt(a[0], 10), a[1]]).sort((a, b) => a[0] > b[0] ? 1 : -1);
581
579
  const VC = VCObserver.makeVCReturnObj();
582
580
  const VCBox = VCObserver.makeVCReturnObj();
583
-
584
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
585
- const isCalcSpeedIndexEnabled = fg('ufo-calc-speed-index');
586
581
  entries.reduce((acc = 0, v) => {
587
582
  const currRatio = v[1] / totalPainted;
588
583
  let VCRatio = currRatio + acc;
@@ -606,10 +601,8 @@ export class VCObserver {
606
601
  const currentlyPaintedRatio = Math.round(currentlyPainted / totalPainted * 1000) / 10;
607
602
  const logEntry = [...new Set((_componentsLog$timest = componentsLog[timestamp]) === null || _componentsLog$timest === void 0 ? void 0 : _componentsLog$timest.filter(v => !v.ignoreReason).map(v => v.targetName))];
608
603
  const ratioDelta = (currentlyPaintedRatio - ((_acc$rel$vc = (_acc$rel = acc.rel[i - 1]) === null || _acc$rel === void 0 ? void 0 : _acc$rel.vc) !== null && _acc$rel$vc !== void 0 ? _acc$rel$vc : 0)) / 100;
609
- if (isCalcSpeedIndexEnabled) {
610
- const speedIndex = timestamp * ratioDelta;
611
- acc.speedIndex += speedIndex;
612
- }
604
+ const speedIndex = timestamp * ratioDelta;
605
+ acc.speedIndex += speedIndex;
613
606
  acc.abs.push([timestamp, currentlyPainted]);
614
607
  acc.rel.push({
615
608
  time: timestamp,
@@ -100,7 +100,7 @@ export var VCObserver = /*#__PURE__*/function () {
100
100
  _defineProperty(this, "getVCResult", /*#__PURE__*/function () {
101
101
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3) {
102
102
  var _getConfig, _getConfig2;
103
- var start, stop, tti, prefix, ssr, vc, isEventAborted, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, multiHeatmap, isTTVCv1Disabled, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, isVCClean, revisionsData, isCalcSpeedIndexEnabled, speedIndex, isTTVCv3Enabled;
103
+ var start, stop, tti, prefix, ssr, vc, isEventAborted, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, multiHeatmap, isTTVCv1Disabled, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, isVCClean, revisionsData, speedIndex, isTTVCv3Enabled;
104
104
  return _regeneratorRuntime.wrap(function _callee$(_context) {
105
105
  while (1) switch (_context.prev = _context.next) {
106
106
  case 0:
@@ -276,20 +276,19 @@ export var VCObserver = /*#__PURE__*/function () {
276
276
  VCBox: vcNext.VCBox
277
277
  },
278
278
  isEventAborted: isEventAborted
279
- }); // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
280
- isCalcSpeedIndexEnabled = fg('ufo-calc-speed-index');
279
+ });
281
280
  speedIndex = _defineProperty(_defineProperty({}, "ufo:speedIndex", isTTVCv1Disabled ? vcNext.VCEntries.speedIndex : VCEntries.speedIndex), "ufo:next:speedIndex", vcNext.VCEntries.speedIndex);
282
281
  if (!isTTVCv1Disabled) {
283
- _context.next = 26;
282
+ _context.next = 25;
284
283
  break;
285
284
  }
286
- return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, _defineProperty({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), isCalcSpeedIndexEnabled ? speedIndex : {}));
287
- case 26:
285
+ return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, _defineProperty({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
286
+ case 25:
288
287
  isTTVCv3Enabled = fg('platform_ufo_vc_observer_new') || ((_getConfig2 = getConfig()) === null || _getConfig2 === void 0 || (_getConfig2 = _getConfig2.vc) === null || _getConfig2 === void 0 || (_getConfig2 = _getConfig2.enabledVCRevisions) === null || _getConfig2 === void 0 ? void 0 : _getConfig2.includes('fy25.03'));
289
288
  return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
290
289
  'metrics:vc': VC
291
- }, "".concat(fullPrefix, "vc:state"), true), "".concat(fullPrefix, "vc:clean"), isVCClean), "".concat(fullPrefix, "vc:dom"), VCBox), "".concat(fullPrefix, "vc:updates"), isTTVCv3Enabled ? undefined : VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:total"), totalPainted), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:next"), vcNext.VC), "".concat(fullPrefix, "vc:next:updates"), isTTVCv3Enabled ? undefined : vcNext.VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:next:dom"), vcNext.VCBox), "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), isCalcSpeedIndexEnabled ? speedIndex : {}));
292
- case 28:
290
+ }, "".concat(fullPrefix, "vc:state"), true), "".concat(fullPrefix, "vc:clean"), isVCClean), "".concat(fullPrefix, "vc:dom"), VCBox), "".concat(fullPrefix, "vc:updates"), isTTVCv3Enabled ? undefined : VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:total"), totalPainted), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:next"), vcNext.VC), "".concat(fullPrefix, "vc:next:updates"), isTTVCv3Enabled ? undefined : vcNext.VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:next:dom"), vcNext.VCBox), "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
291
+ case 27:
293
292
  case "end":
294
293
  return _context.stop();
295
294
  }
@@ -673,9 +672,6 @@ export var VCObserver = /*#__PURE__*/function () {
673
672
  });
674
673
  var VC = VCObserver.makeVCReturnObj();
675
674
  var VCBox = VCObserver.makeVCReturnObj();
676
-
677
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
678
- var isCalcSpeedIndexEnabled = fg('ufo-calc-speed-index');
679
675
  entries.reduce(function () {
680
676
  var acc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
681
677
  var v = arguments.length > 1 ? arguments[1] : undefined;
@@ -712,10 +708,8 @@ export var VCObserver = /*#__PURE__*/function () {
712
708
  return v.targetName;
713
709
  })));
714
710
  var ratioDelta = (currentlyPaintedRatio - ((_acc$rel$vc = (_acc$rel = acc.rel[i - 1]) === null || _acc$rel === void 0 ? void 0 : _acc$rel.vc) !== null && _acc$rel$vc !== void 0 ? _acc$rel$vc : 0)) / 100;
715
- if (isCalcSpeedIndexEnabled) {
716
- var speedIndex = timestamp * ratioDelta;
717
- acc.speedIndex += speedIndex;
718
- }
711
+ var speedIndex = timestamp * ratioDelta;
712
+ acc.speedIndex += speedIndex;
719
713
  acc.abs.push([timestamp, currentlyPainted]);
720
714
  acc.rel.push({
721
715
  time: timestamp,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "3.9.0",
3
+ "version": "3.9.1",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -133,9 +133,6 @@
133
133
  "ufo_capture_stylesheet_metrics": {
134
134
  "type": "boolean"
135
135
  },
136
- "ufo-calc-speed-index": {
137
- "type": "boolean"
138
- },
139
136
  "ufo_return_relative_request_start": {
140
137
  "type": "boolean"
141
138
  },