@atlaskit/react-ufo 3.5.0 → 3.5.2
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 +22 -0
- package/dist/cjs/assets/index.js +4 -2
- package/dist/cjs/resource-timing/main.js +2 -1
- package/dist/cjs/segment/schedule-on-paint.js +2 -2
- package/dist/cjs/segment/segment.js +2 -2
- package/dist/cjs/vc/vc-observer/getVCRevisionsData.js +0 -4
- package/dist/cjs/vc/vc-observer/index.js +3 -5
- package/dist/cjs/vc/vc-observer/observers/non-visual-styles/is-non-visual-style-mutation.js +0 -5
- package/dist/cjs/vc/vc-observer/observers/ssr-placeholders/index.js +1 -2
- package/dist/cjs/vc/vc-observer/revisions/fy25_01.js +5 -7
- package/dist/es2019/assets/index.js +4 -2
- package/dist/es2019/resource-timing/main.js +2 -1
- package/dist/es2019/segment/schedule-on-paint.js +2 -2
- package/dist/es2019/segment/segment.js +2 -2
- package/dist/es2019/vc/vc-observer/getVCRevisionsData.js +0 -4
- package/dist/es2019/vc/vc-observer/index.js +3 -5
- package/dist/es2019/vc/vc-observer/observers/non-visual-styles/is-non-visual-style-mutation.js +0 -5
- package/dist/es2019/vc/vc-observer/observers/ssr-placeholders/index.js +1 -2
- package/dist/es2019/vc/vc-observer/revisions/fy25_01.js +5 -7
- package/dist/esm/assets/index.js +4 -2
- package/dist/esm/resource-timing/main.js +2 -1
- package/dist/esm/segment/schedule-on-paint.js +2 -2
- package/dist/esm/segment/segment.js +2 -2
- package/dist/esm/vc/vc-observer/getVCRevisionsData.js +0 -4
- package/dist/esm/vc/vc-observer/index.js +3 -5
- package/dist/esm/vc/vc-observer/observers/non-visual-styles/is-non-visual-style-mutation.js +0 -5
- package/dist/esm/vc/vc-observer/observers/ssr-placeholders/index.js +1 -2
- package/dist/esm/vc/vc-observer/revisions/fy25_01.js +5 -7
- package/package.json +7 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 3.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#140777](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140777)
|
|
8
|
+
[`8fa57c7e71b24`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8fa57c7e71b24) -
|
|
9
|
+
Filtering out assets with NaN values reported as file size
|
|
10
|
+
|
|
11
|
+
## 3.5.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#140795](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140795)
|
|
16
|
+
[`e1887df1f2005`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e1887df1f2005) -
|
|
17
|
+
FF cleanup - platform_ufo_ssr_placeholder_round_rect_size_check
|
|
18
|
+
- [#141104](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/141104)
|
|
19
|
+
[`186bbb54cfa80`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/186bbb54cfa80) -
|
|
20
|
+
ff clean up
|
|
21
|
+
- [#141125](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/141125)
|
|
22
|
+
[`489dcb094d563`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/489dcb094d563) -
|
|
23
|
+
FF cleanup - platform_ufo_fix_vc_observer_rounding_error
|
|
24
|
+
|
|
3
25
|
## 3.5.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/dist/cjs/assets/index.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.CHRSummary = exports.CHRReporter = void 0;
|
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _defineProperty4 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
12
|
var _selfMeasurements = require("../self-measurements");
|
|
12
13
|
var _utils = require("./utils");
|
|
13
14
|
var _CHRSummary;
|
|
@@ -69,8 +70,9 @@ var CHRReporter = exports.CHRReporter = /*#__PURE__*/function () {
|
|
|
69
70
|
if (!(0, _utils.checkIfTimingsAvailable)(entry)) {
|
|
70
71
|
return;
|
|
71
72
|
}
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
var hasNanValues = (0, _platformFeatureFlags.fg)('platform_ufo_assets_check_for_nan') ? entry.encodedSize === undefined || entry.encodedSize === null : false;
|
|
74
|
+
if (entry.encodedSize === entry.decodedSize || hasNanValues) {
|
|
75
|
+
// incorrectly reported or lack of size
|
|
74
76
|
return;
|
|
75
77
|
}
|
|
76
78
|
var type = (0, _utils.getTypeOfRequest)(entry);
|
|
@@ -94,6 +94,7 @@ var getNetworkData = (0, _selfMeasurements.withProfiling)(function getNetworkDat
|
|
|
94
94
|
encodedSize = item.encodedSize,
|
|
95
95
|
decodedSize = item.decodedSize;
|
|
96
96
|
var ttfb = (0, _roundNumber.roundEpsilon)(responseStart - eventStart);
|
|
97
|
+
var requestStartRelative = (0, _roundNumber.roundEpsilon)(requestStart - eventStart);
|
|
97
98
|
if (!hasAccessToResourceSize(name, initiatorType, item, hasTimingHeaders)) {
|
|
98
99
|
return {};
|
|
99
100
|
}
|
|
@@ -112,7 +113,7 @@ var getNetworkData = (0, _selfMeasurements.withProfiling)(function getNetworkDat
|
|
|
112
113
|
ttfb: ttfb,
|
|
113
114
|
serverTime: serverTime,
|
|
114
115
|
networkTime: networkTime,
|
|
115
|
-
requestStart: requestStart
|
|
116
|
+
requestStart: (0, _platformFeatureFlags.fg)('ufo_return_relative_request_start') ? requestStartRelative : requestStart
|
|
116
117
|
}, getSizeObject(transferSize));
|
|
117
118
|
});
|
|
118
119
|
var getResourceTimings = exports.getResourceTimings = (0, _selfMeasurements.withProfiling)(function getResourceTimings(interactionStart, interactionEnd) {
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _selfMeasurements = require("../self-measurements");
|
|
8
8
|
var scheduleOnPaint = (0, _selfMeasurements.withProfiling)(function scheduleOnPaint(_callback) {
|
|
9
|
-
var
|
|
9
|
+
var _globalThis$document;
|
|
10
10
|
var callback = (0, _selfMeasurements.withProfiling)(_callback);
|
|
11
|
-
if (((
|
|
11
|
+
if (((_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.visibilityState) !== 'visible') {
|
|
12
12
|
// last resort fallback
|
|
13
13
|
setTimeout(callback, 100);
|
|
14
14
|
return;
|
|
@@ -103,8 +103,8 @@ function UFOSegment(_ref) {
|
|
|
103
103
|
}
|
|
104
104
|
var onComplete = (0, _selfMeasurements.withProfiling)(function onComplete() {
|
|
105
105
|
if (capturedInteractionId === interactionId.current) {
|
|
106
|
-
var
|
|
107
|
-
var isPageVisible = ((
|
|
106
|
+
var _globalThis$document;
|
|
107
|
+
var isPageVisible = (globalThis === null || globalThis === void 0 || (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.visibilityState) === 'visible';
|
|
108
108
|
var canDoRAF = typeof requestAnimationFrame !== 'undefined';
|
|
109
109
|
if (isPageVisible && canDoRAF) {
|
|
110
110
|
tryCompleteHandle = requestAnimationFrame(function () {
|
|
@@ -44,10 +44,6 @@ var getVCRevisionsData = exports.getVCRevisionsData = (0, _selfMeasurements.with
|
|
|
44
44
|
ssr = _ref.ssr,
|
|
45
45
|
calculatedVC = _ref.calculatedVC,
|
|
46
46
|
calculatedVCNext = _ref.calculatedVCNext;
|
|
47
|
-
var isMultiHeatmapEnabled = !(0, _platformFeatureFlags.fg)('platform_ufo_multiheatmap_killswitch');
|
|
48
|
-
if (!isMultiHeatmapEnabled) {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
47
|
if (!(0, _platformFeatureFlags.fg)('platform_ufo_vc_observer_new')) {
|
|
52
48
|
if (!multiHeatmap) {
|
|
53
49
|
return null;
|
|
@@ -714,11 +714,9 @@ _VCObserver = VCObserver;
|
|
|
714
714
|
var v = arguments.length > 1 ? arguments[1] : undefined;
|
|
715
715
|
var currRatio = v[1] / totalPainted;
|
|
716
716
|
var VCRatio = currRatio + acc;
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
VCRatio = (preciseCurrRatio + preciseAccRatio) / 100;
|
|
721
|
-
}
|
|
717
|
+
var preciseCurrRatio = Math.round(100 * (v[1] / totalPainted));
|
|
718
|
+
var preciseAccRatio = Math.round(acc * 100);
|
|
719
|
+
VCRatio = (preciseCurrRatio + preciseAccRatio) / 100;
|
|
722
720
|
var time = v[0];
|
|
723
721
|
_VCObserver.VCParts.forEach(function (key) {
|
|
724
722
|
var value = parseInt(key, 10);
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
7
|
var _selfMeasurements = require("../../../../self-measurements");
|
|
9
8
|
/**
|
|
10
9
|
* Checks if a mutation record represents a non-visual style change
|
|
@@ -19,10 +18,6 @@ var _selfMeasurements = require("../../../../self-measurements");
|
|
|
19
18
|
var isNonVisualStyleMutation = (0, _selfMeasurements.withProfiling)(function isNonVisualStyleMutation(_ref) {
|
|
20
19
|
var target = _ref.target,
|
|
21
20
|
attributeName = _ref.attributeName;
|
|
22
|
-
var isNonVisualStyleMutationEnabled = (0, _platformFeatureFlags.fg)('platform_ufo_non_visual_style_mutation');
|
|
23
|
-
if (!isNonVisualStyleMutationEnabled) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
21
|
if (!(target instanceof Element)) {
|
|
27
22
|
return false;
|
|
28
23
|
}
|
|
@@ -8,7 +8,6 @@ exports.SSRPlaceholderHandlers = void 0;
|
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
var _selfMeasurements = require("../../../../self-measurements");
|
|
13
12
|
var ANCESTOR_LOOKUP_LIMIT = 10;
|
|
14
13
|
var SSRPlaceholderHandlers = exports.SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
@@ -19,7 +18,7 @@ var SSRPlaceholderHandlers = exports.SSRPlaceholderHandlers = /*#__PURE__*/funct
|
|
|
19
18
|
(0, _defineProperty2.default)(this, "callbacks", new Map());
|
|
20
19
|
(0, _defineProperty2.default)(this, "getSizeCallbacks", new Map());
|
|
21
20
|
(0, _defineProperty2.default)(this, "reactValidateCallbacks", new Map());
|
|
22
|
-
(0, _defineProperty2.default)(this, "EQUALITY_THRESHOLD",
|
|
21
|
+
(0, _defineProperty2.default)(this, "EQUALITY_THRESHOLD", 1);
|
|
23
22
|
(0, _defineProperty2.default)(this, "intersectionObserverCallback", function (_ref) {
|
|
24
23
|
var _this$intersectionObs;
|
|
25
24
|
var target = _ref.target,
|
|
@@ -11,7 +11,6 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
11
11
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _selfMeasurements = require("../../../self-measurements");
|
|
16
15
|
var _ViewportUpdateClassifier = require("./ViewportUpdateClassifier");
|
|
17
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)); }
|
|
@@ -51,12 +50,11 @@ var FY25_01Classifier = exports.FY25_01Classifier = /*#__PURE__*/function (_View
|
|
|
51
50
|
var v = arguments.length > 1 ? arguments[1] : undefined;
|
|
52
51
|
var VCRatio = v[1] / totalPainted + acc;
|
|
53
52
|
var time = v[0];
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
53
|
+
|
|
54
|
+
// @todo apply fix to include small changes into accumulator
|
|
55
|
+
var preciseCurrRatio = Math.round(100 * (v[1] / totalPainted));
|
|
56
|
+
var preciseAccRatio = Math.round(acc * 100);
|
|
57
|
+
VCRatio = (preciseCurrRatio + preciseAccRatio) / 100;
|
|
60
58
|
VCParts.forEach(function (value) {
|
|
61
59
|
if ((VC[value] === null || VC[value] === undefined) && VCRatio >= value / 100) {
|
|
62
60
|
var _componentsLog$time;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
var _CHRSummary;
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { withProfiling } from '../self-measurements';
|
|
4
5
|
import { calculateTransferType, checkIfTimingsAvailable, DISK_KEY, getTypeOfRequest, MEMORY_KEY, NETWORK_KEY, round } from './utils';
|
|
5
6
|
export class CHRSummary {
|
|
@@ -62,8 +63,9 @@ export class CHRReporter {
|
|
|
62
63
|
if (!checkIfTimingsAvailable(entry)) {
|
|
63
64
|
return;
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
const hasNanValues = fg('platform_ufo_assets_check_for_nan') ? entry.encodedSize === undefined || entry.encodedSize === null : false;
|
|
67
|
+
if (entry.encodedSize === entry.decodedSize || hasNanValues) {
|
|
68
|
+
// incorrectly reported or lack of size
|
|
67
69
|
return;
|
|
68
70
|
}
|
|
69
71
|
const type = getTypeOfRequest(entry);
|
|
@@ -85,6 +85,7 @@ const getNetworkData = withProfiling(function getNetworkData(item, eventStart, h
|
|
|
85
85
|
decodedSize
|
|
86
86
|
} = item;
|
|
87
87
|
const ttfb = roundEpsilon(responseStart - eventStart);
|
|
88
|
+
const requestStartRelative = roundEpsilon(requestStart - eventStart);
|
|
88
89
|
if (!hasAccessToResourceSize(name, initiatorType, item, hasTimingHeaders)) {
|
|
89
90
|
return {};
|
|
90
91
|
}
|
|
@@ -104,7 +105,7 @@ const getNetworkData = withProfiling(function getNetworkData(item, eventStart, h
|
|
|
104
105
|
ttfb,
|
|
105
106
|
serverTime,
|
|
106
107
|
networkTime,
|
|
107
|
-
requestStart,
|
|
108
|
+
requestStart: fg('ufo_return_relative_request_start') ? requestStartRelative : requestStart,
|
|
108
109
|
...getSizeObject(transferSize)
|
|
109
110
|
};
|
|
110
111
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { withProfiling } from '../self-measurements';
|
|
2
2
|
const scheduleOnPaint = withProfiling(function scheduleOnPaint(_callback) {
|
|
3
|
-
var
|
|
3
|
+
var _globalThis$document;
|
|
4
4
|
const callback = withProfiling(_callback);
|
|
5
|
-
if (((
|
|
5
|
+
if (((_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.visibilityState) !== 'visible') {
|
|
6
6
|
// last resort fallback
|
|
7
7
|
setTimeout(callback, 100);
|
|
8
8
|
return;
|
|
@@ -80,8 +80,8 @@ export default function UFOSegment({
|
|
|
80
80
|
}
|
|
81
81
|
const onComplete = withProfiling(function onComplete() {
|
|
82
82
|
if (capturedInteractionId === interactionId.current) {
|
|
83
|
-
var
|
|
84
|
-
const isPageVisible = ((
|
|
83
|
+
var _globalThis$document;
|
|
84
|
+
const isPageVisible = (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.visibilityState) === 'visible';
|
|
85
85
|
const canDoRAF = typeof requestAnimationFrame !== 'undefined';
|
|
86
86
|
if (isPageVisible && canDoRAF) {
|
|
87
87
|
tryCompleteHandle = requestAnimationFrame(() => {
|
|
@@ -38,10 +38,6 @@ export const getVCRevisionsData = withProfiling(function getVCRevisionsData({
|
|
|
38
38
|
calculatedVC,
|
|
39
39
|
calculatedVCNext
|
|
40
40
|
}) {
|
|
41
|
-
const isMultiHeatmapEnabled = !fg('platform_ufo_multiheatmap_killswitch');
|
|
42
|
-
if (!isMultiHeatmapEnabled) {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
41
|
if (!fg('platform_ufo_vc_observer_new')) {
|
|
46
42
|
if (!multiHeatmap) {
|
|
47
43
|
return null;
|
|
@@ -697,11 +697,9 @@ _defineProperty(VCObserver, "calculateVC", withProfiling(function calculateVC({
|
|
|
697
697
|
entries.reduce((acc = 0, v) => {
|
|
698
698
|
const currRatio = v[1] / totalPainted;
|
|
699
699
|
let VCRatio = currRatio + acc;
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
VCRatio = (preciseCurrRatio + preciseAccRatio) / 100;
|
|
704
|
-
}
|
|
700
|
+
const preciseCurrRatio = Math.round(100 * (v[1] / totalPainted));
|
|
701
|
+
const preciseAccRatio = Math.round(acc * 100);
|
|
702
|
+
VCRatio = (preciseCurrRatio + preciseAccRatio) / 100;
|
|
705
703
|
const time = v[0];
|
|
706
704
|
_VCObserver.VCParts.forEach(key => {
|
|
707
705
|
const value = parseInt(key, 10);
|
package/dist/es2019/vc/vc-observer/observers/non-visual-styles/is-non-visual-style-mutation.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import { withProfiling } from '../../../../self-measurements';
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -15,10 +14,6 @@ const isNonVisualStyleMutation = withProfiling(function isNonVisualStyleMutation
|
|
|
15
14
|
target,
|
|
16
15
|
attributeName
|
|
17
16
|
}) {
|
|
18
|
-
const isNonVisualStyleMutationEnabled = fg('platform_ufo_non_visual_style_mutation');
|
|
19
|
-
if (!isNonVisualStyleMutationEnabled) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
17
|
if (!(target instanceof Element)) {
|
|
23
18
|
return false;
|
|
24
19
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import { markProfilingEnd, markProfilingStart, withProfiling } from '../../../../self-measurements';
|
|
4
3
|
const ANCESTOR_LOOKUP_LIMIT = 10;
|
|
5
4
|
export class SSRPlaceholderHandlers {
|
|
@@ -8,7 +7,7 @@ export class SSRPlaceholderHandlers {
|
|
|
8
7
|
_defineProperty(this, "callbacks", new Map());
|
|
9
8
|
_defineProperty(this, "getSizeCallbacks", new Map());
|
|
10
9
|
_defineProperty(this, "reactValidateCallbacks", new Map());
|
|
11
|
-
_defineProperty(this, "EQUALITY_THRESHOLD",
|
|
10
|
+
_defineProperty(this, "EQUALITY_THRESHOLD", 1);
|
|
12
11
|
_defineProperty(this, "intersectionObserverCallback", ({
|
|
13
12
|
target,
|
|
14
13
|
boundingClientRect
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import { withProfiling } from '../../../self-measurements';
|
|
4
3
|
import { ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
5
4
|
const legacyIgnoreReasons = ['image', 'ssr-hydration', 'editor-lazy-node-view', 'editor-container-mutation'];
|
|
@@ -15,12 +14,11 @@ export class FY25_01Classifier extends ViewportUpdateClassifier {
|
|
|
15
14
|
entries.reduce((acc = 0, v) => {
|
|
16
15
|
let VCRatio = v[1] / totalPainted + acc;
|
|
17
16
|
const time = v[0];
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
17
|
+
|
|
18
|
+
// @todo apply fix to include small changes into accumulator
|
|
19
|
+
const preciseCurrRatio = Math.round(100 * (v[1] / totalPainted));
|
|
20
|
+
const preciseAccRatio = Math.round(acc * 100);
|
|
21
|
+
VCRatio = (preciseCurrRatio + preciseAccRatio) / 100;
|
|
24
22
|
VCParts.forEach(value => {
|
|
25
23
|
if ((VC[value] === null || VC[value] === undefined) && VCRatio >= value / 100) {
|
|
26
24
|
var _componentsLog$time;
|
package/dist/esm/assets/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
var _CHRSummary;
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { withProfiling } from '../self-measurements';
|
|
6
7
|
import { calculateTransferType, checkIfTimingsAvailable, DISK_KEY, getTypeOfRequest, MEMORY_KEY, NETWORK_KEY, round } from './utils';
|
|
7
8
|
export var CHRSummary = /*#__PURE__*/function () {
|
|
@@ -62,8 +63,9 @@ export var CHRReporter = /*#__PURE__*/function () {
|
|
|
62
63
|
if (!checkIfTimingsAvailable(entry)) {
|
|
63
64
|
return;
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
var hasNanValues = fg('platform_ufo_assets_check_for_nan') ? entry.encodedSize === undefined || entry.encodedSize === null : false;
|
|
67
|
+
if (entry.encodedSize === entry.decodedSize || hasNanValues) {
|
|
68
|
+
// incorrectly reported or lack of size
|
|
67
69
|
return;
|
|
68
70
|
}
|
|
69
71
|
var type = getTypeOfRequest(entry);
|
|
@@ -87,6 +87,7 @@ var getNetworkData = withProfiling(function getNetworkData(item, eventStart) {
|
|
|
87
87
|
encodedSize = item.encodedSize,
|
|
88
88
|
decodedSize = item.decodedSize;
|
|
89
89
|
var ttfb = roundEpsilon(responseStart - eventStart);
|
|
90
|
+
var requestStartRelative = roundEpsilon(requestStart - eventStart);
|
|
90
91
|
if (!hasAccessToResourceSize(name, initiatorType, item, hasTimingHeaders)) {
|
|
91
92
|
return {};
|
|
92
93
|
}
|
|
@@ -105,7 +106,7 @@ var getNetworkData = withProfiling(function getNetworkData(item, eventStart) {
|
|
|
105
106
|
ttfb: ttfb,
|
|
106
107
|
serverTime: serverTime,
|
|
107
108
|
networkTime: networkTime,
|
|
108
|
-
requestStart: requestStart
|
|
109
|
+
requestStart: fg('ufo_return_relative_request_start') ? requestStartRelative : requestStart
|
|
109
110
|
}, getSizeObject(transferSize));
|
|
110
111
|
});
|
|
111
112
|
export var getResourceTimings = withProfiling(function getResourceTimings(interactionStart, interactionEnd) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { withProfiling } from '../self-measurements';
|
|
2
2
|
var scheduleOnPaint = withProfiling(function scheduleOnPaint(_callback) {
|
|
3
|
-
var
|
|
3
|
+
var _globalThis$document;
|
|
4
4
|
var callback = withProfiling(_callback);
|
|
5
|
-
if (((
|
|
5
|
+
if (((_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.visibilityState) !== 'visible') {
|
|
6
6
|
// last resort fallback
|
|
7
7
|
setTimeout(callback, 100);
|
|
8
8
|
return;
|
|
@@ -91,8 +91,8 @@ export default function UFOSegment(_ref) {
|
|
|
91
91
|
}
|
|
92
92
|
var onComplete = withProfiling(function onComplete() {
|
|
93
93
|
if (capturedInteractionId === interactionId.current) {
|
|
94
|
-
var
|
|
95
|
-
var isPageVisible = ((
|
|
94
|
+
var _globalThis$document;
|
|
95
|
+
var isPageVisible = (globalThis === null || globalThis === void 0 || (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.visibilityState) === 'visible';
|
|
96
96
|
var canDoRAF = typeof requestAnimationFrame !== 'undefined';
|
|
97
97
|
if (isPageVisible && canDoRAF) {
|
|
98
98
|
tryCompleteHandle = requestAnimationFrame(function () {
|
|
@@ -37,10 +37,6 @@ export var getVCRevisionsData = withProfiling(function getVCRevisionsData(_ref)
|
|
|
37
37
|
ssr = _ref.ssr,
|
|
38
38
|
calculatedVC = _ref.calculatedVC,
|
|
39
39
|
calculatedVCNext = _ref.calculatedVCNext;
|
|
40
|
-
var isMultiHeatmapEnabled = !fg('platform_ufo_multiheatmap_killswitch');
|
|
41
|
-
if (!isMultiHeatmapEnabled) {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
40
|
if (!fg('platform_ufo_vc_observer_new')) {
|
|
45
41
|
if (!multiHeatmap) {
|
|
46
42
|
return null;
|
|
@@ -707,11 +707,9 @@ _defineProperty(VCObserver, "calculateVC", withProfiling(function calculateVC(_r
|
|
|
707
707
|
var v = arguments.length > 1 ? arguments[1] : undefined;
|
|
708
708
|
var currRatio = v[1] / totalPainted;
|
|
709
709
|
var VCRatio = currRatio + acc;
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
VCRatio = (preciseCurrRatio + preciseAccRatio) / 100;
|
|
714
|
-
}
|
|
710
|
+
var preciseCurrRatio = Math.round(100 * (v[1] / totalPainted));
|
|
711
|
+
var preciseAccRatio = Math.round(acc * 100);
|
|
712
|
+
VCRatio = (preciseCurrRatio + preciseAccRatio) / 100;
|
|
715
713
|
var time = v[0];
|
|
716
714
|
_VCObserver.VCParts.forEach(function (key) {
|
|
717
715
|
var value = parseInt(key, 10);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import { withProfiling } from '../../../../self-measurements';
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -14,10 +13,6 @@ import { withProfiling } from '../../../../self-measurements';
|
|
|
14
13
|
var isNonVisualStyleMutation = withProfiling(function isNonVisualStyleMutation(_ref) {
|
|
15
14
|
var target = _ref.target,
|
|
16
15
|
attributeName = _ref.attributeName;
|
|
17
|
-
var isNonVisualStyleMutationEnabled = fg('platform_ufo_non_visual_style_mutation');
|
|
18
|
-
if (!isNonVisualStyleMutationEnabled) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
16
|
if (!(target instanceof Element)) {
|
|
22
17
|
return false;
|
|
23
18
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { markProfilingEnd, markProfilingStart, withProfiling } from '../../../../self-measurements';
|
|
6
5
|
var ANCESTOR_LOOKUP_LIMIT = 10;
|
|
7
6
|
export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
@@ -12,7 +11,7 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
|
12
11
|
_defineProperty(this, "callbacks", new Map());
|
|
13
12
|
_defineProperty(this, "getSizeCallbacks", new Map());
|
|
14
13
|
_defineProperty(this, "reactValidateCallbacks", new Map());
|
|
15
|
-
_defineProperty(this, "EQUALITY_THRESHOLD",
|
|
14
|
+
_defineProperty(this, "EQUALITY_THRESHOLD", 1);
|
|
16
15
|
_defineProperty(this, "intersectionObserverCallback", function (_ref) {
|
|
17
16
|
var _this$intersectionObs;
|
|
18
17
|
var target = _ref.target,
|
|
@@ -6,7 +6,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
7
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { withProfiling } from '../../../self-measurements';
|
|
11
10
|
import { ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
12
11
|
var legacyIgnoreReasons = ['image', 'ssr-hydration', 'editor-lazy-node-view', 'editor-container-mutation'];
|
|
@@ -44,12 +43,11 @@ export var FY25_01Classifier = /*#__PURE__*/function (_ViewportUpdateClassi) {
|
|
|
44
43
|
var v = arguments.length > 1 ? arguments[1] : undefined;
|
|
45
44
|
var VCRatio = v[1] / totalPainted + acc;
|
|
46
45
|
var time = v[0];
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
46
|
+
|
|
47
|
+
// @todo apply fix to include small changes into accumulator
|
|
48
|
+
var preciseCurrRatio = Math.round(100 * (v[1] / totalPainted));
|
|
49
|
+
var preciseAccRatio = Math.round(acc * 100);
|
|
50
|
+
VCRatio = (preciseCurrRatio + preciseAccRatio) / 100;
|
|
53
51
|
VCParts.forEach(function (value) {
|
|
54
52
|
if ((VC[value] === null || VC[value] === undefined) && VCRatio >= value / 100) {
|
|
55
53
|
var _componentsLog$time;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -130,9 +130,6 @@
|
|
|
130
130
|
"platform_ufo_canvas_heatmap_full_precision": {
|
|
131
131
|
"type": "boolean"
|
|
132
132
|
},
|
|
133
|
-
"platform_ufo_fix_vc_observer_rounding_error": {
|
|
134
|
-
"type": "boolean"
|
|
135
|
-
},
|
|
136
133
|
"platform_editor_ed-25937_ignore_mutations_for_ttvc": {
|
|
137
134
|
"type": "boolean"
|
|
138
135
|
},
|
|
@@ -154,6 +151,9 @@
|
|
|
154
151
|
"ufo_support_other_resource_type_js": {
|
|
155
152
|
"type": "boolean"
|
|
156
153
|
},
|
|
154
|
+
"ufo_return_relative_request_start": {
|
|
155
|
+
"type": "boolean"
|
|
156
|
+
},
|
|
157
157
|
"platform_ufo_vc_observer_new": {
|
|
158
158
|
"type": "boolean"
|
|
159
159
|
},
|
|
@@ -163,9 +163,6 @@
|
|
|
163
163
|
"enable_ufo_devtools_api_for_extra_events": {
|
|
164
164
|
"type": "boolean"
|
|
165
165
|
},
|
|
166
|
-
"platform_ufo_multiheatmap_killswitch": {
|
|
167
|
-
"type": "boolean"
|
|
168
|
-
},
|
|
169
166
|
"platform_ufo_no_vc_on_aborted": {
|
|
170
167
|
"type": "boolean"
|
|
171
168
|
},
|
|
@@ -175,24 +172,21 @@
|
|
|
175
172
|
"ufo_payload_use_idle_callback": {
|
|
176
173
|
"type": "boolean"
|
|
177
174
|
},
|
|
178
|
-
"platform_ufo_ssr_placeholder_round_rect_size_check": {
|
|
179
|
-
"type": "boolean"
|
|
180
|
-
},
|
|
181
175
|
"platform_ufo_vc_ignore_same_value_mutation": {
|
|
182
176
|
"type": "boolean"
|
|
183
177
|
},
|
|
184
178
|
"platform_ufo_disable_ttvc_v1": {
|
|
185
179
|
"type": "boolean"
|
|
186
180
|
},
|
|
187
|
-
"platform_ufo_non_visual_style_mutation": {
|
|
188
|
-
"type": "boolean"
|
|
189
|
-
},
|
|
190
181
|
"platform_ufo_vc_filter_ignored_items": {
|
|
191
182
|
"type": "boolean"
|
|
192
183
|
},
|
|
193
184
|
"platform_ufo_vc_fix_ignore_image_mutation": {
|
|
194
185
|
"type": "boolean"
|
|
195
186
|
},
|
|
187
|
+
"platform_ufo_assets_check_for_nan": {
|
|
188
|
+
"type": "boolean"
|
|
189
|
+
},
|
|
196
190
|
"platform_ufo_log_attr_mutation_values": {
|
|
197
191
|
"type": "boolean"
|
|
198
192
|
},
|