@atlaskit/react-ufo 3.4.6 → 3.4.8

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,21 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 3.4.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#133350](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/133350)
8
+ [`9873ae0c37080`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9873ae0c37080) -
9
+ clean up LCP featrue flags
10
+
11
+ ## 3.4.7
12
+
13
+ ### Patch Changes
14
+
15
+ - [#132798](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/132798)
16
+ [`b337a06491cd8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b337a06491cd8) -
17
+ fix page visibility check on VC observer
18
+
3
19
  ## 3.4.6
4
20
 
5
21
  ### Patch Changes
@@ -209,20 +209,15 @@ var getPaintMetrics = /*#__PURE__*/function () {
209
209
  metrics['metric:fcp'] = Math.round(entry.startTime);
210
210
  }
211
211
  });
212
- if (!(0, _platformFeatureFlags.fg)('ufo_lcp')) {
213
- _context.next = 9;
214
- break;
215
- }
216
- _context.next = 7;
212
+ _context.next = 6;
217
213
  return getLCP(end);
218
- case 7:
214
+ case 6:
219
215
  lcp = _context.sent;
220
216
  if (lcp) {
221
217
  metrics['metric:lcp'] = Math.round(lcp);
222
218
  }
223
- case 9:
224
219
  return _context.abrupt("return", metrics);
225
- case 10:
220
+ case 9:
226
221
  case "end":
227
222
  return _context.stop();
228
223
  }
@@ -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
  }
@@ -173,11 +173,9 @@ const getPaintMetrics = async (type, end) => {
173
173
  metrics['metric:fcp'] = Math.round(entry.startTime);
174
174
  }
175
175
  });
176
- if (fg('ufo_lcp')) {
177
- const lcp = await getLCP(end);
178
- if (lcp) {
179
- metrics['metric:lcp'] = Math.round(lcp);
180
- }
176
+ const lcp = await getLCP(end);
177
+ if (lcp) {
178
+ metrics['metric:lcp'] = Math.round(lcp);
181
179
  }
182
180
  return metrics;
183
181
  };
@@ -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',
@@ -198,20 +198,15 @@ var getPaintMetrics = /*#__PURE__*/function () {
198
198
  metrics['metric:fcp'] = Math.round(entry.startTime);
199
199
  }
200
200
  });
201
- if (!fg('ufo_lcp')) {
202
- _context.next = 9;
203
- break;
204
- }
205
- _context.next = 7;
201
+ _context.next = 6;
206
202
  return getLCP(end);
207
- case 7:
203
+ case 6:
208
204
  lcp = _context.sent;
209
205
  if (lcp) {
210
206
  metrics['metric:lcp'] = Math.round(lcp);
211
207
  }
212
- case 9:
213
208
  return _context.abrupt("return", metrics);
214
- case 10:
209
+ case 9:
215
210
  case "end":
216
211
  return _context.stop();
217
212
  }
@@ -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.8",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -181,9 +181,6 @@
181
181
  "platform_ufo_segment_list_mode": {
182
182
  "type": "boolean"
183
183
  },
184
- "ufo_lcp": {
185
- "type": "boolean"
186
- },
187
184
  "ufo_payload_use_idle_callback": {
188
185
  "type": "boolean"
189
186
  }