@atlaskit/react-ufo 4.15.13 → 4.15.14
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 +7 -0
- package/dist/cjs/vc/vc-observer-new/metric-calculator/fy25_03/index.js +4 -16
- package/dist/cjs/vc/vc-observer-new/metric-calculator/utils/constants.js +18 -0
- package/dist/cjs/vc/vc-observer-new/metric-calculator/vcnext/index.js +9 -0
- package/dist/es2019/vc/vc-observer-new/metric-calculator/fy25_03/index.js +2 -14
- package/dist/es2019/vc/vc-observer-new/metric-calculator/utils/constants.js +12 -0
- package/dist/es2019/vc/vc-observer-new/metric-calculator/vcnext/index.js +9 -0
- package/dist/esm/vc/vc-observer-new/metric-calculator/fy25_03/index.js +2 -14
- package/dist/esm/vc/vc-observer-new/metric-calculator/utils/constants.js +12 -0
- package/dist/esm/vc/vc-observer-new/metric-calculator/vcnext/index.js +9 -0
- package/dist/types/vc/vc-observer-new/metric-calculator/fy25_03/index.d.ts +0 -3
- package/dist/types/vc/vc-observer-new/metric-calculator/utils/constants.d.ts +3 -0
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/fy25_03/index.d.ts +0 -3
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/utils/constants.d.ts +3 -0
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 4.15.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8671d72bf688c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8671d72bf688c) -
|
|
8
|
+
add attribute exclusion list for mutation:display-contents-children-attribute
|
|
9
|
+
|
|
3
10
|
## 4.15.13
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default =
|
|
7
|
+
exports.default = 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 _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
@@ -14,6 +14,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
14
14
|
var _expVal = require("../../../expVal");
|
|
15
15
|
var _isDndStyleMutation = require("../../../vc-observer/observers/non-visual-styles/is-dnd-style-mutation");
|
|
16
16
|
var _abstractBaseVcCalculator = _interopRequireDefault(require("../abstract-base-vc-calculator"));
|
|
17
|
+
var _constants = require("../utils/constants");
|
|
17
18
|
var _isEntrySmartAnswersInSearch = require("../utils/is-entry-smart-answers-in-search");
|
|
18
19
|
var _isViewportEntryData = _interopRequireDefault(require("../utils/is-viewport-entry-data"));
|
|
19
20
|
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)); }
|
|
@@ -39,19 +40,6 @@ var getConsideredEntryTypes = function getConsideredEntryTypes(include3p) {
|
|
|
39
40
|
}
|
|
40
41
|
return entryTypes;
|
|
41
42
|
};
|
|
42
|
-
|
|
43
|
-
// TODO: AFO-3523
|
|
44
|
-
// Those are the attributes we have found when testing the 'fy25.03' manually.
|
|
45
|
-
// We still need to replace this hardcoded list with a proper automation
|
|
46
|
-
var KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = exports.KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'data-drop-target-for-external', 'draggable', 'data-is-observed'];
|
|
47
|
-
|
|
48
|
-
// Common aria attributes that don't cause visual layout shifts
|
|
49
|
-
var NON_VISUAL_ARIA_ATTRIBUTES = exports.NON_VISUAL_ARIA_ATTRIBUTES = ['aria-label', 'aria-labelledby', 'aria-describedby', 'aria-hidden', 'aria-expanded', 'aria-controls', 'aria-selected', 'aria-checked', 'aria-disabled', 'aria-required', 'aria-current', 'aria-haspopup', 'aria-pressed', 'aria-atomic', 'aria-live'];
|
|
50
|
-
|
|
51
|
-
// Common third party browser extension attributes
|
|
52
|
-
var THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES = exports.THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES = ['bis_skin_checked', 'cz-shortcut-listen', 'monica-version', 'data-gr-ext-installed', 'data-dashlane-rid', 'sapling-installed', 'data-gptw',
|
|
53
|
-
// grammarly extensions
|
|
54
|
-
'data-new-gr-c-s-loaded', 'data-gr-aaa-notch-connection-id', 'data-gr-aaa-loaded'];
|
|
55
43
|
var VCCalculator_FY25_03 = exports.default = /*#__PURE__*/function (_AbstractVCCalculator) {
|
|
56
44
|
function VCCalculator_FY25_03(revisionNo) {
|
|
57
45
|
(0, _classCallCheck2.default)(this, VCCalculator_FY25_03);
|
|
@@ -88,10 +76,10 @@ var VCCalculator_FY25_03 = exports.default = /*#__PURE__*/function (_AbstractVCC
|
|
|
88
76
|
if (entry.data.type === 'mutation:attribute') {
|
|
89
77
|
var _entryData = entry.data;
|
|
90
78
|
var _attributeName = _entryData.attributeName;
|
|
91
|
-
if (!_attributeName || KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS.includes(_attributeName)) {
|
|
79
|
+
if (!_attributeName || _constants.KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS.includes(_attributeName)) {
|
|
92
80
|
return false;
|
|
93
81
|
}
|
|
94
|
-
if (_attributeName.startsWith('data-test') ||
|
|
82
|
+
if (_attributeName.startsWith('data-test') || _constants.NON_VISUAL_ARIA_ATTRIBUTES.includes(_attributeName) || _constants.THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES.includes(_attributeName) && (0, _platformFeatureFlags.fg)('platform_ufo_exclude_3p_extensions_from_ttvc')) {
|
|
95
83
|
return false;
|
|
96
84
|
}
|
|
97
85
|
return true;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES = exports.NON_VISUAL_ARIA_ATTRIBUTES = exports.KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = void 0;
|
|
7
|
+
// TODO: AFO-3523
|
|
8
|
+
// Those are the attributes we have found when testing the 'fy25.03' manually.
|
|
9
|
+
// We still need to replace this hardcoded list with a proper automation
|
|
10
|
+
var KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = exports.KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'data-drop-target-for-external', 'draggable', 'data-is-observed', 'data-aui-version', 'data-testid', 'data-vc', 'data-ssr-placeholder', 'data-ssr-placeholder-replace', 'data-vc-nvs', 'data-media-vc-wrapper', 'data-renderer-start-pos', 'data-table-local-id', 'spellcheck', 'data-auto-scrollable', 'id', 'tabindex', 'data-is-ttvc-ready', 'contenteditable', 'data-has-collab-initialised', 'translate'];
|
|
11
|
+
|
|
12
|
+
// Common aria attributes that don't cause visual layout shifts
|
|
13
|
+
var NON_VISUAL_ARIA_ATTRIBUTES = exports.NON_VISUAL_ARIA_ATTRIBUTES = ['aria-label', 'aria-labelledby', 'aria-describedby', 'aria-hidden', 'aria-expanded', 'aria-controls', 'aria-selected', 'aria-checked', 'aria-disabled', 'aria-required', 'aria-current', 'aria-haspopup', 'aria-pressed', 'aria-atomic', 'aria-live'];
|
|
14
|
+
|
|
15
|
+
// Common third party browser extension attributes
|
|
16
|
+
var THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES = exports.THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES = ['bis_skin_checked', 'cz-shortcut-listen', 'monica-version', 'data-gr-ext-installed', 'data-dashlane-rid', 'sapling-installed', 'data-gptw',
|
|
17
|
+
// grammarly extensions
|
|
18
|
+
'data-new-gr-c-s-loaded', 'data-gr-aaa-notch-connection-id', 'data-gr-aaa-loaded'];
|
|
@@ -13,6 +13,7 @@ var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
|
13
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
15
|
var _fy25_ = _interopRequireDefault(require("../fy25_03"));
|
|
16
|
+
var _constants = require("../utils/constants");
|
|
16
17
|
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)); }
|
|
17
18
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
18
19
|
function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
@@ -50,6 +51,14 @@ var VCNextCalculator = exports.default = /*#__PURE__*/function (_VCCalculator_FY
|
|
|
50
51
|
if (isEntryIncludedInV3 && !getExcludedEntryTypes().includes(entry.data.type)) {
|
|
51
52
|
return true;
|
|
52
53
|
}
|
|
54
|
+
if (entry.data.type === 'mutation:display-contents-children-attribute' && (0, _platformFeatureFlags.fg)('platform_ufo_fix_ttvc_v4_attribute_exclusions')) {
|
|
55
|
+
var entryData = entry.data;
|
|
56
|
+
var attributeName = entryData.attributeName;
|
|
57
|
+
if (!attributeName || attributeName.startsWith('data-test') || _constants.KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS.includes(attributeName) || _constants.NON_VISUAL_ARIA_ATTRIBUTES.includes(attributeName) || _constants.THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES.includes(attributeName)) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
53
62
|
return getConsideredEntryTypes().includes(entry.data.type);
|
|
54
63
|
}
|
|
55
64
|
}]);
|
|
@@ -2,6 +2,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
2
2
|
import { expVal } from '../../../expVal';
|
|
3
3
|
import { containsDnDMutationInStyle } from '../../../vc-observer/observers/non-visual-styles/is-dnd-style-mutation';
|
|
4
4
|
import AbstractVCCalculatorBase from '../abstract-base-vc-calculator';
|
|
5
|
+
import { KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS, NON_VISUAL_ARIA_ATTRIBUTES, THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES } from '../utils/constants';
|
|
5
6
|
import { isEntrySmartAnswersInSearch } from '../utils/is-entry-smart-answers-in-search';
|
|
6
7
|
import isViewportEntryData from '../utils/is-viewport-entry-data';
|
|
7
8
|
const ABORTING_WINDOW_EVENT = ['wheel', 'scroll', 'keydown', 'resize'];
|
|
@@ -25,19 +26,6 @@ const getConsideredEntryTypes = include3p => {
|
|
|
25
26
|
}
|
|
26
27
|
return entryTypes;
|
|
27
28
|
};
|
|
28
|
-
|
|
29
|
-
// TODO: AFO-3523
|
|
30
|
-
// Those are the attributes we have found when testing the 'fy25.03' manually.
|
|
31
|
-
// We still need to replace this hardcoded list with a proper automation
|
|
32
|
-
export const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'data-drop-target-for-external', 'draggable', 'data-is-observed'];
|
|
33
|
-
|
|
34
|
-
// Common aria attributes that don't cause visual layout shifts
|
|
35
|
-
export const NON_VISUAL_ARIA_ATTRIBUTES = ['aria-label', 'aria-labelledby', 'aria-describedby', 'aria-hidden', 'aria-expanded', 'aria-controls', 'aria-selected', 'aria-checked', 'aria-disabled', 'aria-required', 'aria-current', 'aria-haspopup', 'aria-pressed', 'aria-atomic', 'aria-live'];
|
|
36
|
-
|
|
37
|
-
// Common third party browser extension attributes
|
|
38
|
-
export const THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES = ['bis_skin_checked', 'cz-shortcut-listen', 'monica-version', 'data-gr-ext-installed', 'data-dashlane-rid', 'sapling-installed', 'data-gptw',
|
|
39
|
-
// grammarly extensions
|
|
40
|
-
'data-new-gr-c-s-loaded', 'data-gr-aaa-notch-connection-id', 'data-gr-aaa-loaded'];
|
|
41
29
|
export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
|
|
42
30
|
constructor(revisionNo) {
|
|
43
31
|
super(revisionNo !== null && revisionNo !== void 0 ? revisionNo : REVISION_NO);
|
|
@@ -73,7 +61,7 @@ export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
|
|
|
73
61
|
if (!attributeName || KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS.includes(attributeName)) {
|
|
74
62
|
return false;
|
|
75
63
|
}
|
|
76
|
-
if (attributeName.startsWith('data-test') ||
|
|
64
|
+
if (attributeName.startsWith('data-test') || NON_VISUAL_ARIA_ATTRIBUTES.includes(attributeName) || THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES.includes(attributeName) && fg('platform_ufo_exclude_3p_extensions_from_ttvc')) {
|
|
77
65
|
return false;
|
|
78
66
|
}
|
|
79
67
|
return true;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// TODO: AFO-3523
|
|
2
|
+
// Those are the attributes we have found when testing the 'fy25.03' manually.
|
|
3
|
+
// We still need to replace this hardcoded list with a proper automation
|
|
4
|
+
export const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'data-drop-target-for-external', 'draggable', 'data-is-observed', 'data-aui-version', 'data-testid', 'data-vc', 'data-ssr-placeholder', 'data-ssr-placeholder-replace', 'data-vc-nvs', 'data-media-vc-wrapper', 'data-renderer-start-pos', 'data-table-local-id', 'spellcheck', 'data-auto-scrollable', 'id', 'tabindex', 'data-is-ttvc-ready', 'contenteditable', 'data-has-collab-initialised', 'translate'];
|
|
5
|
+
|
|
6
|
+
// Common aria attributes that don't cause visual layout shifts
|
|
7
|
+
export const NON_VISUAL_ARIA_ATTRIBUTES = ['aria-label', 'aria-labelledby', 'aria-describedby', 'aria-hidden', 'aria-expanded', 'aria-controls', 'aria-selected', 'aria-checked', 'aria-disabled', 'aria-required', 'aria-current', 'aria-haspopup', 'aria-pressed', 'aria-atomic', 'aria-live'];
|
|
8
|
+
|
|
9
|
+
// Common third party browser extension attributes
|
|
10
|
+
export const THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES = ['bis_skin_checked', 'cz-shortcut-listen', 'monica-version', 'data-gr-ext-installed', 'data-dashlane-rid', 'sapling-installed', 'data-gptw',
|
|
11
|
+
// grammarly extensions
|
|
12
|
+
'data-new-gr-c-s-loaded', 'data-gr-aaa-notch-connection-id', 'data-gr-aaa-loaded'];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
2
|
import VCCalculator_FY25_03 from '../fy25_03';
|
|
3
|
+
import { KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS, NON_VISUAL_ARIA_ATTRIBUTES, THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES } from '../utils/constants';
|
|
3
4
|
|
|
4
5
|
// NOTE: `next` to be renamed `fy26.04` once stable
|
|
5
6
|
const REVISION_NO = 'next';
|
|
@@ -31,6 +32,14 @@ export default class VCNextCalculator extends VCCalculator_FY25_03 {
|
|
|
31
32
|
if (isEntryIncludedInV3 && !getExcludedEntryTypes().includes(entry.data.type)) {
|
|
32
33
|
return true;
|
|
33
34
|
}
|
|
35
|
+
if (entry.data.type === 'mutation:display-contents-children-attribute' && fg('platform_ufo_fix_ttvc_v4_attribute_exclusions')) {
|
|
36
|
+
const entryData = entry.data;
|
|
37
|
+
const attributeName = entryData.attributeName;
|
|
38
|
+
if (!attributeName || attributeName.startsWith('data-test') || KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS.includes(attributeName) || NON_VISUAL_ARIA_ATTRIBUTES.includes(attributeName) || THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES.includes(attributeName)) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
34
43
|
return getConsideredEntryTypes().includes(entry.data.type);
|
|
35
44
|
}
|
|
36
45
|
}
|
|
@@ -9,6 +9,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
9
9
|
import { expVal } from '../../../expVal';
|
|
10
10
|
import { containsDnDMutationInStyle } from '../../../vc-observer/observers/non-visual-styles/is-dnd-style-mutation';
|
|
11
11
|
import AbstractVCCalculatorBase from '../abstract-base-vc-calculator';
|
|
12
|
+
import { KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS, NON_VISUAL_ARIA_ATTRIBUTES, THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES } from '../utils/constants';
|
|
12
13
|
import { isEntrySmartAnswersInSearch } from '../utils/is-entry-smart-answers-in-search';
|
|
13
14
|
import isViewportEntryData from '../utils/is-viewport-entry-data';
|
|
14
15
|
var ABORTING_WINDOW_EVENT = ['wheel', 'scroll', 'keydown', 'resize'];
|
|
@@ -32,19 +33,6 @@ var getConsideredEntryTypes = function getConsideredEntryTypes(include3p) {
|
|
|
32
33
|
}
|
|
33
34
|
return entryTypes;
|
|
34
35
|
};
|
|
35
|
-
|
|
36
|
-
// TODO: AFO-3523
|
|
37
|
-
// Those are the attributes we have found when testing the 'fy25.03' manually.
|
|
38
|
-
// We still need to replace this hardcoded list with a proper automation
|
|
39
|
-
export var KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'data-drop-target-for-external', 'draggable', 'data-is-observed'];
|
|
40
|
-
|
|
41
|
-
// Common aria attributes that don't cause visual layout shifts
|
|
42
|
-
export var NON_VISUAL_ARIA_ATTRIBUTES = ['aria-label', 'aria-labelledby', 'aria-describedby', 'aria-hidden', 'aria-expanded', 'aria-controls', 'aria-selected', 'aria-checked', 'aria-disabled', 'aria-required', 'aria-current', 'aria-haspopup', 'aria-pressed', 'aria-atomic', 'aria-live'];
|
|
43
|
-
|
|
44
|
-
// Common third party browser extension attributes
|
|
45
|
-
export var THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES = ['bis_skin_checked', 'cz-shortcut-listen', 'monica-version', 'data-gr-ext-installed', 'data-dashlane-rid', 'sapling-installed', 'data-gptw',
|
|
46
|
-
// grammarly extensions
|
|
47
|
-
'data-new-gr-c-s-loaded', 'data-gr-aaa-notch-connection-id', 'data-gr-aaa-loaded'];
|
|
48
36
|
var VCCalculator_FY25_03 = /*#__PURE__*/function (_AbstractVCCalculator) {
|
|
49
37
|
function VCCalculator_FY25_03(revisionNo) {
|
|
50
38
|
_classCallCheck(this, VCCalculator_FY25_03);
|
|
@@ -84,7 +72,7 @@ var VCCalculator_FY25_03 = /*#__PURE__*/function (_AbstractVCCalculator) {
|
|
|
84
72
|
if (!_attributeName || KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS.includes(_attributeName)) {
|
|
85
73
|
return false;
|
|
86
74
|
}
|
|
87
|
-
if (_attributeName.startsWith('data-test') ||
|
|
75
|
+
if (_attributeName.startsWith('data-test') || NON_VISUAL_ARIA_ATTRIBUTES.includes(_attributeName) || THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES.includes(_attributeName) && fg('platform_ufo_exclude_3p_extensions_from_ttvc')) {
|
|
88
76
|
return false;
|
|
89
77
|
}
|
|
90
78
|
return true;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// TODO: AFO-3523
|
|
2
|
+
// Those are the attributes we have found when testing the 'fy25.03' manually.
|
|
3
|
+
// We still need to replace this hardcoded list with a proper automation
|
|
4
|
+
export var KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'data-drop-target-for-external', 'draggable', 'data-is-observed', 'data-aui-version', 'data-testid', 'data-vc', 'data-ssr-placeholder', 'data-ssr-placeholder-replace', 'data-vc-nvs', 'data-media-vc-wrapper', 'data-renderer-start-pos', 'data-table-local-id', 'spellcheck', 'data-auto-scrollable', 'id', 'tabindex', 'data-is-ttvc-ready', 'contenteditable', 'data-has-collab-initialised', 'translate'];
|
|
5
|
+
|
|
6
|
+
// Common aria attributes that don't cause visual layout shifts
|
|
7
|
+
export var NON_VISUAL_ARIA_ATTRIBUTES = ['aria-label', 'aria-labelledby', 'aria-describedby', 'aria-hidden', 'aria-expanded', 'aria-controls', 'aria-selected', 'aria-checked', 'aria-disabled', 'aria-required', 'aria-current', 'aria-haspopup', 'aria-pressed', 'aria-atomic', 'aria-live'];
|
|
8
|
+
|
|
9
|
+
// Common third party browser extension attributes
|
|
10
|
+
export var THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES = ['bis_skin_checked', 'cz-shortcut-listen', 'monica-version', 'data-gr-ext-installed', 'data-dashlane-rid', 'sapling-installed', 'data-gptw',
|
|
11
|
+
// grammarly extensions
|
|
12
|
+
'data-new-gr-c-s-loaded', 'data-gr-aaa-notch-connection-id', 'data-gr-aaa-loaded'];
|
|
@@ -9,6 +9,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
9
9
|
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
11
|
import VCCalculator_FY25_03 from '../fy25_03';
|
|
12
|
+
import { KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS, NON_VISUAL_ARIA_ATTRIBUTES, THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES } from '../utils/constants';
|
|
12
13
|
|
|
13
14
|
// NOTE: `next` to be renamed `fy26.04` once stable
|
|
14
15
|
var REVISION_NO = 'next';
|
|
@@ -44,6 +45,14 @@ var VCNextCalculator = /*#__PURE__*/function (_VCCalculator_FY25_) {
|
|
|
44
45
|
if (isEntryIncludedInV3 && !getExcludedEntryTypes().includes(entry.data.type)) {
|
|
45
46
|
return true;
|
|
46
47
|
}
|
|
48
|
+
if (entry.data.type === 'mutation:display-contents-children-attribute' && fg('platform_ufo_fix_ttvc_v4_attribute_exclusions')) {
|
|
49
|
+
var entryData = entry.data;
|
|
50
|
+
var attributeName = entryData.attributeName;
|
|
51
|
+
if (!attributeName || attributeName.startsWith('data-test') || KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS.includes(attributeName) || NON_VISUAL_ARIA_ATTRIBUTES.includes(attributeName) || THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES.includes(attributeName)) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
47
56
|
return getConsideredEntryTypes().includes(entry.data.type);
|
|
48
57
|
}
|
|
49
58
|
}]);
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { VCObserverEntry } from '../../types';
|
|
2
2
|
import AbstractVCCalculatorBase from '../abstract-base-vc-calculator';
|
|
3
|
-
export declare const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS: string[];
|
|
4
|
-
export declare const NON_VISUAL_ARIA_ATTRIBUTES: string[];
|
|
5
|
-
export declare const THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES: string[];
|
|
6
3
|
export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
|
|
7
4
|
constructor(revisionNo?: string);
|
|
8
5
|
protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean, excludeSmartAnswersInSearch?: boolean): boolean;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { VCObserverEntry } from '../../types';
|
|
2
2
|
import AbstractVCCalculatorBase from '../abstract-base-vc-calculator';
|
|
3
|
-
export declare const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS: string[];
|
|
4
|
-
export declare const NON_VISUAL_ARIA_ATTRIBUTES: string[];
|
|
5
|
-
export declare const THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES: string[];
|
|
6
3
|
export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
|
|
7
4
|
constructor(revisionNo?: string);
|
|
8
5
|
protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean, excludeSmartAnswersInSearch?: boolean): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.14",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -137,6 +137,9 @@
|
|
|
137
137
|
"platform_ufo_segment_unmount_count": {
|
|
138
138
|
"type": "boolean"
|
|
139
139
|
},
|
|
140
|
+
"platform_ufo_fix_ttvc_v4_attribute_exclusions": {
|
|
141
|
+
"type": "boolean"
|
|
142
|
+
},
|
|
140
143
|
"platform_ufo_enable_ttai_with_3p": {
|
|
141
144
|
"type": "boolean"
|
|
142
145
|
},
|