@atlaskit/react-ufo 4.7.2 → 4.7.4
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 +18 -0
- package/dist/cjs/config/index.js +17 -2
- package/dist/cjs/create-interaction-extra-metrics-payload/index.js +21 -10
- package/dist/cjs/interaction-metrics/index.js +7 -32
- package/dist/cjs/vc/vc-observer/index.js +6 -27
- package/dist/cjs/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +3 -4
- package/dist/cjs/vc/vc-observer-new/metric-calculator/fy25_03/index.js +4 -10
- package/dist/es2019/config/index.js +15 -0
- package/dist/es2019/create-interaction-extra-metrics-payload/index.js +12 -4
- package/dist/es2019/interaction-metrics/index.js +8 -33
- package/dist/es2019/vc/vc-observer/index.js +18 -42
- package/dist/es2019/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +1 -3
- package/dist/es2019/vc/vc-observer-new/metric-calculator/fy25_03/index.js +2 -6
- package/dist/esm/config/index.js +16 -2
- package/dist/esm/create-interaction-extra-metrics-payload/index.js +22 -11
- package/dist/esm/interaction-metrics/index.js +8 -33
- package/dist/esm/vc/vc-observer/index.js +6 -27
- package/dist/esm/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +3 -4
- package/dist/esm/vc/vc-observer-new/metric-calculator/fy25_03/index.js +4 -10
- package/dist/types/config/index.d.ts +2 -0
- 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/config/index.d.ts +2 -0
- 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 +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 4.7.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5c0461336c286`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5c0461336c286) -
|
|
8
|
+
Add config to set finish on transition
|
|
9
|
+
|
|
10
|
+
## 4.7.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`0a9ee11a008bd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0a9ee11a008bd) -
|
|
15
|
+
FG cleanup - platform_ufo_abort_timestamp_by_revision
|
|
16
|
+
- [`8127ae8dc5d5b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8127ae8dc5d5b) -
|
|
17
|
+
FG cleanup - ufo_disable_aborted_new_interaction_on_confluence
|
|
18
|
+
- [`53e3c6f5e41ac`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/53e3c6f5e41ac) -
|
|
19
|
+
Check vc clean before sending custom.interaction-extra-metrics
|
|
20
|
+
|
|
3
21
|
## 4.7.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/cjs/config/index.js
CHANGED
|
@@ -13,6 +13,7 @@ exports.getDoNotAbortActivePressInteractionOnTransition = getDoNotAbortActivePre
|
|
|
13
13
|
exports.getEnabledVCRevisions = getEnabledVCRevisions;
|
|
14
14
|
exports.getExperimentalInteractionRate = getExperimentalInteractionRate;
|
|
15
15
|
exports.getExtraInteractionRate = getExtraInteractionRate;
|
|
16
|
+
exports.getFinishInteractionOnTransition = getFinishInteractionOnTransition;
|
|
16
17
|
exports.getInteractionRate = getInteractionRate;
|
|
17
18
|
exports.getInteractionTimeout = getInteractionTimeout;
|
|
18
19
|
exports.getMinorInteractions = getMinorInteractions;
|
|
@@ -340,14 +341,28 @@ function getDoNotAbortActivePressInteractionOnTransition() {
|
|
|
340
341
|
return undefined;
|
|
341
342
|
}
|
|
342
343
|
}
|
|
344
|
+
|
|
345
|
+
// Contains the list of interactions that do not abort on transitions
|
|
346
|
+
function getFinishInteractionOnTransition() {
|
|
347
|
+
try {
|
|
348
|
+
if (!config) {
|
|
349
|
+
return undefined;
|
|
350
|
+
}
|
|
351
|
+
var _config1 = config,
|
|
352
|
+
finishInteractionOnTransition = _config1.finishInteractionOnTransition;
|
|
353
|
+
return finishInteractionOnTransition;
|
|
354
|
+
} catch (e) {
|
|
355
|
+
return undefined;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
343
358
|
var CLEANUP_TIMEOUT = exports.CLEANUP_TIMEOUT = 60 * 1000;
|
|
344
359
|
function getInteractionTimeout(ufoName) {
|
|
345
360
|
try {
|
|
346
361
|
if (!config) {
|
|
347
362
|
return CLEANUP_TIMEOUT;
|
|
348
363
|
}
|
|
349
|
-
var
|
|
350
|
-
interactionTimeout =
|
|
364
|
+
var _config10 = config,
|
|
365
|
+
interactionTimeout = _config10.interactionTimeout;
|
|
351
366
|
if (interactionTimeout != null && interactionTimeout[ufoName] != null) {
|
|
352
367
|
return interactionTimeout[ufoName];
|
|
353
368
|
}
|
|
@@ -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,19 +960,15 @@ function abortByNewInteraction(interactionId, interactionName) {
|
|
|
981
960
|
}
|
|
982
961
|
}
|
|
983
962
|
function abortAll(abortReason, abortedByInteractionName) {
|
|
984
|
-
var _FeatureGates$getExpe3;
|
|
985
963
|
var activeInteraction = getActiveInteraction();
|
|
986
|
-
|
|
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
|
-
}
|
|
964
|
+
var finishInteractions = (0, _config.getFinishInteractionOnTransition)();
|
|
994
965
|
_constants.interactions.forEach(function (interaction, interactionId) {
|
|
995
|
-
var
|
|
996
|
-
|
|
966
|
+
var isActiveInteraction = activeInteraction === interaction;
|
|
967
|
+
var hasFinished = interaction.holdActive.size === 0;
|
|
968
|
+
if (isActiveInteraction && abortReason === 'transition' && interaction.type === 'press' && finishInteractions !== null && finishInteractions !== void 0 && finishInteractions.includes(interaction.ufoName) && (0, _platformFeatureFlags.fg)('platform_ufo_enable_finish_interaction_transition')) {
|
|
969
|
+
hasFinished = true;
|
|
970
|
+
}
|
|
971
|
+
if (!hasFinished) {
|
|
997
972
|
callCancelCallbacks(interaction);
|
|
998
973
|
interaction.abortReason = abortReason;
|
|
999
974
|
if (abortedByInteractionName != null) {
|
|
@@ -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
|
}
|
|
@@ -395,14 +395,13 @@ var AbstractVCCalculatorBase = exports.default = /*#__PURE__*/function () {
|
|
|
395
395
|
_context2.next = 7;
|
|
396
396
|
break;
|
|
397
397
|
}
|
|
398
|
-
return _context2.abrupt("return",
|
|
398
|
+
return _context2.abrupt("return", {
|
|
399
399
|
revision: this.revisionNo,
|
|
400
400
|
'metric:vc90': null,
|
|
401
401
|
clean: false,
|
|
402
|
-
abortReason: dirtyReason
|
|
403
|
-
}, (0, _platformFeatureFlags.fg)('platform_ufo_abort_timestamp_by_revision') ? {
|
|
402
|
+
abortReason: dirtyReason,
|
|
404
403
|
abortTimestamp: getVCCleanStatusResult.abortTimestamp
|
|
405
|
-
}
|
|
404
|
+
});
|
|
406
405
|
case 7:
|
|
407
406
|
_context2.next = 9;
|
|
408
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
|
|
@@ -323,6 +323,21 @@ export function getDoNotAbortActivePressInteractionOnTransition() {
|
|
|
323
323
|
return undefined;
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
+
|
|
327
|
+
// Contains the list of interactions that do not abort on transitions
|
|
328
|
+
export function getFinishInteractionOnTransition() {
|
|
329
|
+
try {
|
|
330
|
+
if (!config) {
|
|
331
|
+
return undefined;
|
|
332
|
+
}
|
|
333
|
+
const {
|
|
334
|
+
finishInteractionOnTransition
|
|
335
|
+
} = config;
|
|
336
|
+
return finishInteractionOnTransition;
|
|
337
|
+
} catch (e) {
|
|
338
|
+
return undefined;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
326
341
|
export const CLEANUP_TIMEOUT = 60 * 1000;
|
|
327
342
|
export function getInteractionTimeout(ufoName) {
|
|
328
343
|
try {
|
|
@@ -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,8 +1,7 @@
|
|
|
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
|
-
import { getAwaitBM3TTIList, getCapabilityRate, getConfig, getExperimentalInteractionRate, getExtraInteractionRate, getInteractionTimeout, getPostInteractionRate, getReactHydrationStats } from '../config';
|
|
4
|
+
import { getAwaitBM3TTIList, getCapabilityRate, getConfig, getExperimentalInteractionRate, getExtraInteractionRate, getFinishInteractionOnTransition, getInteractionTimeout, getPostInteractionRate, getReactHydrationStats } from '../config';
|
|
6
5
|
import { experimentalVC, getExperimentalVCMetrics, onExperimentalInteractionComplete } from '../create-experimental-interaction-metrics-payload';
|
|
7
6
|
import { sanitizeUfoName, stringifyLabelStackFully } from '../create-payload/common/utils';
|
|
8
7
|
import { clearActiveTrace } from '../experience-trace-id-context';
|
|
@@ -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,19 +839,15 @@ export function abortByNewInteraction(interactionId, interactionName) {
|
|
|
860
839
|
}
|
|
861
840
|
}
|
|
862
841
|
export function abortAll(abortReason, abortedByInteractionName) {
|
|
863
|
-
var _FeatureGates$getExpe3;
|
|
864
842
|
const activeInteraction = getActiveInteraction();
|
|
865
|
-
|
|
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
|
-
}
|
|
843
|
+
const finishInteractions = getFinishInteractionOnTransition();
|
|
873
844
|
interactions.forEach((interaction, interactionId) => {
|
|
874
|
-
const
|
|
875
|
-
|
|
845
|
+
const isActiveInteraction = activeInteraction === interaction;
|
|
846
|
+
let hasFinished = interaction.holdActive.size === 0;
|
|
847
|
+
if (isActiveInteraction && abortReason === 'transition' && interaction.type === 'press' && finishInteractions !== null && finishInteractions !== void 0 && finishInteractions.includes(interaction.ufoName) && fg('platform_ufo_enable_finish_interaction_transition')) {
|
|
848
|
+
hasFinished = true;
|
|
849
|
+
}
|
|
850
|
+
if (!hasFinished) {
|
|
876
851
|
callCancelCallbacks(interaction);
|
|
877
852
|
interaction.abortReason = abortReason;
|
|
878
853
|
if (abortedByInteractionName != null) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import { isVCRevisionEnabled } from '../../config';
|
|
4
3
|
import { getActiveInteraction } from '../../interaction-metrics';
|
|
5
4
|
import { attachAbortListeners } from './attachAbortListeners';
|
|
@@ -124,48 +123,25 @@ export class VCObserver {
|
|
|
124
123
|
window.__vcNotAvailableReason = abortReasonInfo;
|
|
125
124
|
}
|
|
126
125
|
} catch (e) {}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
return vcAbortedResultWithRevisions;
|
|
147
|
-
} else {
|
|
148
|
-
const vcAbortedResultWithRevisions = {
|
|
149
|
-
[`${fullPrefix}vc:state`]: false,
|
|
150
|
-
[`${fullPrefix}vc:abort:reason`]: abortReason.reason,
|
|
151
|
-
[`${fullPrefix}vc:abort:timestamp`]: abortReason.timestamp,
|
|
152
|
-
[`${fullPrefix}vc:rev`]: [{
|
|
153
|
-
revision: 'fy25.02',
|
|
154
|
-
clean: false,
|
|
155
|
-
'metric:vc90': null,
|
|
156
|
-
abortReason: abortReason.reason
|
|
157
|
-
}]
|
|
158
|
-
};
|
|
159
|
-
if (!isTTVCv1Disabled) {
|
|
160
|
-
vcAbortedResultWithRevisions[`${fullPrefix}vc:rev`].push({
|
|
161
|
-
revision: 'fy25.01',
|
|
162
|
-
clean: false,
|
|
163
|
-
'metric:vc90': null,
|
|
164
|
-
abortReason: abortReason.reason
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
return vcAbortedResultWithRevisions;
|
|
126
|
+
const vcAbortedResultWithRevisions = {
|
|
127
|
+
[`${fullPrefix}vc:rev`]: [{
|
|
128
|
+
revision: 'fy25.02',
|
|
129
|
+
clean: false,
|
|
130
|
+
'metric:vc90': null,
|
|
131
|
+
abortReason: abortReason.reason,
|
|
132
|
+
abortTimestamp: Math.round(abortReason.timestamp)
|
|
133
|
+
}]
|
|
134
|
+
};
|
|
135
|
+
if (!isTTVCv1Disabled) {
|
|
136
|
+
vcAbortedResultWithRevisions[`${fullPrefix}vc:rev`].push({
|
|
137
|
+
revision: 'fy25.01',
|
|
138
|
+
clean: false,
|
|
139
|
+
'metric:vc90': null,
|
|
140
|
+
abortReason: abortReason.reason,
|
|
141
|
+
abortTimestamp: Math.round(abortReason.timestamp)
|
|
142
|
+
});
|
|
168
143
|
}
|
|
144
|
+
return vcAbortedResultWithRevisions;
|
|
169
145
|
}
|
|
170
146
|
const ttvcV1Result = isTTVCv1Disabled ? {
|
|
171
147
|
VC: {},
|
|
@@ -286,9 +286,7 @@ export default class AbstractVCCalculatorBase {
|
|
|
286
286
|
'metric:vc90': null,
|
|
287
287
|
clean: false,
|
|
288
288
|
abortReason: dirtyReason,
|
|
289
|
-
|
|
290
|
-
abortTimestamp: getVCCleanStatusResult.abortTimestamp
|
|
291
|
-
} : {})
|
|
289
|
+
abortTimestamp: getVCCleanStatusResult.abortTimestamp
|
|
292
290
|
};
|
|
293
291
|
}
|
|
294
292
|
const vcDetails = await this.calculateWithDebugInfo(filteredEntries, startTime, stopTime, isPostInteraction, isVCClean, interactionId, dirtyReason, orderedEntries, include3p);
|
|
@@ -61,9 +61,7 @@ export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
|
|
|
61
61
|
const data = entry.data;
|
|
62
62
|
if (ABORTING_WINDOW_EVENT.includes(data.eventType)) {
|
|
63
63
|
dirtyReason = data.eventType === 'keydown' ? 'keypress' : data.eventType;
|
|
64
|
-
|
|
65
|
-
abortTimestamp = Math.round(entry.time);
|
|
66
|
-
}
|
|
64
|
+
abortTimestamp = Math.round(entry.time);
|
|
67
65
|
return true;
|
|
68
66
|
}
|
|
69
67
|
}
|
|
@@ -73,9 +71,7 @@ export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
|
|
|
73
71
|
return {
|
|
74
72
|
isVCClean: false,
|
|
75
73
|
dirtyReason,
|
|
76
|
-
|
|
77
|
-
abortTimestamp
|
|
78
|
-
} : {})
|
|
74
|
+
abortTimestamp
|
|
79
75
|
};
|
|
80
76
|
}
|
|
81
77
|
return {
|
package/dist/esm/config/index.js
CHANGED
|
@@ -315,14 +315,28 @@ export function getDoNotAbortActivePressInteractionOnTransition() {
|
|
|
315
315
|
return undefined;
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
+
|
|
319
|
+
// Contains the list of interactions that do not abort on transitions
|
|
320
|
+
export function getFinishInteractionOnTransition() {
|
|
321
|
+
try {
|
|
322
|
+
if (!config) {
|
|
323
|
+
return undefined;
|
|
324
|
+
}
|
|
325
|
+
var _config1 = config,
|
|
326
|
+
finishInteractionOnTransition = _config1.finishInteractionOnTransition;
|
|
327
|
+
return finishInteractionOnTransition;
|
|
328
|
+
} catch (e) {
|
|
329
|
+
return undefined;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
318
332
|
export var CLEANUP_TIMEOUT = 60 * 1000;
|
|
319
333
|
export function getInteractionTimeout(ufoName) {
|
|
320
334
|
try {
|
|
321
335
|
if (!config) {
|
|
322
336
|
return CLEANUP_TIMEOUT;
|
|
323
337
|
}
|
|
324
|
-
var
|
|
325
|
-
interactionTimeout =
|
|
338
|
+
var _config10 = config,
|
|
339
|
+
interactionTimeout = _config10.interactionTimeout;
|
|
326
340
|
if (interactionTimeout != null && interactionTimeout[ufoName] != null) {
|
|
327
341
|
return interactionTimeout[ufoName];
|
|
328
342
|
}
|
|
@@ -8,7 +8,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
8
8
|
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) { _defineProperty(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; }
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
10
|
import coinflip from '../coinflip';
|
|
11
|
-
import { DEFAULT_TTVC_REVISION, getConfig, getExtraInteractionRate
|
|
11
|
+
import { DEFAULT_TTVC_REVISION, getConfig, getExtraInteractionRate } from '../config';
|
|
12
12
|
import { buildSegmentTree, getOldSegmentsLabelStack, optimizeLabelStack, sanitizeUfoName } from '../create-payload/common/utils';
|
|
13
13
|
import { getMoreAccuratePageVisibilityUpToTTAI } from '../create-payload/utils/get-more-accurate-page-visibility-up-to-ttai';
|
|
14
14
|
import getPageVisibilityUpToTTAI from '../create-payload/utils/get-page-visibility-up-to-ttai';
|
|
@@ -29,8 +29,8 @@ function createInteractionExtraLogPayload(_x, _x2) {
|
|
|
29
29
|
}
|
|
30
30
|
function _createInteractionExtraLogPayload() {
|
|
31
31
|
_createInteractionExtraLogPayload = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(interactionId, interaction) {
|
|
32
|
-
var _getTTAI,
|
|
33
|
-
var config, end, start, ufoName, rate, type, abortReason, routeName, previousInteractionName, isPreviousInteractionAborted, abortedByInteractionName, knownSegments, sanitisedUfoName, configRate, pageVisibilityAtTTAI, isPageLoad, calculatePageVisibilityFromTheStartOfPageLoad, moreAccuratePageVisibilityAtTTAI, extraTTAI, newUFOName,
|
|
32
|
+
var _getTTAI, _window$location;
|
|
33
|
+
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;
|
|
34
34
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
35
35
|
while (1) switch (_context.prev = _context.next) {
|
|
36
36
|
case 0:
|
|
@@ -62,11 +62,22 @@ function _createInteractionExtraLogPayload() {
|
|
|
62
62
|
moreAccuratePageVisibilityAtTTAI = calculatePageVisibilityFromTheStartOfPageLoad ? getMoreAccuratePageVisibilityUpToTTAI(interaction) : null;
|
|
63
63
|
extraTTAI = (_getTTAI = getTTAI(interaction)) !== null && _getTTAI !== void 0 ? _getTTAI : undefined;
|
|
64
64
|
newUFOName = sanitizeUfoName(ufoName);
|
|
65
|
-
|
|
66
|
-
_context.next = 19;
|
|
65
|
+
_context.next = 18;
|
|
67
66
|
return getVCMetrics(interaction, true);
|
|
68
|
-
case
|
|
67
|
+
case 18:
|
|
69
68
|
finalVCMetrics = _context.sent;
|
|
69
|
+
// Check if VC is clean and has valid metric
|
|
70
|
+
vcRevisionPayload = finalVCMetrics === null || finalVCMetrics === void 0 ? void 0 : finalVCMetrics['ufo:vc:rev'];
|
|
71
|
+
effectiveVCRevisionPayload = vcRevisionPayload === null || vcRevisionPayload === void 0 ? void 0 : vcRevisionPayload.find(function (_ref) {
|
|
72
|
+
var revision = _ref.revision;
|
|
73
|
+
return revision === DEFAULT_TTVC_REVISION;
|
|
74
|
+
});
|
|
75
|
+
if (!(!(effectiveVCRevisionPayload !== null && effectiveVCRevisionPayload !== void 0 && effectiveVCRevisionPayload.clean) || (effectiveVCRevisionPayload === null || effectiveVCRevisionPayload === void 0 ? void 0 : effectiveVCRevisionPayload['metric:vc90']) === undefined)) {
|
|
76
|
+
_context.next = 23;
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
return _context.abrupt("return", null);
|
|
80
|
+
case 23:
|
|
70
81
|
// Helper function to check if labelStack contains third-party type
|
|
71
82
|
isThirdParty = function isThirdParty(labelStack) {
|
|
72
83
|
var _labelStack$some;
|
|
@@ -109,9 +120,9 @@ function _createInteractionExtraLogPayload() {
|
|
|
109
120
|
getDetailedInteractionMetrics = function getDetailedInteractionMetrics() {
|
|
110
121
|
var _interaction$hold3pIn;
|
|
111
122
|
return {
|
|
112
|
-
errors: filteredData.errors.map(function (
|
|
113
|
-
var labelStack =
|
|
114
|
-
others = _objectWithoutProperties(
|
|
123
|
+
errors: filteredData.errors.map(function (_ref2) {
|
|
124
|
+
var labelStack = _ref2.labelStack,
|
|
125
|
+
others = _objectWithoutProperties(_ref2, _excluded);
|
|
115
126
|
return _objectSpread(_objectSpread({}, others), {}, {
|
|
116
127
|
labelStack: labelStack && optimizeLabelStack(labelStack, getReactUFOPayloadVersion(interaction.type))
|
|
117
128
|
});
|
|
@@ -172,13 +183,13 @@ function _createInteractionExtraLogPayload() {
|
|
|
172
183
|
reactProfilerTimings: optimizeReactProfilerTimings(filteredData.reactProfilerTimings, start, getReactUFOPayloadVersion(interaction.type)),
|
|
173
184
|
customData: filteredData.customData
|
|
174
185
|
}, getDetailedInteractionMetrics()),
|
|
175
|
-
'vc:effective:revision':
|
|
186
|
+
'vc:effective:revision': DEFAULT_TTVC_REVISION
|
|
176
187
|
}
|
|
177
188
|
}
|
|
178
189
|
};
|
|
179
190
|
payload.attributes.properties['event:sizeInKb'] = getPayloadSize(payload.attributes.properties);
|
|
180
191
|
return _context.abrupt("return", payload);
|
|
181
|
-
case
|
|
192
|
+
case 32:
|
|
182
193
|
case "end":
|
|
183
194
|
return _context.stop();
|
|
184
195
|
}
|
|
@@ -9,10 +9,9 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
|
|
|
9
9
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
10
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
11
|
import { v4 as createUUID } from 'uuid';
|
|
12
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
13
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
13
|
import coinflip from '../coinflip';
|
|
15
|
-
import { getAwaitBM3TTIList, getCapabilityRate, getConfig, getExperimentalInteractionRate, getExtraInteractionRate, getInteractionTimeout, getPostInteractionRate, getReactHydrationStats } from '../config';
|
|
14
|
+
import { getAwaitBM3TTIList, getCapabilityRate, getConfig, getExperimentalInteractionRate, getExtraInteractionRate, getFinishInteractionOnTransition, getInteractionTimeout, getPostInteractionRate, getReactHydrationStats } from '../config';
|
|
16
15
|
import { experimentalVC, getExperimentalVCMetrics, onExperimentalInteractionComplete } from '../create-experimental-interaction-metrics-payload';
|
|
17
16
|
import { sanitizeUfoName, stringifyLabelStackFully } from '../create-payload/common/utils';
|
|
18
17
|
import { clearActiveTrace } from '../experience-trace-id-context';
|
|
@@ -880,16 +879,6 @@ function callCancelCallbacks(interaction) {
|
|
|
880
879
|
});
|
|
881
880
|
}
|
|
882
881
|
export function abort(interactionId, abortReason) {
|
|
883
|
-
var _FeatureGates$getExpe;
|
|
884
|
-
var activeInteraction = getActiveInteraction();
|
|
885
|
-
if (
|
|
886
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
887
|
-
abortReason === 'new_interaction' && fg('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
|
|
888
|
-
// ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
|
|
889
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
890
|
-
(_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) || '')) {
|
|
891
|
-
return;
|
|
892
|
-
}
|
|
893
882
|
var interaction = interactions.get(interactionId);
|
|
894
883
|
if (interaction != null) {
|
|
895
884
|
callCancelCallbacks(interaction);
|
|
@@ -907,16 +896,6 @@ export function abort(interactionId, abortReason) {
|
|
|
907
896
|
}
|
|
908
897
|
}
|
|
909
898
|
export function abortByNewInteraction(interactionId, interactionName) {
|
|
910
|
-
var _FeatureGates$getExpe2;
|
|
911
|
-
var activeInteraction = getActiveInteraction();
|
|
912
|
-
if (
|
|
913
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
914
|
-
fg('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
|
|
915
|
-
// ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
|
|
916
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
917
|
-
(_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) || '')) {
|
|
918
|
-
return;
|
|
919
|
-
}
|
|
920
899
|
var interaction = interactions.get(interactionId);
|
|
921
900
|
if (interaction != null) {
|
|
922
901
|
callCancelCallbacks(interaction);
|
|
@@ -935,19 +914,15 @@ export function abortByNewInteraction(interactionId, interactionName) {
|
|
|
935
914
|
}
|
|
936
915
|
}
|
|
937
916
|
export function abortAll(abortReason, abortedByInteractionName) {
|
|
938
|
-
var _FeatureGates$getExpe3;
|
|
939
917
|
var activeInteraction = getActiveInteraction();
|
|
940
|
-
|
|
941
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
942
|
-
abortReason === 'new_interaction' && fg('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
|
|
943
|
-
// ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
|
|
944
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
945
|
-
(_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) || '')) {
|
|
946
|
-
return;
|
|
947
|
-
}
|
|
918
|
+
var finishInteractions = getFinishInteractionOnTransition();
|
|
948
919
|
interactions.forEach(function (interaction, interactionId) {
|
|
949
|
-
var
|
|
950
|
-
|
|
920
|
+
var isActiveInteraction = activeInteraction === interaction;
|
|
921
|
+
var hasFinished = interaction.holdActive.size === 0;
|
|
922
|
+
if (isActiveInteraction && abortReason === 'transition' && interaction.type === 'press' && finishInteractions !== null && finishInteractions !== void 0 && finishInteractions.includes(interaction.ufoName) && fg('platform_ufo_enable_finish_interaction_transition')) {
|
|
923
|
+
hasFinished = true;
|
|
924
|
+
}
|
|
925
|
+
if (!hasFinished) {
|
|
951
926
|
callCancelCallbacks(interaction);
|
|
952
927
|
interaction.abortReason = abortReason;
|
|
953
928
|
if (abortedByInteractionName != null) {
|
|
@@ -9,7 +9,6 @@ var _excluded = ["__debug__element"];
|
|
|
9
9
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
10
|
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; }
|
|
11
11
|
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) { _defineProperty(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; }
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
import { isVCRevisionEnabled } from '../../config';
|
|
14
13
|
import { getActiveInteraction } from '../../interaction-metrics';
|
|
15
14
|
import { attachAbortListeners } from './attachAbortListeners';
|
|
@@ -96,7 +95,7 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
96
95
|
});
|
|
97
96
|
_defineProperty(this, "getVCResult", /*#__PURE__*/function () {
|
|
98
97
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3) {
|
|
99
|
-
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,
|
|
98
|
+
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;
|
|
100
99
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
101
100
|
while (1) switch (_context.prev = _context.next) {
|
|
102
101
|
case 0:
|
|
@@ -113,7 +112,7 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
113
112
|
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;
|
|
114
113
|
isTTVCv1Disabled = !isVCRevisionEnabled('fy25.01', experienceKey);
|
|
115
114
|
if (!(abortReasonInfo !== null)) {
|
|
116
|
-
_context.next =
|
|
115
|
+
_context.next = 13;
|
|
117
116
|
break;
|
|
118
117
|
}
|
|
119
118
|
// exposing data to devtools
|
|
@@ -122,10 +121,6 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
122
121
|
window.__vcNotAvailableReason = abortReasonInfo;
|
|
123
122
|
}
|
|
124
123
|
} catch (e) {}
|
|
125
|
-
if (!fg('platform_ufo_abort_timestamp_by_revision')) {
|
|
126
|
-
_context.next = 16;
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
124
|
vcAbortedResultWithRevisions = _defineProperty({}, "".concat(fullPrefix, "vc:rev"), [{
|
|
130
125
|
revision: 'fy25.02',
|
|
131
126
|
clean: false,
|
|
@@ -143,23 +138,7 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
143
138
|
});
|
|
144
139
|
}
|
|
145
140
|
return _context.abrupt("return", vcAbortedResultWithRevisions);
|
|
146
|
-
case
|
|
147
|
-
_vcAbortedResultWithRevisions = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:state"), false), "".concat(fullPrefix, "vc:abort:reason"), abortReason.reason), "".concat(fullPrefix, "vc:abort:timestamp"), abortReason.timestamp), "".concat(fullPrefix, "vc:rev"), [{
|
|
148
|
-
revision: 'fy25.02',
|
|
149
|
-
clean: false,
|
|
150
|
-
'metric:vc90': null,
|
|
151
|
-
abortReason: abortReason.reason
|
|
152
|
-
}]);
|
|
153
|
-
if (!isTTVCv1Disabled) {
|
|
154
|
-
_vcAbortedResultWithRevisions["".concat(fullPrefix, "vc:rev")].push({
|
|
155
|
-
revision: 'fy25.01',
|
|
156
|
-
clean: false,
|
|
157
|
-
'metric:vc90': null,
|
|
158
|
-
abortReason: abortReason.reason
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
return _context.abrupt("return", _vcAbortedResultWithRevisions);
|
|
162
|
-
case 19:
|
|
141
|
+
case 13:
|
|
163
142
|
ttvcV1Result = isTTVCv1Disabled ? {
|
|
164
143
|
VC: {},
|
|
165
144
|
VCBox: {},
|
|
@@ -317,16 +296,16 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
317
296
|
SSRRatioNext = VCObserver.getSSRRatio(vcNext.VCEntries.rel, ssr);
|
|
318
297
|
SSRRatioPayload = includeSSRRatio ? _defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:ssrRatio"), isTTVCv1Disabled ? SSRRatioNext : SSRRatio), "".concat(fullPrefix, "vc:next:ssrRatio"), SSRRatioNext) : {};
|
|
319
298
|
if (!isTTVCv1Disabled) {
|
|
320
|
-
_context.next =
|
|
299
|
+
_context.next = 29;
|
|
321
300
|
break;
|
|
322
301
|
}
|
|
323
302
|
return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, _defineProperty({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), SSRRatioPayload), {}, _defineProperty({}, "".concat(fullPrefix, "vc:ssrRatio"), SSRRatioNext), revisionsData), speedIndex));
|
|
324
|
-
case
|
|
303
|
+
case 29:
|
|
325
304
|
isTTVCv3Enabled = isVCRevisionEnabled('fy25.03', experienceKey);
|
|
326
305
|
return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
327
306
|
'metrics:vc': VC
|
|
328
307
|
}, "".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), {}, _defineProperty(_defineProperty(_defineProperty({}, "".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), {}, _defineProperty({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
|
|
329
|
-
case
|
|
308
|
+
case 31:
|
|
330
309
|
case "end":
|
|
331
310
|
return _context.stop();
|
|
332
311
|
}
|
|
@@ -389,14 +389,13 @@ var AbstractVCCalculatorBase = /*#__PURE__*/function () {
|
|
|
389
389
|
_context2.next = 7;
|
|
390
390
|
break;
|
|
391
391
|
}
|
|
392
|
-
return _context2.abrupt("return",
|
|
392
|
+
return _context2.abrupt("return", {
|
|
393
393
|
revision: this.revisionNo,
|
|
394
394
|
'metric:vc90': null,
|
|
395
395
|
clean: false,
|
|
396
|
-
abortReason: dirtyReason
|
|
397
|
-
}, fg('platform_ufo_abort_timestamp_by_revision') ? {
|
|
396
|
+
abortReason: dirtyReason,
|
|
398
397
|
abortTimestamp: getVCCleanStatusResult.abortTimestamp
|
|
399
|
-
}
|
|
398
|
+
});
|
|
400
399
|
case 7:
|
|
401
400
|
_context2.next = 9;
|
|
402
401
|
return this.calculateWithDebugInfo(filteredEntries, startTime, stopTime, isPostInteraction, isVCClean, interactionId, dirtyReason, orderedEntries, include3p);
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
5
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
-
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; }
|
|
8
|
-
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) { _defineProperty(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; }
|
|
9
6
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -77,21 +74,18 @@ var VCCalculator_FY25_03 = /*#__PURE__*/function (_AbstractVCCalculator) {
|
|
|
77
74
|
var data = entry.data;
|
|
78
75
|
if (ABORTING_WINDOW_EVENT.includes(data.eventType)) {
|
|
79
76
|
dirtyReason = data.eventType === 'keydown' ? 'keypress' : data.eventType;
|
|
80
|
-
|
|
81
|
-
abortTimestamp = Math.round(entry.time);
|
|
82
|
-
}
|
|
77
|
+
abortTimestamp = Math.round(entry.time);
|
|
83
78
|
return true;
|
|
84
79
|
}
|
|
85
80
|
}
|
|
86
81
|
return false;
|
|
87
82
|
});
|
|
88
83
|
if (hasAbortEvent && dirtyReason) {
|
|
89
|
-
return
|
|
84
|
+
return {
|
|
90
85
|
isVCClean: false,
|
|
91
|
-
dirtyReason: dirtyReason
|
|
92
|
-
}, fg('platform_ufo_abort_timestamp_by_revision') ? {
|
|
86
|
+
dirtyReason: dirtyReason,
|
|
93
87
|
abortTimestamp: abortTimestamp
|
|
94
|
-
}
|
|
88
|
+
};
|
|
95
89
|
}
|
|
96
90
|
return {
|
|
97
91
|
isVCClean: true
|
|
@@ -62,6 +62,7 @@ export type Config = {
|
|
|
62
62
|
readonly minorInteractions?: string[];
|
|
63
63
|
readonly doNotAbortActivePressInteraction?: string[];
|
|
64
64
|
readonly doNotAbortActivePressInteractionOnTransition?: string[];
|
|
65
|
+
readonly finishInteractionOnTransition?: string[];
|
|
65
66
|
readonly awaitBM3TTI?: string[];
|
|
66
67
|
readonly ufoNameOverrides?: UFONameOverride;
|
|
67
68
|
readonly namePrefix?: string;
|
|
@@ -169,6 +170,7 @@ export declare function getUfoNameOverrides(): UFONameOverride | undefined;
|
|
|
169
170
|
export declare function getMinorInteractions(): string[] | undefined;
|
|
170
171
|
export declare function getDoNotAbortActivePressInteraction(): string[] | undefined;
|
|
171
172
|
export declare function getDoNotAbortActivePressInteractionOnTransition(): string[] | undefined;
|
|
173
|
+
export declare function getFinishInteractionOnTransition(): string[] | undefined;
|
|
172
174
|
export declare const CLEANUP_TIMEOUT: number;
|
|
173
175
|
export declare function getInteractionTimeout(ufoName: string): number;
|
|
174
176
|
export {};
|
|
@@ -93,7 +93,7 @@ declare function createInteractionExtraLogPayload(interactionId: string, interac
|
|
|
93
93
|
start: number;
|
|
94
94
|
'metric:ttai:3p': number | undefined;
|
|
95
95
|
};
|
|
96
|
-
'vc:effective:revision':
|
|
96
|
+
'vc:effective:revision': string;
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
99
|
} | null>;
|
|
@@ -7,10 +7,12 @@ export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
|
|
|
7
7
|
constructor();
|
|
8
8
|
protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
|
|
9
9
|
protected getVCCleanStatus(filteredEntries: readonly VCObserverEntry[]): {
|
|
10
|
-
abortTimestamp?: number | undefined;
|
|
11
10
|
isVCClean: boolean;
|
|
12
11
|
dirtyReason: never;
|
|
12
|
+
abortTimestamp: number;
|
|
13
13
|
} | {
|
|
14
14
|
isVCClean: boolean;
|
|
15
|
+
dirtyReason?: undefined;
|
|
16
|
+
abortTimestamp?: undefined;
|
|
15
17
|
};
|
|
16
18
|
}
|
|
@@ -62,6 +62,7 @@ export type Config = {
|
|
|
62
62
|
readonly minorInteractions?: string[];
|
|
63
63
|
readonly doNotAbortActivePressInteraction?: string[];
|
|
64
64
|
readonly doNotAbortActivePressInteractionOnTransition?: string[];
|
|
65
|
+
readonly finishInteractionOnTransition?: string[];
|
|
65
66
|
readonly awaitBM3TTI?: string[];
|
|
66
67
|
readonly ufoNameOverrides?: UFONameOverride;
|
|
67
68
|
readonly namePrefix?: string;
|
|
@@ -173,6 +174,7 @@ export declare function getUfoNameOverrides(): UFONameOverride | undefined;
|
|
|
173
174
|
export declare function getMinorInteractions(): string[] | undefined;
|
|
174
175
|
export declare function getDoNotAbortActivePressInteraction(): string[] | undefined;
|
|
175
176
|
export declare function getDoNotAbortActivePressInteractionOnTransition(): string[] | undefined;
|
|
177
|
+
export declare function getFinishInteractionOnTransition(): string[] | undefined;
|
|
176
178
|
export declare const CLEANUP_TIMEOUT: number;
|
|
177
179
|
export declare function getInteractionTimeout(ufoName: string): number;
|
|
178
180
|
export {};
|
|
@@ -93,7 +93,7 @@ declare function createInteractionExtraLogPayload(interactionId: string, interac
|
|
|
93
93
|
start: number;
|
|
94
94
|
'metric:ttai:3p': number | undefined;
|
|
95
95
|
};
|
|
96
|
-
'vc:effective:revision':
|
|
96
|
+
'vc:effective:revision': string;
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
99
|
} | null>;
|
|
@@ -7,10 +7,12 @@ export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
|
|
|
7
7
|
constructor();
|
|
8
8
|
protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
|
|
9
9
|
protected getVCCleanStatus(filteredEntries: readonly VCObserverEntry[]): {
|
|
10
|
-
abortTimestamp?: number | undefined;
|
|
11
10
|
isVCClean: boolean;
|
|
12
11
|
dirtyReason: never;
|
|
12
|
+
abortTimestamp: number;
|
|
13
13
|
} | {
|
|
14
14
|
isVCClean: boolean;
|
|
15
|
+
dirtyReason?: undefined;
|
|
16
|
+
abortTimestamp?: undefined;
|
|
15
17
|
};
|
|
16
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.4",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"atlaskit:src": "src/index.ts",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@atlaskit/browser-apis": "^0.0.1",
|
|
30
|
-
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
31
30
|
"@atlaskit/interaction-context": "^3.0.0",
|
|
32
31
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
33
32
|
"@babel/runtime": "^7.0.0",
|
|
@@ -99,9 +98,6 @@
|
|
|
99
98
|
"enable_ufo_devtools_api_for_extra_events": {
|
|
100
99
|
"type": "boolean"
|
|
101
100
|
},
|
|
102
|
-
"platform_ufo_abort_timestamp_by_revision": {
|
|
103
|
-
"type": "boolean"
|
|
104
|
-
},
|
|
105
101
|
"ufo_payload_use_idle_callback": {
|
|
106
102
|
"type": "boolean"
|
|
107
103
|
},
|
|
@@ -152,6 +148,9 @@
|
|
|
152
148
|
},
|
|
153
149
|
"platform_ufo_enable_late_mutation_label_stacks": {
|
|
154
150
|
"type": "boolean"
|
|
151
|
+
},
|
|
152
|
+
"platform_ufo_enable_finish_interaction_transition": {
|
|
153
|
+
"type": "boolean"
|
|
155
154
|
}
|
|
156
155
|
}
|
|
157
156
|
}
|