@atlaskit/react-ufo 3.4.6 → 3.4.7

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.4.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#132798](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/132798)
8
+ [`b337a06491cd8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b337a06491cd8) -
9
+ fix page visibility check on VC observer
10
+
3
11
  ## 3.4.6
4
12
 
5
13
  ### Patch Changes
@@ -104,7 +104,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
104
104
  });
105
105
  (0, _defineProperty2.default)(this, "getVCResult", /*#__PURE__*/function () {
106
106
  var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref3) {
107
- var start, stop, tti, prefix, ssr, vc, isEventAborted, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, multiHeatmap, _VCObserver$calculate, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, isVCClean, isMultiHeatmapEnabled, pageVisibilityUpToTTAI, shouldHaveVCmetric, revisionsData, isCalcSpeedIndexEnabled, speedIndex;
107
+ var start, stop, tti, prefix, ssr, vc, isEventAborted, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, multiHeatmap, _VCObserver$calculate, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, isVCClean, isMultiHeatmapEnabled, pageVisibilityUpToTTAI, isVisiblePageVisibleUpToTTAI, shouldHaveVCmetric, revisionsData, isCalcSpeedIndexEnabled, speedIndex;
108
108
  return _regenerator.default.wrap(function _callee$(_context) {
109
109
  while (1) switch (_context.prev = _context.next) {
110
110
  case 0:
@@ -244,7 +244,8 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
244
244
  isVCClean = !abortReasonInfo;
245
245
  isMultiHeatmapEnabled = !(0, _platformFeatureFlags.fg)('platform_ufo_multiheatmap_killswitch');
246
246
  pageVisibilityUpToTTAI = (0, _hiddenTiming.getPageVisibilityState)(start, stop);
247
- shouldHaveVCmetric = isVCClean && !isEventAborted && pageVisibilityUpToTTAI;
247
+ isVisiblePageVisibleUpToTTAI = pageVisibilityUpToTTAI === 'visible';
248
+ shouldHaveVCmetric = isVCClean && !isEventAborted && isVisiblePageVisibleUpToTTAI;
248
249
  revisionsData = isMultiHeatmapEnabled ? (0, _platformFeatureFlags.fg)('platform_ufo_vc_observer_new') ? (0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:rev"), [{
249
250
  revision: 'fy25.01',
250
251
  clean: isVCClean,
@@ -290,7 +291,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
290
291
  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)({
291
292
  'metrics:vc': VC
292
293
  }, "".concat(fullPrefix, "vc:state"), true), "".concat(fullPrefix, "vc:clean"), isVCClean), "".concat(fullPrefix, "vc:dom"), VCBox), "".concat(fullPrefix, "vc:updates"), 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"), vcNext.VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:next:dom"), vcNext.VCBox), "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), isCalcSpeedIndexEnabled ? speedIndex : {}));
293
- case 27:
294
+ case 28:
294
295
  case "end":
295
296
  return _context.stop();
296
297
  }
@@ -254,7 +254,8 @@ export class VCObserver {
254
254
  const isVCClean = !abortReasonInfo;
255
255
  const isMultiHeatmapEnabled = !fg('platform_ufo_multiheatmap_killswitch');
256
256
  const pageVisibilityUpToTTAI = getPageVisibilityState(start, stop);
257
- const shouldHaveVCmetric = isVCClean && !isEventAborted && pageVisibilityUpToTTAI;
257
+ const isVisiblePageVisibleUpToTTAI = pageVisibilityUpToTTAI === 'visible';
258
+ const shouldHaveVCmetric = isVCClean && !isEventAborted && isVisiblePageVisibleUpToTTAI;
258
259
  const revisionsData = isMultiHeatmapEnabled ? fg('platform_ufo_vc_observer_new') ? {
259
260
  [`${fullPrefix}vc:rev`]: [{
260
261
  revision: 'fy25.01',
@@ -97,7 +97,7 @@ export var VCObserver = /*#__PURE__*/function () {
97
97
  });
98
98
  _defineProperty(this, "getVCResult", /*#__PURE__*/function () {
99
99
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3) {
100
- var start, stop, tti, prefix, ssr, vc, isEventAborted, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, multiHeatmap, _VCObserver$calculate, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, isVCClean, isMultiHeatmapEnabled, pageVisibilityUpToTTAI, shouldHaveVCmetric, revisionsData, isCalcSpeedIndexEnabled, speedIndex;
100
+ var start, stop, tti, prefix, ssr, vc, isEventAborted, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, multiHeatmap, _VCObserver$calculate, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, isVCClean, isMultiHeatmapEnabled, pageVisibilityUpToTTAI, isVisiblePageVisibleUpToTTAI, shouldHaveVCmetric, revisionsData, isCalcSpeedIndexEnabled, speedIndex;
101
101
  return _regeneratorRuntime.wrap(function _callee$(_context) {
102
102
  while (1) switch (_context.prev = _context.next) {
103
103
  case 0:
@@ -237,7 +237,8 @@ export var VCObserver = /*#__PURE__*/function () {
237
237
  isVCClean = !abortReasonInfo;
238
238
  isMultiHeatmapEnabled = !fg('platform_ufo_multiheatmap_killswitch');
239
239
  pageVisibilityUpToTTAI = getPageVisibilityState(start, stop);
240
- shouldHaveVCmetric = isVCClean && !isEventAborted && pageVisibilityUpToTTAI;
240
+ isVisiblePageVisibleUpToTTAI = pageVisibilityUpToTTAI === 'visible';
241
+ shouldHaveVCmetric = isVCClean && !isEventAborted && isVisiblePageVisibleUpToTTAI;
241
242
  revisionsData = isMultiHeatmapEnabled ? fg('platform_ufo_vc_observer_new') ? _defineProperty({}, "".concat(fullPrefix, "vc:rev"), [{
242
243
  revision: 'fy25.01',
243
244
  clean: isVCClean,
@@ -283,7 +284,7 @@ export var VCObserver = /*#__PURE__*/function () {
283
284
  return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
284
285
  'metrics:vc': VC
285
286
  }, "".concat(fullPrefix, "vc:state"), true), "".concat(fullPrefix, "vc:clean"), isVCClean), "".concat(fullPrefix, "vc:dom"), VCBox), "".concat(fullPrefix, "vc:updates"), 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"), vcNext.VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:next:dom"), vcNext.VCBox), "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), isCalcSpeedIndexEnabled ? speedIndex : {}));
286
- case 27:
287
+ case 28:
287
288
  case "end":
288
289
  return _context.stop();
289
290
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "3.4.6",
3
+ "version": "3.4.7",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",