@atlaskit/react-ufo 4.7.1 → 4.7.3
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 +20 -0
- package/dist/cjs/create-interaction-extra-metrics-payload/index.js +21 -10
- package/dist/cjs/interaction-metrics/index.js +0 -31
- package/dist/cjs/vc/vc-observer/index.js +6 -27
- package/dist/cjs/vc/vc-observer/observers/ssr-placeholders/index.js +2 -2
- package/dist/cjs/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +7 -10
- package/dist/cjs/vc/vc-observer-new/metric-calculator/fy25_03/index.js +4 -10
- package/dist/cjs/vc/vc-observer-new/viewport-observer/index.js +30 -48
- package/dist/es2019/create-interaction-extra-metrics-payload/index.js +12 -4
- package/dist/es2019/interaction-metrics/index.js +0 -31
- package/dist/es2019/vc/vc-observer/index.js +18 -42
- package/dist/es2019/vc/vc-observer/observers/ssr-placeholders/index.js +2 -2
- package/dist/es2019/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +10 -16
- package/dist/es2019/vc/vc-observer-new/metric-calculator/fy25_03/index.js +2 -6
- package/dist/es2019/vc/vc-observer-new/viewport-observer/index.js +20 -29
- package/dist/esm/create-interaction-extra-metrics-payload/index.js +22 -11
- package/dist/esm/interaction-metrics/index.js +0 -31
- package/dist/esm/vc/vc-observer/index.js +6 -27
- package/dist/esm/vc/vc-observer/observers/ssr-placeholders/index.js +2 -2
- package/dist/esm/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +7 -10
- package/dist/esm/vc/vc-observer-new/metric-calculator/fy25_03/index.js +4 -10
- package/dist/esm/vc/vc-observer-new/viewport-observer/index.js +30 -48
- package/dist/types/create-interaction-extra-metrics-payload/index.d.ts +1 -1
- package/dist/types/vc/vc-observer-new/metric-calculator/fy25_03/index.d.ts +3 -1
- package/dist/types-ts4.5/create-interaction-extra-metrics-payload/index.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/fy25_03/index.d.ts +3 -1
- package/package.json +1 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 4.7.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0a9ee11a008bd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0a9ee11a008bd) -
|
|
8
|
+
FG cleanup - platform_ufo_abort_timestamp_by_revision
|
|
9
|
+
- [`8127ae8dc5d5b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8127ae8dc5d5b) -
|
|
10
|
+
FG cleanup - ufo_disable_aborted_new_interaction_on_confluence
|
|
11
|
+
- [`53e3c6f5e41ac`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/53e3c6f5e41ac) -
|
|
12
|
+
Check vc clean before sending custom.interaction-extra-metrics
|
|
13
|
+
|
|
14
|
+
## 4.7.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`d1ac995997b02`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d1ac995997b02) -
|
|
19
|
+
FG cleanup - platform_ufo_ssr_placeholder_resolution_ttvc_v3
|
|
20
|
+
- [`c7980ce6abb45`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c7980ce6abb45) -
|
|
21
|
+
FG cleanup - platform_ufo_serialise_ttvc_v3_debug_data
|
|
22
|
+
|
|
3
23
|
## 4.7.1
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -36,8 +36,8 @@ function createInteractionExtraLogPayload(_x, _x2) {
|
|
|
36
36
|
}
|
|
37
37
|
function _createInteractionExtraLogPayload() {
|
|
38
38
|
_createInteractionExtraLogPayload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(interactionId, interaction) {
|
|
39
|
-
var _getTTAI,
|
|
40
|
-
var config, end, start, ufoName, rate, type, abortReason, routeName, previousInteractionName, isPreviousInteractionAborted, abortedByInteractionName, knownSegments, sanitisedUfoName, configRate, pageVisibilityAtTTAI, isPageLoad, calculatePageVisibilityFromTheStartOfPageLoad, moreAccuratePageVisibilityAtTTAI, extraTTAI, newUFOName,
|
|
39
|
+
var _getTTAI, _window$location;
|
|
40
|
+
var config, end, start, ufoName, rate, type, abortReason, routeName, previousInteractionName, isPreviousInteractionAborted, abortedByInteractionName, knownSegments, sanitisedUfoName, configRate, pageVisibilityAtTTAI, isPageLoad, calculatePageVisibilityFromTheStartOfPageLoad, moreAccuratePageVisibilityAtTTAI, extraTTAI, newUFOName, finalVCMetrics, vcRevisionPayload, effectiveVCRevisionPayload, isThirdParty, filteredData, getDetailedInteractionMetrics, segments3p, segmentTree, payload;
|
|
41
41
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
42
42
|
while (1) switch (_context.prev = _context.next) {
|
|
43
43
|
case 0:
|
|
@@ -69,11 +69,22 @@ function _createInteractionExtraLogPayload() {
|
|
|
69
69
|
moreAccuratePageVisibilityAtTTAI = calculatePageVisibilityFromTheStartOfPageLoad ? (0, _getMoreAccuratePageVisibilityUpToTtai.getMoreAccuratePageVisibilityUpToTTAI)(interaction) : null;
|
|
70
70
|
extraTTAI = (_getTTAI = (0, _getTtai.default)(interaction)) !== null && _getTTAI !== void 0 ? _getTTAI : undefined;
|
|
71
71
|
newUFOName = (0, _utils.sanitizeUfoName)(ufoName);
|
|
72
|
-
|
|
73
|
-
_context.next = 19;
|
|
72
|
+
_context.next = 18;
|
|
74
73
|
return (0, _getVcMetrics.default)(interaction, true);
|
|
75
|
-
case
|
|
74
|
+
case 18:
|
|
76
75
|
finalVCMetrics = _context.sent;
|
|
76
|
+
// Check if VC is clean and has valid metric
|
|
77
|
+
vcRevisionPayload = finalVCMetrics === null || finalVCMetrics === void 0 ? void 0 : finalVCMetrics['ufo:vc:rev'];
|
|
78
|
+
effectiveVCRevisionPayload = vcRevisionPayload === null || vcRevisionPayload === void 0 ? void 0 : vcRevisionPayload.find(function (_ref) {
|
|
79
|
+
var revision = _ref.revision;
|
|
80
|
+
return revision === _config.DEFAULT_TTVC_REVISION;
|
|
81
|
+
});
|
|
82
|
+
if (!(!(effectiveVCRevisionPayload !== null && effectiveVCRevisionPayload !== void 0 && effectiveVCRevisionPayload.clean) || (effectiveVCRevisionPayload === null || effectiveVCRevisionPayload === void 0 ? void 0 : effectiveVCRevisionPayload['metric:vc90']) === undefined)) {
|
|
83
|
+
_context.next = 23;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
return _context.abrupt("return", null);
|
|
87
|
+
case 23:
|
|
77
88
|
// Helper function to check if labelStack contains third-party type
|
|
78
89
|
isThirdParty = function isThirdParty(labelStack) {
|
|
79
90
|
var _labelStack$some;
|
|
@@ -116,9 +127,9 @@ function _createInteractionExtraLogPayload() {
|
|
|
116
127
|
getDetailedInteractionMetrics = function getDetailedInteractionMetrics() {
|
|
117
128
|
var _interaction$hold3pIn;
|
|
118
129
|
return {
|
|
119
|
-
errors: filteredData.errors.map(function (
|
|
120
|
-
var labelStack =
|
|
121
|
-
others = (0, _objectWithoutProperties2.default)(
|
|
130
|
+
errors: filteredData.errors.map(function (_ref2) {
|
|
131
|
+
var labelStack = _ref2.labelStack,
|
|
132
|
+
others = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
122
133
|
return _objectSpread(_objectSpread({}, others), {}, {
|
|
123
134
|
labelStack: labelStack && (0, _utils.optimizeLabelStack)(labelStack, (0, _getReactUfoPayloadVersion.getReactUFOPayloadVersion)(interaction.type))
|
|
124
135
|
});
|
|
@@ -179,13 +190,13 @@ function _createInteractionExtraLogPayload() {
|
|
|
179
190
|
reactProfilerTimings: (0, _optimizeReactProfilerTimings.optimizeReactProfilerTimings)(filteredData.reactProfilerTimings, start, (0, _getReactUfoPayloadVersion.getReactUFOPayloadVersion)(interaction.type)),
|
|
180
191
|
customData: filteredData.customData
|
|
181
192
|
}, getDetailedInteractionMetrics()),
|
|
182
|
-
'vc:effective:revision':
|
|
193
|
+
'vc:effective:revision': _config.DEFAULT_TTVC_REVISION
|
|
183
194
|
}
|
|
184
195
|
}
|
|
185
196
|
};
|
|
186
197
|
payload.attributes.properties['event:sizeInKb'] = (0, _getPayloadSize.default)(payload.attributes.properties);
|
|
187
198
|
return _context.abrupt("return", payload);
|
|
188
|
-
case
|
|
199
|
+
case 32:
|
|
189
200
|
case "end":
|
|
190
201
|
return _context.stop();
|
|
191
202
|
}
|
|
@@ -50,7 +50,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
50
50
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
51
51
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
52
52
|
var _uuid = require("uuid");
|
|
53
|
-
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
54
53
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
55
54
|
var _coinflip = _interopRequireDefault(require("../coinflip"));
|
|
56
55
|
var _config = require("../config");
|
|
@@ -926,16 +925,6 @@ function callCancelCallbacks(interaction) {
|
|
|
926
925
|
});
|
|
927
926
|
}
|
|
928
927
|
function abort(interactionId, abortReason) {
|
|
929
|
-
var _FeatureGates$getExpe;
|
|
930
|
-
var activeInteraction = getActiveInteraction();
|
|
931
|
-
if (
|
|
932
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
933
|
-
abortReason === 'new_interaction' && (0, _platformFeatureFlags.fg)('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
|
|
934
|
-
// ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
|
|
935
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
936
|
-
(_FeatureGates$getExpe = _featureGateJsClient.default.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe !== void 0 && _FeatureGates$getExpe.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
|
|
937
|
-
return;
|
|
938
|
-
}
|
|
939
928
|
var interaction = _constants.interactions.get(interactionId);
|
|
940
929
|
if (interaction != null) {
|
|
941
930
|
callCancelCallbacks(interaction);
|
|
@@ -953,16 +942,6 @@ function abort(interactionId, abortReason) {
|
|
|
953
942
|
}
|
|
954
943
|
}
|
|
955
944
|
function abortByNewInteraction(interactionId, interactionName) {
|
|
956
|
-
var _FeatureGates$getExpe2;
|
|
957
|
-
var activeInteraction = getActiveInteraction();
|
|
958
|
-
if (
|
|
959
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
960
|
-
(0, _platformFeatureFlags.fg)('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
|
|
961
|
-
// ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
|
|
962
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
963
|
-
(_FeatureGates$getExpe2 = _featureGateJsClient.default.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe2 !== void 0 && _FeatureGates$getExpe2.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
|
|
964
|
-
return;
|
|
965
|
-
}
|
|
966
945
|
var interaction = _constants.interactions.get(interactionId);
|
|
967
946
|
if (interaction != null) {
|
|
968
947
|
callCancelCallbacks(interaction);
|
|
@@ -981,16 +960,6 @@ function abortByNewInteraction(interactionId, interactionName) {
|
|
|
981
960
|
}
|
|
982
961
|
}
|
|
983
962
|
function abortAll(abortReason, abortedByInteractionName) {
|
|
984
|
-
var _FeatureGates$getExpe3;
|
|
985
|
-
var activeInteraction = getActiveInteraction();
|
|
986
|
-
if (
|
|
987
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
988
|
-
abortReason === 'new_interaction' && (0, _platformFeatureFlags.fg)('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
|
|
989
|
-
// ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
|
|
990
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
991
|
-
(_FeatureGates$getExpe3 = _featureGateJsClient.default.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe3 !== void 0 && _FeatureGates$getExpe3.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
|
|
992
|
-
return;
|
|
993
|
-
}
|
|
994
963
|
_constants.interactions.forEach(function (interaction, interactionId) {
|
|
995
964
|
var noMoreHolds = interaction.holdActive.size === 0;
|
|
996
965
|
if (!noMoreHolds) {
|
|
@@ -13,7 +13,6 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _config = require("../../config");
|
|
18
17
|
var _interactionMetrics = require("../../interaction-metrics");
|
|
19
18
|
var _attachAbortListeners = require("./attachAbortListeners");
|
|
@@ -103,7 +102,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
103
102
|
});
|
|
104
103
|
(0, _defineProperty2.default)(this, "getVCResult", /*#__PURE__*/function () {
|
|
105
104
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref3) {
|
|
106
|
-
var start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, interactionId, includeSSRRatio, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, isTTVCv1Disabled, vcAbortedResultWithRevisions,
|
|
105
|
+
var start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, interactionId, includeSSRRatio, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, isTTVCv1Disabled, vcAbortedResultWithRevisions, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, shouldCreateDebugDetails, v1RevisionDebugDetails, v2RevisionDebugDetails, _window$__ufo_devtool2, _window2, _window$__ufo_devtool, _window, _window$__on_ufo_vc_d2, _window4, _window$__on_ufo_vc_d, _window3, isVCClean, revisionsData, speedIndex, SSRRatio, SSRRatioNext, SSRRatioPayload, isTTVCv3Enabled;
|
|
107
106
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
108
107
|
while (1) switch (_context.prev = _context.next) {
|
|
109
108
|
case 0:
|
|
@@ -120,7 +119,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
120
119
|
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;
|
|
121
120
|
isTTVCv1Disabled = !(0, _config.isVCRevisionEnabled)('fy25.01', experienceKey);
|
|
122
121
|
if (!(abortReasonInfo !== null)) {
|
|
123
|
-
_context.next =
|
|
122
|
+
_context.next = 13;
|
|
124
123
|
break;
|
|
125
124
|
}
|
|
126
125
|
// exposing data to devtools
|
|
@@ -129,10 +128,6 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
129
128
|
window.__vcNotAvailableReason = abortReasonInfo;
|
|
130
129
|
}
|
|
131
130
|
} catch (e) {}
|
|
132
|
-
if (!(0, _platformFeatureFlags.fg)('platform_ufo_abort_timestamp_by_revision')) {
|
|
133
|
-
_context.next = 16;
|
|
134
|
-
break;
|
|
135
|
-
}
|
|
136
131
|
vcAbortedResultWithRevisions = (0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:rev"), [{
|
|
137
132
|
revision: 'fy25.02',
|
|
138
133
|
clean: false,
|
|
@@ -150,23 +145,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
150
145
|
});
|
|
151
146
|
}
|
|
152
147
|
return _context.abrupt("return", vcAbortedResultWithRevisions);
|
|
153
|
-
case
|
|
154
|
-
_vcAbortedResultWithRevisions = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:state"), false), "".concat(fullPrefix, "vc:abort:reason"), abortReason.reason), "".concat(fullPrefix, "vc:abort:timestamp"), abortReason.timestamp), "".concat(fullPrefix, "vc:rev"), [{
|
|
155
|
-
revision: 'fy25.02',
|
|
156
|
-
clean: false,
|
|
157
|
-
'metric:vc90': null,
|
|
158
|
-
abortReason: abortReason.reason
|
|
159
|
-
}]);
|
|
160
|
-
if (!isTTVCv1Disabled) {
|
|
161
|
-
_vcAbortedResultWithRevisions["".concat(fullPrefix, "vc:rev")].push({
|
|
162
|
-
revision: 'fy25.01',
|
|
163
|
-
clean: false,
|
|
164
|
-
'metric:vc90': null,
|
|
165
|
-
abortReason: abortReason.reason
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
return _context.abrupt("return", _vcAbortedResultWithRevisions);
|
|
169
|
-
case 19:
|
|
148
|
+
case 13:
|
|
170
149
|
ttvcV1Result = isTTVCv1Disabled ? {
|
|
171
150
|
VC: {},
|
|
172
151
|
VCBox: {},
|
|
@@ -324,16 +303,16 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
324
303
|
SSRRatioNext = VCObserver.getSSRRatio(vcNext.VCEntries.rel, ssr);
|
|
325
304
|
SSRRatioPayload = includeSSRRatio ? (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:ssrRatio"), isTTVCv1Disabled ? SSRRatioNext : SSRRatio), "".concat(fullPrefix, "vc:next:ssrRatio"), SSRRatioNext) : {};
|
|
326
305
|
if (!isTTVCv1Disabled) {
|
|
327
|
-
_context.next =
|
|
306
|
+
_context.next = 29;
|
|
328
307
|
break;
|
|
329
308
|
}
|
|
330
309
|
return _context.abrupt("return", _objectSpread(_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)), SSRRatioPayload), {}, (0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:ssrRatio"), SSRRatioNext), revisionsData), speedIndex));
|
|
331
|
-
case
|
|
310
|
+
case 29:
|
|
332
311
|
isTTVCv3Enabled = (0, _config.isVCRevisionEnabled)('fy25.03', experienceKey);
|
|
333
312
|
return _context.abrupt("return", _objectSpread(_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)((0, _defineProperty2.default)({
|
|
334
313
|
'metrics:vc': VC
|
|
335
314
|
}, "".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), "".concat(fullPrefix, "vc:ssrRatio"), SSRRatio), outOfBoundary), {}, (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), SSRRatioPayload), {}, (0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
|
|
336
|
-
case
|
|
315
|
+
case 31:
|
|
337
316
|
case "end":
|
|
338
317
|
return _context.stop();
|
|
339
318
|
}
|
|
@@ -214,7 +214,7 @@ var SSRPlaceholderHandlers = exports.SSRPlaceholderHandlers = /*#__PURE__*/funct
|
|
|
214
214
|
return element;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
//
|
|
217
|
+
// Validates placeholder match using asynchronous observation and resolves with the result
|
|
218
218
|
}, {
|
|
219
219
|
key: "checkIfExistedAndSizeMatching",
|
|
220
220
|
value: function checkIfExistedAndSizeMatching(el) {
|
|
@@ -233,7 +233,7 @@ var SSRPlaceholderHandlers = exports.SSRPlaceholderHandlers = /*#__PURE__*/funct
|
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
//
|
|
236
|
+
// Validates placeholder match synchronously using stored SSR dimensions and current bounds
|
|
237
237
|
}, {
|
|
238
238
|
key: "checkIfExistedAndSizeMatchingV3",
|
|
239
239
|
value: function checkIfExistedAndSizeMatchingV3(el) {
|
|
@@ -204,15 +204,14 @@ var AbstractVCCalculatorBase = exports.default = /*#__PURE__*/function () {
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
enhancedVcLogs = vcLogs ? vcLogs.map(function (log) {
|
|
207
|
-
return _objectSpread(_objectSpread(
|
|
207
|
+
return _objectSpread(_objectSpread({}, log), {}, {
|
|
208
208
|
entries: log.entries.map(function (entry) {
|
|
209
209
|
var _entry$rect, _entry$previousRect;
|
|
210
210
|
return _objectSpread(_objectSpread({}, entry), {}, {
|
|
211
211
|
rect: (_entry$rect = entry.rect) === null || _entry$rect === void 0 ? void 0 : _entry$rect.toJSON(),
|
|
212
212
|
previousRect: (_entry$previousRect = entry.previousRect) === null || _entry$previousRect === void 0 ? void 0 : _entry$previousRect.toJSON()
|
|
213
213
|
});
|
|
214
|
-
})
|
|
215
|
-
}), {}, {
|
|
214
|
+
}),
|
|
216
215
|
viewportPercentage: log.viewportPercentage
|
|
217
216
|
});
|
|
218
217
|
}) : []; // If 3p metric enabled - calculate the debug details
|
|
@@ -268,10 +267,9 @@ var AbstractVCCalculatorBase = exports.default = /*#__PURE__*/function () {
|
|
|
268
267
|
if (!ignoredEntriesByTime.has(timestamp)) {
|
|
269
268
|
ignoredEntriesByTime.set(timestamp, []);
|
|
270
269
|
}
|
|
271
|
-
(_ignoredEntriesByTime = ignoredEntriesByTime.get(timestamp)) === null || _ignoredEntriesByTime === void 0 || _ignoredEntriesByTime.push(_objectSpread(_objectSpread(
|
|
270
|
+
(_ignoredEntriesByTime = ignoredEntriesByTime.get(timestamp)) === null || _ignoredEntriesByTime === void 0 || _ignoredEntriesByTime.push(_objectSpread(_objectSpread({}, viewportData), {}, {
|
|
272
271
|
rect: (_viewportData$rect = viewportData.rect) === null || _viewportData$rect === void 0 ? void 0 : _viewportData$rect.toJSON(),
|
|
273
|
-
previousRect: (_viewportData$previou = viewportData.previousRect) === null || _viewportData$previou === void 0 ? void 0 : _viewportData$previou.toJSON()
|
|
274
|
-
}), {}, {
|
|
272
|
+
previousRect: (_viewportData$previou = viewportData.previousRect) === null || _viewportData$previou === void 0 ? void 0 : _viewportData$previou.toJSON(),
|
|
275
273
|
ignoreReason: viewportData.visible ? viewportData.type : 'not-visible'
|
|
276
274
|
}));
|
|
277
275
|
}
|
|
@@ -397,14 +395,13 @@ var AbstractVCCalculatorBase = exports.default = /*#__PURE__*/function () {
|
|
|
397
395
|
_context2.next = 7;
|
|
398
396
|
break;
|
|
399
397
|
}
|
|
400
|
-
return _context2.abrupt("return",
|
|
398
|
+
return _context2.abrupt("return", {
|
|
401
399
|
revision: this.revisionNo,
|
|
402
400
|
'metric:vc90': null,
|
|
403
401
|
clean: false,
|
|
404
|
-
abortReason: dirtyReason
|
|
405
|
-
}, (0, _platformFeatureFlags.fg)('platform_ufo_abort_timestamp_by_revision') ? {
|
|
402
|
+
abortReason: dirtyReason,
|
|
406
403
|
abortTimestamp: getVCCleanStatusResult.abortTimestamp
|
|
407
|
-
}
|
|
404
|
+
});
|
|
408
405
|
case 7:
|
|
409
406
|
_context2.next = 9;
|
|
410
407
|
return this.calculateWithDebugInfo(filteredEntries, startTime, stopTime, isPostInteraction, isVCClean, interactionId, dirtyReason, orderedEntries, include3p);
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES = exports.NON_VISUAL_ARIA_ATTRIBUTES = exports.KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
10
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
@@ -14,8 +13,6 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
14
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _abstractBaseVcCalculator = _interopRequireDefault(require("../abstract-base-vc-calculator"));
|
|
16
15
|
var _isViewportEntryData = _interopRequireDefault(require("../utils/is-viewport-entry-data"));
|
|
17
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
16
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
20
17
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
21
18
|
var ABORTING_WINDOW_EVENT = ['wheel', 'scroll', 'keydown', 'resize'];
|
|
@@ -84,21 +81,18 @@ var VCCalculator_FY25_03 = exports.default = /*#__PURE__*/function (_AbstractVCC
|
|
|
84
81
|
var data = entry.data;
|
|
85
82
|
if (ABORTING_WINDOW_EVENT.includes(data.eventType)) {
|
|
86
83
|
dirtyReason = data.eventType === 'keydown' ? 'keypress' : data.eventType;
|
|
87
|
-
|
|
88
|
-
abortTimestamp = Math.round(entry.time);
|
|
89
|
-
}
|
|
84
|
+
abortTimestamp = Math.round(entry.time);
|
|
90
85
|
return true;
|
|
91
86
|
}
|
|
92
87
|
}
|
|
93
88
|
return false;
|
|
94
89
|
});
|
|
95
90
|
if (hasAbortEvent && dirtyReason) {
|
|
96
|
-
return
|
|
91
|
+
return {
|
|
97
92
|
isVCClean: false,
|
|
98
|
-
dirtyReason: dirtyReason
|
|
99
|
-
}, (0, _platformFeatureFlags.fg)('platform_ufo_abort_timestamp_by_revision') ? {
|
|
93
|
+
dirtyReason: dirtyReason,
|
|
100
94
|
abortTimestamp: abortTimestamp
|
|
101
|
-
}
|
|
95
|
+
};
|
|
102
96
|
}
|
|
103
97
|
return {
|
|
104
98
|
isVCClean: true
|
|
@@ -125,7 +125,7 @@ var ViewportObserver = exports.default = /*#__PURE__*/function () {
|
|
|
125
125
|
_iterator = _createForOfIteratorHelper(addedNodes);
|
|
126
126
|
_context2.prev = 4;
|
|
127
127
|
_loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
|
|
128
|
-
var addedNodeRef, addedNode, ssrState, SSRStateEnum, _this$intersectionObs, _this$intersectionObs2, ssrPlaceholderHandler, _this$intersectionObs3, result, _this$intersectionObs4,
|
|
128
|
+
var addedNodeRef, addedNode, ssrState, SSRStateEnum, _this$intersectionObs, _this$intersectionObs2, ssrPlaceholderHandler, _this$intersectionObs3, result, _this$intersectionObs4, sameDeletedNode, isInIgnoreLsMarker, _this$intersectionObs5, _this$intersectionObs6, _checkWithinComponent, isWithinThirdPartySegment, _this$intersectionObs7, validTargets, _iterator2, _step2, _this$intersectionObs8, validTarget, _this$intersectionObs9;
|
|
129
129
|
return _regenerator.default.wrap(function _loop$(_context) {
|
|
130
130
|
while (1) switch (_context.prev = _context.next) {
|
|
131
131
|
case 0:
|
|
@@ -173,58 +173,40 @@ var ViewportObserver = exports.default = /*#__PURE__*/function () {
|
|
|
173
173
|
ssrState.state = SSRStateEnum.normal;
|
|
174
174
|
case 19:
|
|
175
175
|
if (!_this.getSSRPlaceholderHandler) {
|
|
176
|
-
_context.next =
|
|
176
|
+
_context.next = 33;
|
|
177
177
|
break;
|
|
178
178
|
}
|
|
179
179
|
ssrPlaceholderHandler = _this.getSSRPlaceholderHandler();
|
|
180
180
|
if (!ssrPlaceholderHandler) {
|
|
181
|
-
_context.next =
|
|
181
|
+
_context.next = 33;
|
|
182
182
|
break;
|
|
183
183
|
}
|
|
184
184
|
if (!(ssrPlaceholderHandler.isPlaceholder(addedNode) || ssrPlaceholderHandler.isPlaceholderIgnored(addedNode))) {
|
|
185
|
-
_context.next =
|
|
186
|
-
break;
|
|
187
|
-
}
|
|
188
|
-
if (!(0, _platformFeatureFlags.fg)('platform_ufo_ssr_placeholder_resolution_ttvc_v3')) {
|
|
189
|
-
_context.next = 29;
|
|
185
|
+
_context.next = 26;
|
|
190
186
|
break;
|
|
191
187
|
}
|
|
192
188
|
if (!ssrPlaceholderHandler.checkIfExistedAndSizeMatchingV3(addedNode)) {
|
|
193
|
-
_context.next =
|
|
189
|
+
_context.next = 26;
|
|
194
190
|
break;
|
|
195
191
|
}
|
|
196
192
|
(_this$intersectionObs3 = _this.intersectionObserver) === null || _this$intersectionObs3 === void 0 || _this$intersectionObs3.watchAndTag(addedNode, 'mutation:ssr-placeholder');
|
|
197
193
|
return _context.abrupt("return", 0);
|
|
198
|
-
case
|
|
199
|
-
_context.next = 35;
|
|
200
|
-
break;
|
|
201
|
-
case 29:
|
|
202
|
-
_context.next = 31;
|
|
203
|
-
return ssrPlaceholderHandler.checkIfExistedAndSizeMatching(addedNode);
|
|
204
|
-
case 31:
|
|
205
|
-
result = _context.sent;
|
|
206
|
-
if (!(result !== false)) {
|
|
207
|
-
_context.next = 35;
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
210
|
-
(_this$intersectionObs4 = _this.intersectionObserver) === null || _this$intersectionObs4 === void 0 || _this$intersectionObs4.watchAndTag(addedNode, 'mutation:ssr-placeholder');
|
|
211
|
-
return _context.abrupt("return", 0);
|
|
212
|
-
case 35:
|
|
194
|
+
case 26:
|
|
213
195
|
if (!(ssrPlaceholderHandler.isPlaceholderReplacement(addedNode) || ssrPlaceholderHandler.isPlaceholderIgnored(addedNode))) {
|
|
214
|
-
_context.next =
|
|
196
|
+
_context.next = 33;
|
|
215
197
|
break;
|
|
216
198
|
}
|
|
217
|
-
_context.next =
|
|
199
|
+
_context.next = 29;
|
|
218
200
|
return ssrPlaceholderHandler.validateReactComponentMatchToPlaceholder(addedNode);
|
|
219
|
-
case
|
|
220
|
-
|
|
221
|
-
if (!(
|
|
222
|
-
_context.next =
|
|
201
|
+
case 29:
|
|
202
|
+
result = _context.sent;
|
|
203
|
+
if (!(result !== false)) {
|
|
204
|
+
_context.next = 33;
|
|
223
205
|
break;
|
|
224
206
|
}
|
|
225
|
-
(_this$
|
|
207
|
+
(_this$intersectionObs4 = _this.intersectionObserver) === null || _this$intersectionObs4 === void 0 || _this$intersectionObs4.watchAndTag(addedNode, 'mutation:ssr-placeholder');
|
|
226
208
|
return _context.abrupt("return", 0);
|
|
227
|
-
case
|
|
209
|
+
case 33:
|
|
228
210
|
sameDeletedNode = removedNodes.find(function (ref) {
|
|
229
211
|
var n = ref.deref();
|
|
230
212
|
if (!n || !addedNode) {
|
|
@@ -234,27 +216,27 @@ var ViewportObserver = exports.default = /*#__PURE__*/function () {
|
|
|
234
216
|
});
|
|
235
217
|
isInIgnoreLsMarker = (0, _isInVcIgnoreIfNoLayoutShiftMarker.default)(addedNode);
|
|
236
218
|
if (!(sameDeletedNode && isInIgnoreLsMarker)) {
|
|
237
|
-
_context.next =
|
|
219
|
+
_context.next = 38;
|
|
238
220
|
break;
|
|
239
221
|
}
|
|
240
|
-
(_this$
|
|
222
|
+
(_this$intersectionObs5 = _this.intersectionObserver) === null || _this$intersectionObs5 === void 0 || _this$intersectionObs5.watchAndTag(addedNode, 'mutation:remount');
|
|
241
223
|
return _context.abrupt("return", 0);
|
|
242
|
-
case
|
|
224
|
+
case 38:
|
|
243
225
|
if (!(0, _vcUtils.isContainedWithinMediaWrapper)(addedNode)) {
|
|
244
|
-
_context.next =
|
|
226
|
+
_context.next = 41;
|
|
245
227
|
break;
|
|
246
228
|
}
|
|
247
|
-
(_this$
|
|
229
|
+
(_this$intersectionObs6 = _this.intersectionObserver) === null || _this$intersectionObs6 === void 0 || _this$intersectionObs6.watchAndTag(addedNode, 'mutation:media');
|
|
248
230
|
return _context.abrupt("return", 0);
|
|
249
|
-
case
|
|
231
|
+
case 41:
|
|
250
232
|
_checkWithinComponent = (0, _checkWithinComponent2.default)(addedNode, 'UFOThirdPartySegment', _this.mapIs3pResult), isWithinThirdPartySegment = _checkWithinComponent.isWithin;
|
|
251
233
|
if (!isWithinThirdPartySegment) {
|
|
252
|
-
_context.next =
|
|
234
|
+
_context.next = 45;
|
|
253
235
|
break;
|
|
254
236
|
}
|
|
255
|
-
(_this$
|
|
237
|
+
(_this$intersectionObs7 = _this.intersectionObserver) === null || _this$intersectionObs7 === void 0 || _this$intersectionObs7.watchAndTag(addedNode, 'mutation:third-party-element');
|
|
256
238
|
return _context.abrupt("return", 0);
|
|
257
|
-
case
|
|
239
|
+
case 45:
|
|
258
240
|
if ((0, _platformFeatureFlags.fg)('platform_ufo_display_content_resolution_ttvc_v3')) {
|
|
259
241
|
// Check if the target has display:content css property, return array of valid targets
|
|
260
242
|
validTargets = (0, _checkDisplayContent.default)(addedNode);
|
|
@@ -262,7 +244,7 @@ var ViewportObserver = exports.default = /*#__PURE__*/function () {
|
|
|
262
244
|
try {
|
|
263
245
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
264
246
|
validTarget = _step2.value;
|
|
265
|
-
(_this$
|
|
247
|
+
(_this$intersectionObs8 = _this.intersectionObserver) === null || _this$intersectionObs8 === void 0 || _this$intersectionObs8.watchAndTag(validTarget, createElementMutationsWatcher(removedNodeRects));
|
|
266
248
|
}
|
|
267
249
|
} catch (err) {
|
|
268
250
|
_iterator2.e(err);
|
|
@@ -273,9 +255,9 @@ var ViewportObserver = exports.default = /*#__PURE__*/function () {
|
|
|
273
255
|
if ((0, _platformFeatureFlags.fg)('platform_ufo_display_content_track_occurrence')) {
|
|
274
256
|
(0, _trackDisplayContentOccurrence.default)(addedNode);
|
|
275
257
|
}
|
|
276
|
-
(_this$
|
|
258
|
+
(_this$intersectionObs9 = _this.intersectionObserver) === null || _this$intersectionObs9 === void 0 || _this$intersectionObs9.watchAndTag(addedNode, createElementMutationsWatcher(removedNodeRects));
|
|
277
259
|
}
|
|
278
|
-
case
|
|
260
|
+
case 46:
|
|
279
261
|
case "end":
|
|
280
262
|
return _context.stop();
|
|
281
263
|
}
|
|
@@ -320,12 +302,12 @@ var ViewportObserver = exports.default = /*#__PURE__*/function () {
|
|
|
320
302
|
};
|
|
321
303
|
}());
|
|
322
304
|
(0, _defineProperty2.default)(this, "handleAttributeMutation", function (_ref6) {
|
|
323
|
-
var _this$
|
|
305
|
+
var _this$intersectionObs0;
|
|
324
306
|
var target = _ref6.target,
|
|
325
307
|
attributeName = _ref6.attributeName,
|
|
326
308
|
oldValue = _ref6.oldValue,
|
|
327
309
|
newValue = _ref6.newValue;
|
|
328
|
-
(_this$
|
|
310
|
+
(_this$intersectionObs0 = _this.intersectionObserver) === null || _this$intersectionObs0 === void 0 || _this$intersectionObs0.watchAndTag(target, function (_ref7) {
|
|
329
311
|
var target = _ref7.target,
|
|
330
312
|
rect = _ref7.rect;
|
|
331
313
|
if ((0, _vcUtils.isContainedWithinMediaWrapper)(target)) {
|
|
@@ -465,12 +447,12 @@ var ViewportObserver = exports.default = /*#__PURE__*/function () {
|
|
|
465
447
|
}, {
|
|
466
448
|
key: "stop",
|
|
467
449
|
value: function stop() {
|
|
468
|
-
var _this$mutationObserve2, _this$
|
|
450
|
+
var _this$mutationObserve2, _this$intersectionObs1, _this$performanceObse2;
|
|
469
451
|
if (!this.isStarted) {
|
|
470
452
|
return;
|
|
471
453
|
}
|
|
472
454
|
(_this$mutationObserve2 = this.mutationObserver) === null || _this$mutationObserve2 === void 0 || _this$mutationObserve2.disconnect();
|
|
473
|
-
(_this$
|
|
455
|
+
(_this$intersectionObs1 = this.intersectionObserver) === null || _this$intersectionObs1 === void 0 || _this$intersectionObs1.disconnect();
|
|
474
456
|
(_this$performanceObse2 = this.performanceObserver) === null || _this$performanceObse2 === void 0 || _this$performanceObse2.disconnect();
|
|
475
457
|
this.isStarted = false;
|
|
476
458
|
// Clean up caches when stopping
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
2
|
import coinflip from '../coinflip';
|
|
3
|
-
import { DEFAULT_TTVC_REVISION, getConfig, getExtraInteractionRate
|
|
3
|
+
import { DEFAULT_TTVC_REVISION, getConfig, getExtraInteractionRate } from '../config';
|
|
4
4
|
import { buildSegmentTree, getOldSegmentsLabelStack, optimizeLabelStack, sanitizeUfoName } from '../create-payload/common/utils';
|
|
5
5
|
import { getMoreAccuratePageVisibilityUpToTTAI } from '../create-payload/utils/get-more-accurate-page-visibility-up-to-ttai';
|
|
6
6
|
import getPageVisibilityUpToTTAI from '../create-payload/utils/get-page-visibility-up-to-ttai';
|
|
@@ -17,7 +17,7 @@ import { optimizeRequestInfo } from '../create-payload/utils/optimize-request-in
|
|
|
17
17
|
import { optimizeSpans } from '../create-payload/utils/optimize-spans';
|
|
18
18
|
import { interactionSpans as atlaskitInteractionSpans } from '../interaction-metrics';
|
|
19
19
|
async function createInteractionExtraLogPayload(interactionId, interaction) {
|
|
20
|
-
var _getTTAI,
|
|
20
|
+
var _getTTAI, _window$location;
|
|
21
21
|
const config = getConfig();
|
|
22
22
|
if (!config) {
|
|
23
23
|
throw Error('UFO Configuration not provided');
|
|
@@ -50,9 +50,17 @@ async function createInteractionExtraLogPayload(interactionId, interaction) {
|
|
|
50
50
|
const moreAccuratePageVisibilityAtTTAI = calculatePageVisibilityFromTheStartOfPageLoad ? getMoreAccuratePageVisibilityUpToTTAI(interaction) : null;
|
|
51
51
|
const extraTTAI = (_getTTAI = getTTAI(interaction)) !== null && _getTTAI !== void 0 ? _getTTAI : undefined;
|
|
52
52
|
const newUFOName = sanitizeUfoName(ufoName);
|
|
53
|
-
const mostRecentVCRevision = (_getMostRecentVCRevis = getMostRecentVCRevision(newUFOName)) !== null && _getMostRecentVCRevis !== void 0 ? _getMostRecentVCRevis : DEFAULT_TTVC_REVISION;
|
|
54
53
|
const finalVCMetrics = await getVCMetrics(interaction, true);
|
|
55
54
|
|
|
55
|
+
// Check if VC is clean and has valid metric
|
|
56
|
+
const vcRevisionPayload = finalVCMetrics === null || finalVCMetrics === void 0 ? void 0 : finalVCMetrics['ufo:vc:rev'];
|
|
57
|
+
const effectiveVCRevisionPayload = vcRevisionPayload === null || vcRevisionPayload === void 0 ? void 0 : vcRevisionPayload.find(({
|
|
58
|
+
revision
|
|
59
|
+
}) => revision === DEFAULT_TTVC_REVISION);
|
|
60
|
+
if (!(effectiveVCRevisionPayload !== null && effectiveVCRevisionPayload !== void 0 && effectiveVCRevisionPayload.clean) || (effectiveVCRevisionPayload === null || effectiveVCRevisionPayload === void 0 ? void 0 : effectiveVCRevisionPayload['metric:vc90']) === undefined) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
|
|
56
64
|
// Helper function to check if labelStack contains third-party type
|
|
57
65
|
const isThirdParty = labelStack => {
|
|
58
66
|
var _labelStack$some;
|
|
@@ -140,7 +148,7 @@ async function createInteractionExtraLogPayload(interactionId, interaction) {
|
|
|
140
148
|
customData: filteredData.customData,
|
|
141
149
|
...getDetailedInteractionMetrics()
|
|
142
150
|
},
|
|
143
|
-
'vc:effective:revision':
|
|
151
|
+
'vc:effective:revision': DEFAULT_TTVC_REVISION
|
|
144
152
|
}
|
|
145
153
|
}
|
|
146
154
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { v4 as createUUID } from 'uuid';
|
|
2
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
3
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import coinflip from '../coinflip';
|
|
5
4
|
import { getAwaitBM3TTIList, getCapabilityRate, getConfig, getExperimentalInteractionRate, getExtraInteractionRate, getInteractionTimeout, getPostInteractionRate, getReactHydrationStats } from '../config';
|
|
@@ -805,16 +804,6 @@ function callCancelCallbacks(interaction) {
|
|
|
805
804
|
});
|
|
806
805
|
}
|
|
807
806
|
export function abort(interactionId, abortReason) {
|
|
808
|
-
var _FeatureGates$getExpe;
|
|
809
|
-
const activeInteraction = getActiveInteraction();
|
|
810
|
-
if (
|
|
811
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
812
|
-
abortReason === 'new_interaction' && fg('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
|
|
813
|
-
// ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
|
|
814
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
815
|
-
(_FeatureGates$getExpe = FeatureGates.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe !== void 0 && _FeatureGates$getExpe.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
|
|
816
|
-
return;
|
|
817
|
-
}
|
|
818
807
|
const interaction = interactions.get(interactionId);
|
|
819
808
|
if (interaction != null) {
|
|
820
809
|
callCancelCallbacks(interaction);
|
|
@@ -832,16 +821,6 @@ export function abort(interactionId, abortReason) {
|
|
|
832
821
|
}
|
|
833
822
|
}
|
|
834
823
|
export function abortByNewInteraction(interactionId, interactionName) {
|
|
835
|
-
var _FeatureGates$getExpe2;
|
|
836
|
-
const activeInteraction = getActiveInteraction();
|
|
837
|
-
if (
|
|
838
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
839
|
-
fg('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
|
|
840
|
-
// ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
|
|
841
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
842
|
-
(_FeatureGates$getExpe2 = FeatureGates.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe2 !== void 0 && _FeatureGates$getExpe2.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
|
|
843
|
-
return;
|
|
844
|
-
}
|
|
845
824
|
const interaction = interactions.get(interactionId);
|
|
846
825
|
if (interaction != null) {
|
|
847
826
|
callCancelCallbacks(interaction);
|
|
@@ -860,16 +839,6 @@ export function abortByNewInteraction(interactionId, interactionName) {
|
|
|
860
839
|
}
|
|
861
840
|
}
|
|
862
841
|
export function abortAll(abortReason, abortedByInteractionName) {
|
|
863
|
-
var _FeatureGates$getExpe3;
|
|
864
|
-
const activeInteraction = getActiveInteraction();
|
|
865
|
-
if (
|
|
866
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
867
|
-
abortReason === 'new_interaction' && fg('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
|
|
868
|
-
// ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
|
|
869
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
870
|
-
(_FeatureGates$getExpe3 = FeatureGates.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe3 !== void 0 && _FeatureGates$getExpe3.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
|
|
871
|
-
return;
|
|
872
|
-
}
|
|
873
842
|
interactions.forEach((interaction, interactionId) => {
|
|
874
843
|
const noMoreHolds = interaction.holdActive.size === 0;
|
|
875
844
|
if (!noMoreHolds) {
|