@atlaskit/react-ufo 3.10.4 → 3.11.0
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 +8 -0
- package/dist/cjs/config/index.js +51 -5
- package/dist/cjs/create-experimental-interaction-metrics-payload/index.js +2 -1
- package/dist/cjs/create-payload/utils/get-vc-metrics.js +41 -20
- package/dist/cjs/interaction-metrics/index.js +2 -1
- package/dist/cjs/interaction-metrics/post-interaction-log.js +4 -2
- package/dist/cjs/vc/index.js +123 -35
- package/dist/cjs/vc/vc-observer/getVCRevisionsData.js +48 -23
- package/dist/cjs/vc/vc-observer/index.js +17 -6
- package/dist/es2019/config/index.js +49 -6
- package/dist/es2019/create-experimental-interaction-metrics-payload/index.js +2 -1
- package/dist/es2019/create-payload/utils/get-vc-metrics.js +36 -19
- package/dist/es2019/interaction-metrics/index.js +2 -1
- package/dist/es2019/interaction-metrics/post-interaction-log.js +2 -1
- package/dist/es2019/vc/index.js +98 -35
- package/dist/es2019/vc/vc-observer/getVCRevisionsData.js +52 -25
- package/dist/es2019/vc/vc-observer/index.js +18 -6
- package/dist/esm/config/index.js +49 -5
- package/dist/esm/create-experimental-interaction-metrics-payload/index.js +2 -1
- package/dist/esm/create-payload/utils/get-vc-metrics.js +42 -21
- package/dist/esm/interaction-metrics/index.js +2 -1
- package/dist/esm/interaction-metrics/post-interaction-log.js +4 -2
- package/dist/esm/vc/index.js +123 -35
- package/dist/esm/vc/vc-observer/getVCRevisionsData.js +48 -23
- package/dist/esm/vc/vc-observer/index.js +17 -6
- package/dist/types/config/index.d.ts +14 -3
- package/dist/types/create-post-interaction-log-payload/index.d.ts +2 -2
- package/dist/types/vc/types.d.ts +3 -1
- package/dist/types/vc/vc-observer/getVCRevisionsData.d.ts +5 -3
- package/dist/types/vc/vc-observer/index.d.ts +1 -1
- package/dist/types-ts4.5/config/index.d.ts +14 -3
- package/dist/types-ts4.5/create-post-interaction-log-payload/index.d.ts +2 -2
- package/dist/types-ts4.5/vc/types.d.ts +3 -1
- package/dist/types-ts4.5/vc/vc-observer/getVCRevisionsData.d.ts +5 -3
- package/dist/types-ts4.5/vc/vc-observer/index.d.ts +1 -1
- package/package.json +4 -1
|
@@ -15,6 +15,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
17
|
var _config = require("../../config");
|
|
18
|
+
var _interactionMetrics = require("../../interaction-metrics");
|
|
18
19
|
var _attachAbortListeners = require("./attachAbortListeners");
|
|
19
20
|
var _getVCRevisionsData = require("./getVCRevisionsData");
|
|
20
21
|
var _getViewport = require("./getViewport");
|
|
@@ -105,11 +106,11 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
105
106
|
});
|
|
106
107
|
(0, _defineProperty2.default)(this, "getVCResult", /*#__PURE__*/function () {
|
|
107
108
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref3) {
|
|
108
|
-
var start, stop, tti, prefix, ssr, vc, isEventAborted, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, multiHeatmap, isTTVCv1Disabled, vcAbortedResultWithRevisions, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, isVCClean, revisionsData, speedIndex, isTTVCv3Enabled;
|
|
109
|
+
var start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, multiHeatmap, isTTVCv1Disabled, vcAbortedResultWithRevisions, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, isVCClean, revisionsData, speedIndex, isTTVCv3Enabled;
|
|
109
110
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
110
111
|
while (1) switch (_context.prev = _context.next) {
|
|
111
112
|
case 0:
|
|
112
|
-
start = _ref3.start, stop = _ref3.stop, tti = _ref3.tti, prefix = _ref3.prefix, ssr = _ref3.ssr, vc = _ref3.vc, isEventAborted = _ref3.isEventAborted;
|
|
113
|
+
start = _ref3.start, stop = _ref3.stop, tti = _ref3.tti, prefix = _ref3.prefix, ssr = _ref3.ssr, vc = _ref3.vc, isEventAborted = _ref3.isEventAborted, experienceKey = _ref3.experienceKey;
|
|
113
114
|
startTime = performance.now(); // add local measurement
|
|
114
115
|
fullPrefix = prefix !== undefined && prefix !== '' ? "".concat(prefix, ":") : '';
|
|
115
116
|
rawData = vc !== undefined ? vc : _this.getVCRawData();
|
|
@@ -120,7 +121,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
120
121
|
return _context.abrupt("return", {});
|
|
121
122
|
case 6:
|
|
122
123
|
abortReason = rawData.abortReason, abortReasonInfo = rawData.abortReasonInfo, heatmap = rawData.heatmap, heatmapNext = rawData.heatmapNext, outOfBoundaryInfo = rawData.outOfBoundaryInfo, totalTime = rawData.totalTime, componentsLog = rawData.componentsLog, viewport = rawData.viewport, devToolsEnabled = rawData.devToolsEnabled, ratios = rawData.ratios, multiHeatmap = rawData.multiHeatmap;
|
|
123
|
-
isTTVCv1Disabled = !(0, _config.isVCRevisionEnabled)('fy25.01'); // NOTE: as part of platform_ufo_add_vc_abort_reason_by_revisions feature,
|
|
124
|
+
isTTVCv1Disabled = (0, _platformFeatureFlags.fg)('platform_ufo_vc_enable_revisions_by_experience') ? !(0, _config.isVCRevisionEnabled)('fy25.01', experienceKey) : !(0, _config.isVCRevisionEnabled)('fy25.01'); // NOTE: as part of platform_ufo_add_vc_abort_reason_by_revisions feature,
|
|
124
125
|
// we want to report abort by scroll events the same way as other abort reasons
|
|
125
126
|
// i.e. not have the concept of `abortReason.blocking` anymore
|
|
126
127
|
if (!(abortReasonInfo !== null && (0, _platformFeatureFlags.fg)('platform_ufo_add_vc_abort_reason_by_revisions'))) {
|
|
@@ -308,7 +309,8 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
308
309
|
VC: vcNext.VC,
|
|
309
310
|
VCBox: vcNext.VCBox
|
|
310
311
|
},
|
|
311
|
-
isEventAborted: isEventAborted
|
|
312
|
+
isEventAborted: isEventAborted,
|
|
313
|
+
experienceKey: experienceKey
|
|
312
314
|
});
|
|
313
315
|
speedIndex = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "ufo:speedIndex", isTTVCv1Disabled ? vcNext.VCEntries.speedIndex : VCEntries.speedIndex), "ufo:next:speedIndex", vcNext.VCEntries.speedIndex);
|
|
314
316
|
if (!isTTVCv1Disabled) {
|
|
@@ -317,7 +319,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
317
319
|
}
|
|
318
320
|
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));
|
|
319
321
|
case 32:
|
|
320
|
-
isTTVCv3Enabled = (0, _config.isVCRevisionEnabled)('fy25.03');
|
|
322
|
+
isTTVCv3Enabled = (0, _platformFeatureFlags.fg)('platform_ufo_vc_enable_revisions_by_experience') ? (0, _config.isVCRevisionEnabled)('fy25.03', experienceKey) : (0, _config.isVCRevisionEnabled)('fy25.03');
|
|
321
323
|
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)({
|
|
322
324
|
'metrics:vc': VC
|
|
323
325
|
}, "".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));
|
|
@@ -334,7 +336,12 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
334
336
|
(0, _defineProperty2.default)(this, "handleUpdate", function (rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue) {
|
|
335
337
|
_this.measureStart();
|
|
336
338
|
_this.legacyHandleUpdate(rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue);
|
|
337
|
-
|
|
339
|
+
var isTTVCv3Disabled = !(0, _config.isVCRevisionEnabled)('fy25.03');
|
|
340
|
+
if ((0, _platformFeatureFlags.fg)('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
341
|
+
var interaction = (0, _interactionMetrics.getActiveInteraction)();
|
|
342
|
+
isTTVCv3Disabled = !(0, _config.isVCRevisionEnabled)('fy25.03', interaction === null || interaction === void 0 ? void 0 : interaction.ufoName);
|
|
343
|
+
}
|
|
344
|
+
if (isTTVCv3Disabled) {
|
|
338
345
|
_this.onViewportChangeDetected({
|
|
339
346
|
timestamp: rawTime,
|
|
340
347
|
intersectionRect: intersectionRect,
|
|
@@ -358,6 +365,10 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
358
365
|
_this.applyChangesToHeatMap(mappedValues, time, _this.heatmapNext);
|
|
359
366
|
}
|
|
360
367
|
var isTTVCv1Disabled = !(0, _config.isVCRevisionEnabled)('fy25.01');
|
|
368
|
+
if ((0, _platformFeatureFlags.fg)('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
369
|
+
var interaction = (0, _interactionMetrics.getActiveInteraction)();
|
|
370
|
+
isTTVCv1Disabled = !(0, _config.isVCRevisionEnabled)('fy25.01', interaction === null || interaction === void 0 ? void 0 : interaction.ufoName);
|
|
371
|
+
}
|
|
361
372
|
if (!isTTVCv1Disabled && (!ignoreReason || ignoreReason === 'not-visible') && type !== 'attr') {
|
|
362
373
|
_this.applyChangesToHeatMap(mappedValues, time, _this.heatmap);
|
|
363
374
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
2
|
let config;
|
|
2
3
|
const DEFAULT_TTVC_REVISION = 'fy25.02';
|
|
3
4
|
|
|
@@ -5,28 +6,70 @@ const DEFAULT_TTVC_REVISION = 'fy25.02';
|
|
|
5
6
|
// and they could delete empty members
|
|
6
7
|
|
|
7
8
|
export function setUFOConfig(newConfig) {
|
|
8
|
-
|
|
9
|
+
if (fg('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
10
|
+
var _newConfig$vc;
|
|
11
|
+
// Handle edge cases with `enabledVCRevisions`
|
|
12
|
+
const {
|
|
13
|
+
enabledVCRevisions
|
|
14
|
+
} = (_newConfig$vc = newConfig === null || newConfig === void 0 ? void 0 : newConfig.vc) !== null && _newConfig$vc !== void 0 ? _newConfig$vc : {};
|
|
15
|
+
if (typeof (enabledVCRevisions === null || enabledVCRevisions === void 0 ? void 0 : enabledVCRevisions.byExperience) === 'object') {
|
|
16
|
+
config = {
|
|
17
|
+
...newConfig,
|
|
18
|
+
vc: {
|
|
19
|
+
...newConfig.vc,
|
|
20
|
+
enabledVCRevisions: {
|
|
21
|
+
// enforce axiom about `enabledVCRevisions.all` config
|
|
22
|
+
all: Array.from(new Set([DEFAULT_TTVC_REVISION, ...(enabledVCRevisions === null || enabledVCRevisions === void 0 ? void 0 : enabledVCRevisions.all), ...Object.values(enabledVCRevisions === null || enabledVCRevisions === void 0 ? void 0 : enabledVCRevisions.byExperience).flat()])),
|
|
23
|
+
byExperience: {
|
|
24
|
+
...(enabledVCRevisions === null || enabledVCRevisions === void 0 ? void 0 : enabledVCRevisions.byExperience)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
} else {
|
|
30
|
+
config = newConfig;
|
|
31
|
+
}
|
|
32
|
+
} else {
|
|
33
|
+
config = newConfig;
|
|
34
|
+
}
|
|
9
35
|
}
|
|
10
36
|
export function getConfig() {
|
|
11
37
|
return config;
|
|
12
38
|
}
|
|
13
|
-
|
|
39
|
+
const isValidConfigArray = array => {
|
|
40
|
+
return Array.isArray(array) && array.length > 0;
|
|
41
|
+
};
|
|
42
|
+
export function getEnabledVCRevisions(experienceKey = '') {
|
|
14
43
|
try {
|
|
15
44
|
var _config$vc;
|
|
16
45
|
if (!config) {
|
|
17
46
|
return [];
|
|
18
47
|
}
|
|
19
48
|
if ((_config$vc = config.vc) !== null && _config$vc !== void 0 && _config$vc.enabled) {
|
|
20
|
-
var _config$vc2,
|
|
21
|
-
|
|
49
|
+
var _config$vc2, _enabledVCRevisions$b;
|
|
50
|
+
const {
|
|
51
|
+
enabledVCRevisions
|
|
52
|
+
} = (_config$vc2 = config.vc) !== null && _config$vc2 !== void 0 ? _config$vc2 : {};
|
|
53
|
+
if (isValidConfigArray(enabledVCRevisions === null || enabledVCRevisions === void 0 ? void 0 : (_enabledVCRevisions$b = enabledVCRevisions.byExperience) === null || _enabledVCRevisions$b === void 0 ? void 0 : _enabledVCRevisions$b[experienceKey]) && fg('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
54
|
+
var _enabledVCRevisions$b2;
|
|
55
|
+
return (_enabledVCRevisions$b2 = enabledVCRevisions.byExperience) === null || _enabledVCRevisions$b2 === void 0 ? void 0 : _enabledVCRevisions$b2[experienceKey];
|
|
56
|
+
}
|
|
57
|
+
if (isValidConfigArray(enabledVCRevisions === null || enabledVCRevisions === void 0 ? void 0 : enabledVCRevisions.all)) {
|
|
58
|
+
return enabledVCRevisions.all;
|
|
59
|
+
}
|
|
60
|
+
return [DEFAULT_TTVC_REVISION];
|
|
22
61
|
}
|
|
23
62
|
return [];
|
|
24
63
|
} catch {
|
|
25
64
|
return [];
|
|
26
65
|
}
|
|
27
66
|
}
|
|
28
|
-
export function isVCRevisionEnabled(revision) {
|
|
29
|
-
return getEnabledVCRevisions().includes(revision);
|
|
67
|
+
export function isVCRevisionEnabled(revision, experienceKey) {
|
|
68
|
+
return getEnabledVCRevisions(experienceKey).includes(revision);
|
|
69
|
+
}
|
|
70
|
+
export function getMostRecentVCRevision(experienceKey = '') {
|
|
71
|
+
const enabledVCRevisions = getEnabledVCRevisions(experienceKey);
|
|
72
|
+
return enabledVCRevisions[enabledVCRevisions.length - 1];
|
|
30
73
|
}
|
|
31
74
|
export function getInteractionRate(name, interactionKind) {
|
|
32
75
|
try {
|
|
@@ -67,7 +67,8 @@ export async function getExperimentalVCMetrics(interaction) {
|
|
|
67
67
|
tti: (_interaction$apdex = interaction.apdex) === null || _interaction$apdex === void 0 ? void 0 : (_interaction$apdex$ = _interaction$apdex[0]) === null || _interaction$apdex$ === void 0 ? void 0 : _interaction$apdex$.stopTime,
|
|
68
68
|
isEventAborted: !!interaction.abortReason,
|
|
69
69
|
prefix,
|
|
70
|
-
vc: interaction.vc
|
|
70
|
+
vc: interaction.vc,
|
|
71
|
+
experienceKey: interaction.ufoName
|
|
71
72
|
});
|
|
72
73
|
const VC = result === null || result === void 0 ? void 0 : result['metrics:vc'];
|
|
73
74
|
if (!VC || !(result !== null && result !== void 0 && result[`${prefix}:vc:clean`])) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
-
import { getConfig, isVCRevisionEnabled } from '../../config';
|
|
2
|
+
import { getConfig, getMostRecentVCRevision, isVCRevisionEnabled } from '../../config';
|
|
3
3
|
import { postInteractionLog } from '../../interaction-metrics';
|
|
4
4
|
import { getVCObserver } from '../../vc';
|
|
5
5
|
import getInteractionStatus from './get-interaction-status';
|
|
@@ -16,8 +16,9 @@ async function getVCMetrics(interaction) {
|
|
|
16
16
|
}
|
|
17
17
|
const interactionStatus = getInteractionStatus(interaction);
|
|
18
18
|
const pageVisibilityUpToTTAI = getPageVisibilityUpToTTAI(interaction);
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const shouldReportVCMetrics = interactionStatus.originalInteractionStatus === 'SUCCEEDED' && pageVisibilityUpToTTAI === 'visible';
|
|
20
|
+
if (!shouldReportVCMetrics && fg('platform_ufo_no_vc_on_aborted')) {
|
|
21
|
+
getVCObserver().stop(interaction.ufoName);
|
|
21
22
|
return {};
|
|
22
23
|
}
|
|
23
24
|
const isSSREnabled = (config === null || config === void 0 ? void 0 : config.ssr) || (config === null || config === void 0 ? void 0 : (_config$vc$ssrWhiteli = config.vc.ssrWhitelist) === null || _config$vc$ssrWhiteli === void 0 ? void 0 : _config$vc$ssrWhiteli.includes(interaction.ufoName));
|
|
@@ -34,36 +35,52 @@ async function getVCMetrics(interaction) {
|
|
|
34
35
|
prefix,
|
|
35
36
|
vc: interaction.vc,
|
|
36
37
|
isEventAborted: interactionStatus.originalInteractionStatus !== 'SUCCEEDED',
|
|
38
|
+
experienceKey: interaction.ufoName,
|
|
37
39
|
...ssr
|
|
38
40
|
});
|
|
39
41
|
if ((_config$experimentalI = config.experimentalInteractionMetrics) !== null && _config$experimentalI !== void 0 && _config$experimentalI.enabled) {
|
|
40
|
-
getVCObserver().stop();
|
|
42
|
+
getVCObserver().stop(interaction.ufoName);
|
|
41
43
|
}
|
|
42
44
|
postInteractionLog.setLastInteractionFinishVCResult(result);
|
|
43
|
-
if (
|
|
45
|
+
if (fg('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
44
46
|
var _result$ufoVcRev;
|
|
45
|
-
const
|
|
47
|
+
const mostRecentVCRevision = getMostRecentVCRevision(interaction.ufoName);
|
|
48
|
+
const mostRecentVCRevisionPayload = result === null || result === void 0 ? void 0 : (_result$ufoVcRev = result['ufo:vc:rev']) === null || _result$ufoVcRev === void 0 ? void 0 : _result$ufoVcRev.find(({
|
|
46
49
|
revision
|
|
47
|
-
}) => revision ===
|
|
48
|
-
if (!(
|
|
50
|
+
}) => revision === mostRecentVCRevision);
|
|
51
|
+
if (!shouldReportVCMetrics || !(mostRecentVCRevisionPayload !== null && mostRecentVCRevisionPayload !== void 0 && mostRecentVCRevisionPayload.clean)) {
|
|
49
52
|
return result;
|
|
50
53
|
}
|
|
51
54
|
return {
|
|
52
55
|
...result,
|
|
53
|
-
'metric:vc90':
|
|
56
|
+
'metric:vc90': mostRecentVCRevisionPayload['metric:vc90']
|
|
54
57
|
};
|
|
55
58
|
} else {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
if (!isVCRevisionEnabled('fy25.01')) {
|
|
60
|
+
var _result$ufoVcRev2;
|
|
61
|
+
const ttvcV2Revision = result === null || result === void 0 ? void 0 : (_result$ufoVcRev2 = result['ufo:vc:rev']) === null || _result$ufoVcRev2 === void 0 ? void 0 : _result$ufoVcRev2.find(({
|
|
62
|
+
revision
|
|
63
|
+
}) => revision === 'fy25.02');
|
|
64
|
+
if (!(ttvcV2Revision !== null && ttvcV2Revision !== void 0 && ttvcV2Revision.clean)) {
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
...result,
|
|
69
|
+
'metric:vc90': ttvcV2Revision['metric:vc90']
|
|
70
|
+
};
|
|
71
|
+
} else {
|
|
72
|
+
const VC = result === null || result === void 0 ? void 0 : result['metrics:vc'];
|
|
73
|
+
if (!VC || !(result !== null && result !== void 0 && result[`${prefix}:vc:clean`])) {
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
if (interactionStatus.originalInteractionStatus !== 'SUCCEEDED' || pageVisibilityUpToTTAI !== 'visible') {
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
...result,
|
|
81
|
+
'metric:vc90': VC['90']
|
|
82
|
+
};
|
|
62
83
|
}
|
|
63
|
-
return {
|
|
64
|
-
...result,
|
|
65
|
-
'metric:vc90': VC['90']
|
|
66
|
-
};
|
|
67
84
|
}
|
|
68
85
|
}
|
|
69
86
|
export default getVCMetrics;
|
|
@@ -719,7 +719,8 @@ export function addNewInteraction(interactionId, ufoName, type, startTime, rate,
|
|
|
719
719
|
if (type === 'transition') {
|
|
720
720
|
var _getConfig14, _getConfig14$experime;
|
|
721
721
|
getVCObserver().start({
|
|
722
|
-
startTime
|
|
722
|
+
startTime,
|
|
723
|
+
experienceKey: ufoName
|
|
723
724
|
});
|
|
724
725
|
postInteractionLog.startVCObserver({
|
|
725
726
|
startTime
|
|
@@ -103,7 +103,8 @@ export default class PostInteractionLog {
|
|
|
103
103
|
// no need for TTI value here
|
|
104
104
|
isEventAborted: !!this.lastInteractionFinish.abortReason,
|
|
105
105
|
prefix: 'ufo',
|
|
106
|
-
...this.vcObserverSSRConfig
|
|
106
|
+
...this.vcObserverSSRConfig,
|
|
107
|
+
experienceKey: this.lastInteractionFinish.ufoName
|
|
107
108
|
}));
|
|
108
109
|
if ((_getConfig2 = getConfig()) !== null && _getConfig2 !== void 0 && (_getConfig2$experimen = _getConfig2.experimentalInteractionMetrics) !== null && _getConfig2$experimen !== void 0 && _getConfig2$experimen.enabled) {
|
|
109
110
|
var _this$vcObserver4;
|
package/dist/es2019/vc/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
var _process, _process$env;
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { isVCRevisionEnabled } from '../config';
|
|
3
4
|
import { VCObserverNOOP } from './no-op-vc-observer';
|
|
4
5
|
import { VCObserver } from './vc-observer';
|
|
@@ -6,55 +7,117 @@ import VCObserverNew from './vc-observer-new';
|
|
|
6
7
|
class VCObserverWrapper {
|
|
7
8
|
constructor(opts = {}) {
|
|
8
9
|
this.newVCObserver = null;
|
|
9
|
-
if (
|
|
10
|
-
this.
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
if (fg('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
11
|
+
this.oldVCObserver = null;
|
|
12
|
+
if (isVCRevisionEnabled('fy25.03')) {
|
|
13
|
+
this.newVCObserver = new VCObserverNew({
|
|
14
|
+
selectorConfig: opts.selectorConfig
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
if (isVCRevisionEnabled('fy25.01') || isVCRevisionEnabled('fy25.02')) {
|
|
18
|
+
this.oldVCObserver = new VCObserver(opts);
|
|
19
|
+
}
|
|
20
|
+
} else {
|
|
21
|
+
if (isVCRevisionEnabled('fy25.03')) {
|
|
22
|
+
this.newVCObserver = new VCObserverNew({
|
|
23
|
+
selectorConfig: opts.selectorConfig
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
this.oldVCObserver = new VCObserver(opts);
|
|
13
27
|
}
|
|
14
|
-
this.oldVCObserver = new VCObserver(opts);
|
|
15
28
|
}
|
|
16
|
-
start(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
29
|
+
start({
|
|
30
|
+
startTime,
|
|
31
|
+
experienceKey
|
|
32
|
+
}) {
|
|
33
|
+
if (fg('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
34
|
+
if (isVCRevisionEnabled('fy25.01', experienceKey) || isVCRevisionEnabled('fy25.02', experienceKey)) {
|
|
35
|
+
var _this$oldVCObserver;
|
|
36
|
+
(_this$oldVCObserver = this.oldVCObserver) === null || _this$oldVCObserver === void 0 ? void 0 : _this$oldVCObserver.start({
|
|
37
|
+
startTime
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
if (isVCRevisionEnabled('fy25.03', experienceKey)) {
|
|
41
|
+
var _this$newVCObserver;
|
|
42
|
+
(_this$newVCObserver = this.newVCObserver) === null || _this$newVCObserver === void 0 ? void 0 : _this$newVCObserver.start({
|
|
43
|
+
startTime
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
} else {
|
|
47
|
+
var _this$oldVCObserver2, _this$newVCObserver2;
|
|
48
|
+
(_this$oldVCObserver2 = this.oldVCObserver) === null || _this$oldVCObserver2 === void 0 ? void 0 : _this$oldVCObserver2.start({
|
|
49
|
+
startTime
|
|
50
|
+
});
|
|
51
|
+
(_this$newVCObserver2 = this.newVCObserver) === null || _this$newVCObserver2 === void 0 ? void 0 : _this$newVCObserver2.start({
|
|
52
|
+
startTime
|
|
53
|
+
});
|
|
54
|
+
}
|
|
22
55
|
}
|
|
23
|
-
stop() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
56
|
+
stop(experienceKey) {
|
|
57
|
+
if (fg('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
58
|
+
if (isVCRevisionEnabled('fy25.01', experienceKey) || isVCRevisionEnabled('fy25.02', experienceKey)) {
|
|
59
|
+
var _this$oldVCObserver3;
|
|
60
|
+
(_this$oldVCObserver3 = this.oldVCObserver) === null || _this$oldVCObserver3 === void 0 ? void 0 : _this$oldVCObserver3.stop();
|
|
61
|
+
}
|
|
62
|
+
if (isVCRevisionEnabled('fy25.03', experienceKey)) {
|
|
63
|
+
var _this$newVCObserver3;
|
|
64
|
+
(_this$newVCObserver3 = this.newVCObserver) === null || _this$newVCObserver3 === void 0 ? void 0 : _this$newVCObserver3.stop();
|
|
65
|
+
}
|
|
66
|
+
} else {
|
|
67
|
+
var _this$oldVCObserver4, _this$newVCObserver4;
|
|
68
|
+
(_this$oldVCObserver4 = this.oldVCObserver) === null || _this$oldVCObserver4 === void 0 ? void 0 : _this$oldVCObserver4.stop();
|
|
69
|
+
(_this$newVCObserver4 = this.newVCObserver) === null || _this$newVCObserver4 === void 0 ? void 0 : _this$newVCObserver4.stop();
|
|
70
|
+
}
|
|
27
71
|
}
|
|
28
72
|
getVCRawData() {
|
|
29
|
-
var _this$oldVCObserver$g, _this$
|
|
30
|
-
return (_this$oldVCObserver$g = (_this$
|
|
73
|
+
var _this$oldVCObserver$g, _this$oldVCObserver5;
|
|
74
|
+
return (_this$oldVCObserver$g = (_this$oldVCObserver5 = this.oldVCObserver) === null || _this$oldVCObserver5 === void 0 ? void 0 : _this$oldVCObserver5.getVCRawData()) !== null && _this$oldVCObserver$g !== void 0 ? _this$oldVCObserver$g : null;
|
|
31
75
|
}
|
|
32
76
|
async getVCResult(param) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
77
|
+
if (fg('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
78
|
+
var _this$oldVCObserver6, _this$newVCObserver5, _ref;
|
|
79
|
+
const {
|
|
80
|
+
experienceKey
|
|
81
|
+
} = param;
|
|
82
|
+
const v1v2Result = isVCRevisionEnabled('fy25.01', experienceKey) || isVCRevisionEnabled('fy25.02', experienceKey) ? await ((_this$oldVCObserver6 = this.oldVCObserver) === null || _this$oldVCObserver6 === void 0 ? void 0 : _this$oldVCObserver6.getVCResult(param)) : {};
|
|
83
|
+
const v3Result = isVCRevisionEnabled('fy25.03', experienceKey) ? await ((_this$newVCObserver5 = this.newVCObserver) === null || _this$newVCObserver5 === void 0 ? void 0 : _this$newVCObserver5.getVCResult({
|
|
84
|
+
start: param.start,
|
|
85
|
+
stop: param.stop
|
|
86
|
+
})) : [];
|
|
87
|
+
if (!v3Result) {
|
|
88
|
+
return v1v2Result !== null && v1v2Result !== void 0 ? v1v2Result : {};
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
...v1v2Result,
|
|
92
|
+
'ufo:vc:rev': [...((_ref = v1v2Result === null || v1v2Result === void 0 ? void 0 : v1v2Result['ufo:vc:rev']) !== null && _ref !== void 0 ? _ref : []), ...(v3Result !== null && v3Result !== void 0 ? v3Result : [])]
|
|
93
|
+
};
|
|
94
|
+
} else {
|
|
95
|
+
var _this$oldVCObserver7, _this$newVCObserver6, _ref2;
|
|
96
|
+
const oldResult = await ((_this$oldVCObserver7 = this.oldVCObserver) === null || _this$oldVCObserver7 === void 0 ? void 0 : _this$oldVCObserver7.getVCResult(param));
|
|
97
|
+
const newResult = await ((_this$newVCObserver6 = this.newVCObserver) === null || _this$newVCObserver6 === void 0 ? void 0 : _this$newVCObserver6.getVCResult({
|
|
98
|
+
start: param.start,
|
|
99
|
+
stop: param.stop
|
|
100
|
+
}));
|
|
101
|
+
if (oldResult && !newResult) {
|
|
102
|
+
return oldResult;
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
...(oldResult !== null && oldResult !== void 0 ? oldResult : {}),
|
|
106
|
+
'ufo:vc:rev': [...((_ref2 = oldResult === null || oldResult === void 0 ? void 0 : oldResult['ufo:vc:rev']) !== null && _ref2 !== void 0 ? _ref2 : []), ...(newResult !== null && newResult !== void 0 ? newResult : [])]
|
|
107
|
+
};
|
|
41
108
|
}
|
|
42
|
-
return {
|
|
43
|
-
...(oldResult !== null && oldResult !== void 0 ? oldResult : {}),
|
|
44
|
-
'ufo:vc:rev': [...((_ref = oldResult === null || oldResult === void 0 ? void 0 : oldResult['ufo:vc:rev']) !== null && _ref !== void 0 ? _ref : []), ...(newResult !== null && newResult !== void 0 ? newResult : [])]
|
|
45
|
-
};
|
|
46
109
|
}
|
|
47
110
|
setSSRElement(element) {
|
|
48
|
-
var _this$
|
|
49
|
-
(_this$
|
|
111
|
+
var _this$oldVCObserver8;
|
|
112
|
+
(_this$oldVCObserver8 = this.oldVCObserver) === null || _this$oldVCObserver8 === void 0 ? void 0 : _this$oldVCObserver8.setSSRElement(element);
|
|
50
113
|
}
|
|
51
114
|
setReactRootRenderStart(startTime) {
|
|
52
|
-
var _this$
|
|
53
|
-
(_this$
|
|
115
|
+
var _this$oldVCObserver9;
|
|
116
|
+
(_this$oldVCObserver9 = this.oldVCObserver) === null || _this$oldVCObserver9 === void 0 ? void 0 : _this$oldVCObserver9.setReactRootRenderStart(startTime || performance.now());
|
|
54
117
|
}
|
|
55
118
|
setReactRootRenderStop(stopTime) {
|
|
56
|
-
var _this$
|
|
57
|
-
(_this$
|
|
119
|
+
var _this$oldVCObserver10;
|
|
120
|
+
(_this$oldVCObserver10 = this.oldVCObserver) === null || _this$oldVCObserver10 === void 0 ? void 0 : _this$oldVCObserver10.setReactRootRenderStop(stopTime || performance.now());
|
|
58
121
|
}
|
|
59
122
|
}
|
|
60
123
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
2
|
import { isVCRevisionEnabled } from '../../config';
|
|
2
3
|
import { getPageVisibilityState } from '../../hidden-timing';
|
|
3
4
|
import { getRevisions } from './revisions/revisions';
|
|
@@ -19,7 +20,7 @@ function createVCDetails(calculatedVC, shouldHaveVCmetric) {
|
|
|
19
20
|
|
|
20
21
|
for (const key of VCParts) {
|
|
21
22
|
details[key] = {
|
|
22
|
-
t: VC[key],
|
|
23
|
+
t: VC[key] || -1,
|
|
23
24
|
e: VCBox[key] || READONLY_EMPTY_ARRAY
|
|
24
25
|
};
|
|
25
26
|
}
|
|
@@ -35,9 +36,14 @@ export function getVCRevisionsData({
|
|
|
35
36
|
multiHeatmap,
|
|
36
37
|
ssr,
|
|
37
38
|
calculatedVC,
|
|
38
|
-
calculatedVCNext
|
|
39
|
+
calculatedVCNext,
|
|
40
|
+
experienceKey
|
|
39
41
|
}) {
|
|
40
|
-
|
|
42
|
+
const isTTVCv3Enabled = fg('platform_ufo_vc_enable_revisions_by_experience') ? isVCRevisionEnabled('fy25.03', experienceKey) : isVCRevisionEnabled('fy25.03');
|
|
43
|
+
|
|
44
|
+
// As part of `platform_ufo_vc_enable_revisions_by_experience`, we are looking to turn off the `multiHeatmap` branch of code
|
|
45
|
+
// for calculating TTVC, and instead rely on existing values already available, e.g. `calculatedVC` and `calculatedVCNext`
|
|
46
|
+
if (!isTTVCv3Enabled && !fg('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
41
47
|
if (!multiHeatmap) {
|
|
42
48
|
return null;
|
|
43
49
|
}
|
|
@@ -58,33 +64,54 @@ export function getVCRevisionsData({
|
|
|
58
64
|
})
|
|
59
65
|
};
|
|
60
66
|
}
|
|
61
|
-
|
|
62
|
-
// Calculate these conditions once
|
|
63
67
|
const pageVisibilityUpToTTAI = getPageVisibilityState(interaction.start, interaction.end);
|
|
64
68
|
const isVisiblePageVisibleUpToTTAI = pageVisibilityUpToTTAI === 'visible';
|
|
65
69
|
const shouldHaveVCmetric = isVCClean && !isEventAborted && isVisiblePageVisibleUpToTTAI;
|
|
70
|
+
if (fg('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
71
|
+
const availableVCRevisionPayloads = [];
|
|
72
|
+
if (isVCRevisionEnabled('fy25.01', experienceKey)) {
|
|
73
|
+
availableVCRevisionPayloads.push({
|
|
74
|
+
revision: 'fy25.01',
|
|
75
|
+
clean: isVCClean,
|
|
76
|
+
'metric:vc90': shouldHaveVCmetric ? calculatedVC.VC['90'] : null,
|
|
77
|
+
vcDetails: createVCDetails(calculatedVC, shouldHaveVCmetric)
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
if (isVCRevisionEnabled('fy25.02', experienceKey)) {
|
|
81
|
+
availableVCRevisionPayloads.push({
|
|
82
|
+
revision: 'fy25.02',
|
|
83
|
+
clean: isVCClean,
|
|
84
|
+
'metric:vc90': shouldHaveVCmetric ? calculatedVCNext.VC['90'] : null,
|
|
85
|
+
vcDetails: createVCDetails(calculatedVCNext, shouldHaveVCmetric)
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
[`${fullPrefix}vc:rev`]: availableVCRevisionPayloads
|
|
90
|
+
};
|
|
91
|
+
} else {
|
|
92
|
+
// Create the V2 revision object which is always needed
|
|
93
|
+
const ttvcV2Revision = {
|
|
94
|
+
revision: 'fy25.02',
|
|
95
|
+
clean: isVCClean,
|
|
96
|
+
'metric:vc90': shouldHaveVCmetric ? calculatedVCNext.VC['90'] : null,
|
|
97
|
+
vcDetails: createVCDetails(calculatedVCNext, shouldHaveVCmetric)
|
|
98
|
+
};
|
|
99
|
+
const isTTVCv1Disabled = !isVCRevisionEnabled('fy25.01');
|
|
100
|
+
if (isTTVCv1Disabled) {
|
|
101
|
+
return {
|
|
102
|
+
[`${fullPrefix}vc:rev`]: [ttvcV2Revision]
|
|
103
|
+
};
|
|
104
|
+
}
|
|
66
105
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
if (!isVCRevisionEnabled('fy25.01')) {
|
|
106
|
+
// Only create ttvcV1Revision when we're actually going to use it
|
|
107
|
+
const ttvcV1Revision = {
|
|
108
|
+
revision: 'fy25.01',
|
|
109
|
+
clean: isVCClean,
|
|
110
|
+
'metric:vc90': shouldHaveVCmetric ? calculatedVC.VC['90'] : null,
|
|
111
|
+
vcDetails: createVCDetails(calculatedVC, shouldHaveVCmetric)
|
|
112
|
+
};
|
|
75
113
|
return {
|
|
76
|
-
[`${fullPrefix}vc:rev`]: [ttvcV2Revision]
|
|
114
|
+
[`${fullPrefix}vc:rev`]: [ttvcV1Revision, ttvcV2Revision]
|
|
77
115
|
};
|
|
78
116
|
}
|
|
79
|
-
|
|
80
|
-
// Only create ttvcV1Revision when we're actually going to use it
|
|
81
|
-
const ttvcV1Revision = {
|
|
82
|
-
revision: 'fy25.01',
|
|
83
|
-
clean: isVCClean,
|
|
84
|
-
'metric:vc90': shouldHaveVCmetric ? calculatedVC.VC['90'] : null,
|
|
85
|
-
vcDetails: createVCDetails(calculatedVC, shouldHaveVCmetric)
|
|
86
|
-
};
|
|
87
|
-
return {
|
|
88
|
-
[`${fullPrefix}vc:rev`]: [ttvcV1Revision, ttvcV2Revision]
|
|
89
|
-
};
|
|
90
117
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
3
|
import { isVCRevisionEnabled } from '../../config';
|
|
4
|
+
import { getActiveInteraction } from '../../interaction-metrics';
|
|
4
5
|
import { attachAbortListeners } from './attachAbortListeners';
|
|
5
6
|
import { getVCRevisionsData } from './getVCRevisionsData';
|
|
6
7
|
import { getViewportHeight, getViewportWidth } from './getViewport';
|
|
@@ -94,7 +95,8 @@ export class VCObserver {
|
|
|
94
95
|
prefix,
|
|
95
96
|
ssr,
|
|
96
97
|
vc,
|
|
97
|
-
isEventAborted
|
|
98
|
+
isEventAborted,
|
|
99
|
+
experienceKey
|
|
98
100
|
}) => {
|
|
99
101
|
const startTime = performance.now();
|
|
100
102
|
// add local measurement
|
|
@@ -116,7 +118,7 @@ export class VCObserver {
|
|
|
116
118
|
ratios,
|
|
117
119
|
multiHeatmap
|
|
118
120
|
} = rawData;
|
|
119
|
-
const isTTVCv1Disabled = !isVCRevisionEnabled('fy25.01');
|
|
121
|
+
const isTTVCv1Disabled = fg('platform_ufo_vc_enable_revisions_by_experience') ? !isVCRevisionEnabled('fy25.01', experienceKey) : !isVCRevisionEnabled('fy25.01');
|
|
120
122
|
|
|
121
123
|
// NOTE: as part of platform_ufo_add_vc_abort_reason_by_revisions feature,
|
|
122
124
|
// we want to report abort by scroll events the same way as other abort reasons
|
|
@@ -318,7 +320,8 @@ export class VCObserver {
|
|
|
318
320
|
VC: vcNext.VC,
|
|
319
321
|
VCBox: vcNext.VCBox
|
|
320
322
|
},
|
|
321
|
-
isEventAborted
|
|
323
|
+
isEventAborted,
|
|
324
|
+
experienceKey
|
|
322
325
|
});
|
|
323
326
|
const speedIndex = {
|
|
324
327
|
[`ufo:speedIndex`]: isTTVCv1Disabled ? vcNext.VCEntries.speedIndex : VCEntries.speedIndex,
|
|
@@ -335,7 +338,7 @@ export class VCObserver {
|
|
|
335
338
|
...speedIndex
|
|
336
339
|
};
|
|
337
340
|
}
|
|
338
|
-
const isTTVCv3Enabled = isVCRevisionEnabled('fy25.03');
|
|
341
|
+
const isTTVCv3Enabled = fg('platform_ufo_vc_enable_revisions_by_experience') ? isVCRevisionEnabled('fy25.03', experienceKey) : isVCRevisionEnabled('fy25.03');
|
|
339
342
|
return {
|
|
340
343
|
'metrics:vc': VC,
|
|
341
344
|
[`${fullPrefix}vc:state`]: true,
|
|
@@ -360,7 +363,12 @@ export class VCObserver {
|
|
|
360
363
|
_defineProperty(this, "handleUpdate", (rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue) => {
|
|
361
364
|
this.measureStart();
|
|
362
365
|
this.legacyHandleUpdate(rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue);
|
|
363
|
-
|
|
366
|
+
let isTTVCv3Disabled = !isVCRevisionEnabled('fy25.03');
|
|
367
|
+
if (fg('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
368
|
+
const interaction = getActiveInteraction();
|
|
369
|
+
isTTVCv3Disabled = !isVCRevisionEnabled('fy25.03', interaction === null || interaction === void 0 ? void 0 : interaction.ufoName);
|
|
370
|
+
}
|
|
371
|
+
if (isTTVCv3Disabled) {
|
|
364
372
|
this.onViewportChangeDetected({
|
|
365
373
|
timestamp: rawTime,
|
|
366
374
|
intersectionRect,
|
|
@@ -383,7 +391,11 @@ export class VCObserver {
|
|
|
383
391
|
if (!ignoreReason) {
|
|
384
392
|
this.applyChangesToHeatMap(mappedValues, time, this.heatmapNext);
|
|
385
393
|
}
|
|
386
|
-
|
|
394
|
+
let isTTVCv1Disabled = !isVCRevisionEnabled('fy25.01');
|
|
395
|
+
if (fg('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
396
|
+
const interaction = getActiveInteraction();
|
|
397
|
+
isTTVCv1Disabled = !isVCRevisionEnabled('fy25.01', interaction === null || interaction === void 0 ? void 0 : interaction.ufoName);
|
|
398
|
+
}
|
|
387
399
|
if (!isTTVCv1Disabled && (!ignoreReason || ignoreReason === 'not-visible') && type !== 'attr') {
|
|
388
400
|
this.applyChangesToHeatMap(mappedValues, time, this.heatmap);
|
|
389
401
|
}
|