@atlaskit/react-ufo 4.7.5 → 4.7.6

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,12 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 4.7.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`71df791f80bf5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/71df791f80bf5) -
8
+ Remove TTVC debug data for post-interaction-log events
9
+
3
10
  ## 4.7.5
4
11
 
5
12
  ### Patch Changes
@@ -112,8 +112,8 @@ var AbstractVCCalculatorBase = exports.default = /*#__PURE__*/function () {
112
112
  key: "calculateWithDebugInfo",
113
113
  value: function () {
114
114
  var _calculateWithDebugInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(filteredEntries, startTime, stopTime, isPostInteraction, isVCClean, interactionId, dirtyReason, allEntries, include3p) {
115
- var _window, _window2, _window3, _window5;
116
- var percentiles, viewportEntries, vcLogs, vcDetails, percentileIndex, entryDataBuffer, _iterator4, _step4, _entry3, time, viewportPercentage, entries, elementNames, previousResult, i, percentile, enhancedVcLogs, shouldCalculate3p, shouldCalculateDebugDetails, sortedVcLogs, maxViewportPercentageAtTime, maxSoFar, _iterator5, _step5, log, getBiggestPreviousViewportPercentage, ignoredEntriesByTime, _iterator6, _step6, _entry4, _ignoredEntriesByTime, _viewportData$rect, _viewportData$previou, viewportData, timestamp, additionalVcLogs, _iterator7, _step7, _step7$value, _timestamp, ignoredEntries, _viewportPercentage, v3RevisionDebugDetails, _activeInteractionId$, activeInteractionId, activeInteraction, pageVisibilityUpToTTAI, isBackgrounded, _window4, _window4$__ufo_devtoo, _window6, _window6$__on_ufo_vc_;
115
+ var _window, _window2, _window6, _window8;
116
+ var percentiles, viewportEntries, vcLogs, vcDetails, percentileIndex, entryDataBuffer, _iterator4, _step4, _entry3, time, viewportPercentage, entries, elementNames, previousResult, i, percentile, enhancedVcLogs, shouldCalculate3p, shouldCalculateDebugDetails, _window3, _window4, _window5, sortedVcLogs, maxViewportPercentageAtTime, maxSoFar, _iterator5, _step5, log, getBiggestPreviousViewportPercentage, ignoredEntriesByTime, _iterator6, _step6, _entry4, _ignoredEntriesByTime, _viewportData$rect, _viewportData$previou, viewportData, timestamp, additionalVcLogs, _iterator7, _step7, _step7$value, _timestamp, ignoredEntries, _viewportPercentage, v3RevisionDebugDetails, _activeInteractionId$, activeInteractionId, activeInteraction, pageVisibilityUpToTTAI, isBackgrounded, _window7, _window7$__ufo_devtoo, _window9, _window9$__on_ufo_vc_;
117
117
  return _regenerator.default.wrap(function _callee$(_context) {
118
118
  while (1) switch (_context.prev = _context.next) {
119
119
  case 0:
@@ -217,6 +217,9 @@ var AbstractVCCalculatorBase = exports.default = /*#__PURE__*/function () {
217
217
  }) : []; // If 3p metric enabled - calculate the debug details
218
218
  shouldCalculate3p = include3p && (0, _platformFeatureFlags.fg)('platform_ufo_enable_ttai_with_3p'); // Only calculate enhanced debug details if devtool callbacks exist
219
219
  shouldCalculateDebugDetails = (!isPostInteraction || shouldCalculate3p) && (typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.__on_ufo_vc_debug_data_ready) === 'function');
220
+ if ((0, _platformFeatureFlags.fg)('platform_ufo_fix_post_interaction_check_vc_debug')) {
221
+ shouldCalculateDebugDetails = !isPostInteraction && (typeof ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window4 = window) === null || _window4 === void 0 ? void 0 : _window4.__on_ufo_vc_debug_data_ready) === 'function' || typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__ufo_devtool_vc_3p_debug_data) === 'function');
222
+ }
220
223
  if (shouldCalculateDebugDetails && allEntries && vcLogs) {
221
224
  // Pre-sort vcLogs by time for efficient lookups
222
225
  sortedVcLogs = (0, _toConsumableArray2.default)(vcLogs).sort(function (a, b) {
@@ -335,18 +338,18 @@ var AbstractVCCalculatorBase = exports.default = /*#__PURE__*/function () {
335
338
  }
336
339
 
337
340
  // Handle devtool callback
338
- if (v3RevisionDebugDetails && typeof ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.__ufo_devtool_onVCRevisionReady__) === 'function' && !include3p) {
341
+ if (v3RevisionDebugDetails && typeof ((_window6 = window) === null || _window6 === void 0 ? void 0 : _window6.__ufo_devtool_onVCRevisionReady__) === 'function' && !include3p) {
339
342
  try {
340
- (_window4 = window) === null || _window4 === void 0 || (_window4$__ufo_devtoo = _window4.__ufo_devtool_onVCRevisionReady__) === null || _window4$__ufo_devtoo === void 0 || _window4$__ufo_devtoo.call(_window4, v3RevisionDebugDetails);
343
+ (_window7 = window) === null || _window7 === void 0 || (_window7$__ufo_devtoo = _window7.__ufo_devtool_onVCRevisionReady__) === null || _window7$__ufo_devtoo === void 0 || _window7$__ufo_devtoo.call(_window7, v3RevisionDebugDetails);
341
344
  } catch (e) {
342
345
  // if any error communicating with devtool, we don't want to break the app
343
346
  // eslint-disable-next-line no-console
344
347
  console.error('Error in onVCRevisionReady', e);
345
348
  }
346
349
  }
347
- if (v3RevisionDebugDetails && typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__on_ufo_vc_debug_data_ready) === 'function' && !include3p) {
350
+ if (v3RevisionDebugDetails && typeof ((_window8 = window) === null || _window8 === void 0 ? void 0 : _window8.__on_ufo_vc_debug_data_ready) === 'function' && !include3p) {
348
351
  try {
349
- (_window6 = window) === null || _window6 === void 0 || (_window6$__on_ufo_vc_ = _window6.__on_ufo_vc_debug_data_ready) === null || _window6$__on_ufo_vc_ === void 0 || _window6$__on_ufo_vc_.call(_window6, v3RevisionDebugDetails);
352
+ (_window9 = window) === null || _window9 === void 0 || (_window9$__on_ufo_vc_ = _window9.__on_ufo_vc_debug_data_ready) === null || _window9$__on_ufo_vc_ === void 0 || _window9$__on_ufo_vc_.call(_window9, v3RevisionDebugDetails);
350
353
  } catch (e) {
351
354
  // eslint-disable-next-line no-console
352
355
  console.error('Error in onVCRevisionReady', e);
@@ -362,7 +365,7 @@ var AbstractVCCalculatorBase = exports.default = /*#__PURE__*/function () {
362
365
  }
363
366
  }
364
367
  return _context.abrupt("return", vcDetails);
365
- case 40:
368
+ case 41:
366
369
  case "end":
367
370
  return _context.stop();
368
371
  }
@@ -56,7 +56,7 @@ export default class AbstractVCCalculatorBase {
56
56
  return labelStacks;
57
57
  }
58
58
  async calculateWithDebugInfo(filteredEntries, startTime, stopTime, isPostInteraction, isVCClean, interactionId, dirtyReason, allEntries, include3p) {
59
- var _window, _window2, _window3, _window5;
59
+ var _window, _window2, _window6, _window8;
60
60
  const percentiles = [25, 50, 75, 80, 85, 90, 95, 98, 99, 100];
61
61
  const viewportEntries = this.filterViewportEntries(filteredEntries);
62
62
  const vcLogs = await calculateTTVCPercentilesWithDebugInfo({
@@ -135,7 +135,11 @@ export default class AbstractVCCalculatorBase {
135
135
  // If 3p metric enabled - calculate the debug details
136
136
  const shouldCalculate3p = include3p && fg('platform_ufo_enable_ttai_with_3p');
137
137
  // Only calculate enhanced debug details if devtool callbacks exist
138
- const shouldCalculateDebugDetails = (!isPostInteraction || shouldCalculate3p) && (typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.__on_ufo_vc_debug_data_ready) === 'function');
138
+ let shouldCalculateDebugDetails = (!isPostInteraction || shouldCalculate3p) && (typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.__on_ufo_vc_debug_data_ready) === 'function');
139
+ if (fg('platform_ufo_fix_post_interaction_check_vc_debug')) {
140
+ var _window3, _window4, _window5;
141
+ shouldCalculateDebugDetails = !isPostInteraction && (typeof ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window4 = window) === null || _window4 === void 0 ? void 0 : _window4.__on_ufo_vc_debug_data_ready) === 'function' || typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__ufo_devtool_vc_3p_debug_data) === 'function');
142
+ }
139
143
  if (shouldCalculateDebugDetails && allEntries && vcLogs) {
140
144
  // Pre-sort vcLogs by time for efficient lookups
141
145
  const sortedVcLogs = [...vcLogs].sort((a, b) => a.time - b.time);
@@ -233,20 +237,20 @@ export default class AbstractVCCalculatorBase {
233
237
  }
234
238
 
235
239
  // Handle devtool callback
236
- if (v3RevisionDebugDetails && typeof ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.__ufo_devtool_onVCRevisionReady__) === 'function' && !include3p) {
240
+ if (v3RevisionDebugDetails && typeof ((_window6 = window) === null || _window6 === void 0 ? void 0 : _window6.__ufo_devtool_onVCRevisionReady__) === 'function' && !include3p) {
237
241
  try {
238
- var _window4, _window4$__ufo_devtoo;
239
- (_window4 = window) === null || _window4 === void 0 ? void 0 : (_window4$__ufo_devtoo = _window4.__ufo_devtool_onVCRevisionReady__) === null || _window4$__ufo_devtoo === void 0 ? void 0 : _window4$__ufo_devtoo.call(_window4, v3RevisionDebugDetails);
242
+ var _window7, _window7$__ufo_devtoo;
243
+ (_window7 = window) === null || _window7 === void 0 ? void 0 : (_window7$__ufo_devtoo = _window7.__ufo_devtool_onVCRevisionReady__) === null || _window7$__ufo_devtoo === void 0 ? void 0 : _window7$__ufo_devtoo.call(_window7, v3RevisionDebugDetails);
240
244
  } catch (e) {
241
245
  // if any error communicating with devtool, we don't want to break the app
242
246
  // eslint-disable-next-line no-console
243
247
  console.error('Error in onVCRevisionReady', e);
244
248
  }
245
249
  }
246
- if (v3RevisionDebugDetails && typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__on_ufo_vc_debug_data_ready) === 'function' && !include3p) {
250
+ if (v3RevisionDebugDetails && typeof ((_window8 = window) === null || _window8 === void 0 ? void 0 : _window8.__on_ufo_vc_debug_data_ready) === 'function' && !include3p) {
247
251
  try {
248
- var _window6, _window6$__on_ufo_vc_;
249
- (_window6 = window) === null || _window6 === void 0 ? void 0 : (_window6$__on_ufo_vc_ = _window6.__on_ufo_vc_debug_data_ready) === null || _window6$__on_ufo_vc_ === void 0 ? void 0 : _window6$__on_ufo_vc_.call(_window6, v3RevisionDebugDetails);
252
+ var _window9, _window9$__on_ufo_vc_;
253
+ (_window9 = window) === null || _window9 === void 0 ? void 0 : (_window9$__on_ufo_vc_ = _window9.__on_ufo_vc_debug_data_ready) === null || _window9$__on_ufo_vc_ === void 0 ? void 0 : _window9$__on_ufo_vc_.call(_window9, v3RevisionDebugDetails);
250
254
  } catch (e) {
251
255
  // eslint-disable-next-line no-console
252
256
  console.error('Error in onVCRevisionReady', e);
@@ -106,8 +106,8 @@ var AbstractVCCalculatorBase = /*#__PURE__*/function () {
106
106
  key: "calculateWithDebugInfo",
107
107
  value: function () {
108
108
  var _calculateWithDebugInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(filteredEntries, startTime, stopTime, isPostInteraction, isVCClean, interactionId, dirtyReason, allEntries, include3p) {
109
- var _window, _window2, _window3, _window5;
110
- var percentiles, viewportEntries, vcLogs, vcDetails, percentileIndex, entryDataBuffer, _iterator4, _step4, _entry3, time, viewportPercentage, entries, elementNames, previousResult, i, percentile, enhancedVcLogs, shouldCalculate3p, shouldCalculateDebugDetails, sortedVcLogs, maxViewportPercentageAtTime, maxSoFar, _iterator5, _step5, log, getBiggestPreviousViewportPercentage, ignoredEntriesByTime, _iterator6, _step6, _entry4, _ignoredEntriesByTime, _viewportData$rect, _viewportData$previou, viewportData, timestamp, additionalVcLogs, _iterator7, _step7, _step7$value, _timestamp, ignoredEntries, _viewportPercentage, v3RevisionDebugDetails, _activeInteractionId$, activeInteractionId, activeInteraction, pageVisibilityUpToTTAI, isBackgrounded, _window4, _window4$__ufo_devtoo, _window6, _window6$__on_ufo_vc_;
109
+ var _window, _window2, _window6, _window8;
110
+ var percentiles, viewportEntries, vcLogs, vcDetails, percentileIndex, entryDataBuffer, _iterator4, _step4, _entry3, time, viewportPercentage, entries, elementNames, previousResult, i, percentile, enhancedVcLogs, shouldCalculate3p, shouldCalculateDebugDetails, _window3, _window4, _window5, sortedVcLogs, maxViewportPercentageAtTime, maxSoFar, _iterator5, _step5, log, getBiggestPreviousViewportPercentage, ignoredEntriesByTime, _iterator6, _step6, _entry4, _ignoredEntriesByTime, _viewportData$rect, _viewportData$previou, viewportData, timestamp, additionalVcLogs, _iterator7, _step7, _step7$value, _timestamp, ignoredEntries, _viewportPercentage, v3RevisionDebugDetails, _activeInteractionId$, activeInteractionId, activeInteraction, pageVisibilityUpToTTAI, isBackgrounded, _window7, _window7$__ufo_devtoo, _window9, _window9$__on_ufo_vc_;
111
111
  return _regeneratorRuntime.wrap(function _callee$(_context) {
112
112
  while (1) switch (_context.prev = _context.next) {
113
113
  case 0:
@@ -211,6 +211,9 @@ var AbstractVCCalculatorBase = /*#__PURE__*/function () {
211
211
  }) : []; // If 3p metric enabled - calculate the debug details
212
212
  shouldCalculate3p = include3p && fg('platform_ufo_enable_ttai_with_3p'); // Only calculate enhanced debug details if devtool callbacks exist
213
213
  shouldCalculateDebugDetails = (!isPostInteraction || shouldCalculate3p) && (typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.__on_ufo_vc_debug_data_ready) === 'function');
214
+ if (fg('platform_ufo_fix_post_interaction_check_vc_debug')) {
215
+ shouldCalculateDebugDetails = !isPostInteraction && (typeof ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window4 = window) === null || _window4 === void 0 ? void 0 : _window4.__on_ufo_vc_debug_data_ready) === 'function' || typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__ufo_devtool_vc_3p_debug_data) === 'function');
216
+ }
214
217
  if (shouldCalculateDebugDetails && allEntries && vcLogs) {
215
218
  // Pre-sort vcLogs by time for efficient lookups
216
219
  sortedVcLogs = _toConsumableArray(vcLogs).sort(function (a, b) {
@@ -329,18 +332,18 @@ var AbstractVCCalculatorBase = /*#__PURE__*/function () {
329
332
  }
330
333
 
331
334
  // Handle devtool callback
332
- if (v3RevisionDebugDetails && typeof ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.__ufo_devtool_onVCRevisionReady__) === 'function' && !include3p) {
335
+ if (v3RevisionDebugDetails && typeof ((_window6 = window) === null || _window6 === void 0 ? void 0 : _window6.__ufo_devtool_onVCRevisionReady__) === 'function' && !include3p) {
333
336
  try {
334
- (_window4 = window) === null || _window4 === void 0 || (_window4$__ufo_devtoo = _window4.__ufo_devtool_onVCRevisionReady__) === null || _window4$__ufo_devtoo === void 0 || _window4$__ufo_devtoo.call(_window4, v3RevisionDebugDetails);
337
+ (_window7 = window) === null || _window7 === void 0 || (_window7$__ufo_devtoo = _window7.__ufo_devtool_onVCRevisionReady__) === null || _window7$__ufo_devtoo === void 0 || _window7$__ufo_devtoo.call(_window7, v3RevisionDebugDetails);
335
338
  } catch (e) {
336
339
  // if any error communicating with devtool, we don't want to break the app
337
340
  // eslint-disable-next-line no-console
338
341
  console.error('Error in onVCRevisionReady', e);
339
342
  }
340
343
  }
341
- if (v3RevisionDebugDetails && typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__on_ufo_vc_debug_data_ready) === 'function' && !include3p) {
344
+ if (v3RevisionDebugDetails && typeof ((_window8 = window) === null || _window8 === void 0 ? void 0 : _window8.__on_ufo_vc_debug_data_ready) === 'function' && !include3p) {
342
345
  try {
343
- (_window6 = window) === null || _window6 === void 0 || (_window6$__on_ufo_vc_ = _window6.__on_ufo_vc_debug_data_ready) === null || _window6$__on_ufo_vc_ === void 0 || _window6$__on_ufo_vc_.call(_window6, v3RevisionDebugDetails);
346
+ (_window9 = window) === null || _window9 === void 0 || (_window9$__on_ufo_vc_ = _window9.__on_ufo_vc_debug_data_ready) === null || _window9$__on_ufo_vc_ === void 0 || _window9$__on_ufo_vc_.call(_window9, v3RevisionDebugDetails);
344
347
  } catch (e) {
345
348
  // eslint-disable-next-line no-console
346
349
  console.error('Error in onVCRevisionReady', e);
@@ -356,7 +359,7 @@ var AbstractVCCalculatorBase = /*#__PURE__*/function () {
356
359
  }
357
360
  }
358
361
  return _context.abrupt("return", vcDetails);
359
- case 40:
362
+ case 41:
360
363
  case "end":
361
364
  return _context.stop();
362
365
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "4.7.5",
3
+ "version": "4.7.6",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -108,6 +108,9 @@
108
108
  "platform_ufo_enable_timeout_config": {
109
109
  "type": "boolean"
110
110
  },
111
+ "platform_ufo_fix_post_interaction_check_vc_debug": {
112
+ "type": "boolean"
113
+ },
111
114
  "platform_ufo_critical_metrics_payload": {
112
115
  "type": "boolean"
113
116
  },