@atlaskit/react-ufo 3.13.3 → 3.13.5

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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 3.13.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#160658](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160658)
8
+ [`de856e19257ac`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/de856e19257ac) -
9
+ AFO-3905 exclude data-auto-scrollable from ttvc v3
10
+
11
+ ## 3.13.4
12
+
13
+ ### Patch Changes
14
+
15
+ - [#159955](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159955)
16
+ [`1d25081acf6c5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1d25081acf6c5) -
17
+ ignore non visual attribute changes
18
+ - [#159937](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159937)
19
+ [`d0801dd8e4ef8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d0801dd8e4ef8) -
20
+ pass interactionID correctly
21
+
3
22
  ## 3.13.3
4
23
 
5
24
  ### Patch Changes
@@ -128,7 +128,8 @@ var VCObserverWrapper = exports.VCObserverWrapper = /*#__PURE__*/function () {
128
128
  _context.next = 12;
129
129
  return (_this$newVCObserver3 = this.newVCObserver) === null || _this$newVCObserver3 === void 0 ? void 0 : _this$newVCObserver3.getVCResult({
130
130
  start: param.start,
131
- stop: param.stop
131
+ stop: param.stop,
132
+ interactionId: param.interactionId
132
133
  });
133
134
  case 12:
134
135
  _context.t1 = _context.sent;
@@ -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 = exports.KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = void 0;
7
+ exports.default = exports.NON_VISUAL_ARIA_ATTRIBUTES = exports.KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = 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"));
@@ -23,6 +23,9 @@ var CONSIDERED_ENTRY_TYPE = ['mutation:child-element', 'mutation:element', 'muta
23
23
  // Those are the attributes we have found when testing the 'fy25.03' manually.
24
24
  // We still need to replace this hardcoded list with a proper automation
25
25
  var KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = exports.KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'draggable'];
26
+
27
+ // Common aria attributes that don't cause visual layout shifts
28
+ 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-live'];
26
29
  var VCCalculator_FY25_03 = exports.default = /*#__PURE__*/function (_AbstractVCCalculator) {
27
30
  function VCCalculator_FY25_03() {
28
31
  (0, _classCallCheck2.default)(this, VCCalculator_FY25_03);
@@ -44,6 +47,9 @@ var VCCalculator_FY25_03 = exports.default = /*#__PURE__*/function (_AbstractVCC
44
47
  if (attributeName === 'data-aui-version' && (0, _platformFeatureFlags.fg)('platform_ufo_filter_out_aui_attribute_changes')) {
45
48
  return false;
46
49
  }
50
+ if ((attributeName === 'data-testid' || attributeName === 'data-vc' || attributeName === 'data-ssr-placeholder' || attributeName === 'data-ssr-placeholder-replace' || attributeName === 'data-vc-nvs' || attributeName === 'data-media-vc-wrapper' || attributeName === 'data-auto-scrollable' || NON_VISUAL_ARIA_ATTRIBUTES.includes(attributeName)) && (0, _platformFeatureFlags.fg)('platform_ufo_ignore_non_vis_attributes')) {
51
+ return false;
52
+ }
47
53
  return true;
48
54
  }
49
55
  if ((0, _isViewportEntryData.default)(entry.data) && !entry.data.visible) {
@@ -79,7 +79,8 @@ export class VCObserverWrapper {
79
79
  const v1v2Result = isVCRevisionEnabled('fy25.01', experienceKey) || isVCRevisionEnabled('fy25.02', experienceKey) ? await ((_this$oldVCObserver4 = this.oldVCObserver) === null || _this$oldVCObserver4 === void 0 ? void 0 : _this$oldVCObserver4.getVCResult(param)) : {};
80
80
  const v3Result = isVCRevisionEnabled('fy25.03', experienceKey) ? await ((_this$newVCObserver3 = this.newVCObserver) === null || _this$newVCObserver3 === void 0 ? void 0 : _this$newVCObserver3.getVCResult({
81
81
  start: param.start,
82
- stop: param.stop
82
+ stop: param.stop,
83
+ interactionId: param.interactionId
83
84
  })) : [];
84
85
  if (!v3Result) {
85
86
  return v1v2Result !== null && v1v2Result !== void 0 ? v1v2Result : {};
@@ -9,6 +9,9 @@ const CONSIDERED_ENTRY_TYPE = ['mutation:child-element', 'mutation:element', 'mu
9
9
  // Those are the attributes we have found when testing the 'fy25.03' manually.
10
10
  // We still need to replace this hardcoded list with a proper automation
11
11
  export const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'draggable'];
12
+
13
+ // Common aria attributes that don't cause visual layout shifts
14
+ 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-live'];
12
15
  export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
13
16
  constructor() {
14
17
  super(REVISION_NO);
@@ -26,6 +29,9 @@ export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
26
29
  if (attributeName === 'data-aui-version' && fg('platform_ufo_filter_out_aui_attribute_changes')) {
27
30
  return false;
28
31
  }
32
+ if ((attributeName === 'data-testid' || attributeName === 'data-vc' || attributeName === 'data-ssr-placeholder' || attributeName === 'data-ssr-placeholder-replace' || attributeName === 'data-vc-nvs' || attributeName === 'data-media-vc-wrapper' || attributeName === 'data-auto-scrollable' || NON_VISUAL_ARIA_ATTRIBUTES.includes(attributeName)) && fg('platform_ufo_ignore_non_vis_attributes')) {
33
+ return false;
34
+ }
29
35
  return true;
30
36
  }
31
37
  if (isViewportEntryData(entry.data) && !entry.data.visible) {
@@ -119,7 +119,8 @@ export var VCObserverWrapper = /*#__PURE__*/function () {
119
119
  _context.next = 12;
120
120
  return (_this$newVCObserver3 = this.newVCObserver) === null || _this$newVCObserver3 === void 0 ? void 0 : _this$newVCObserver3.getVCResult({
121
121
  start: param.start,
122
- stop: param.stop
122
+ stop: param.stop,
123
+ interactionId: param.interactionId
123
124
  });
124
125
  case 12:
125
126
  _context.t1 = _context.sent;
@@ -16,6 +16,9 @@ var CONSIDERED_ENTRY_TYPE = ['mutation:child-element', 'mutation:element', 'muta
16
16
  // Those are the attributes we have found when testing the 'fy25.03' manually.
17
17
  // We still need to replace this hardcoded list with a proper automation
18
18
  export var KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'draggable'];
19
+
20
+ // Common aria attributes that don't cause visual layout shifts
21
+ 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-live'];
19
22
  var VCCalculator_FY25_03 = /*#__PURE__*/function (_AbstractVCCalculator) {
20
23
  function VCCalculator_FY25_03() {
21
24
  _classCallCheck(this, VCCalculator_FY25_03);
@@ -37,6 +40,9 @@ var VCCalculator_FY25_03 = /*#__PURE__*/function (_AbstractVCCalculator) {
37
40
  if (attributeName === 'data-aui-version' && fg('platform_ufo_filter_out_aui_attribute_changes')) {
38
41
  return false;
39
42
  }
43
+ if ((attributeName === 'data-testid' || attributeName === 'data-vc' || attributeName === 'data-ssr-placeholder' || attributeName === 'data-ssr-placeholder-replace' || attributeName === 'data-vc-nvs' || attributeName === 'data-media-vc-wrapper' || attributeName === 'data-auto-scrollable' || NON_VISUAL_ARIA_ATTRIBUTES.includes(attributeName)) && fg('platform_ufo_ignore_non_vis_attributes')) {
44
+ return false;
45
+ }
40
46
  return true;
41
47
  }
42
48
  if (isViewportEntryData(entry.data) && !entry.data.visible) {
@@ -1,6 +1,7 @@
1
1
  import type { VCObserverEntry } from '../../types';
2
2
  import AbstractVCCalculatorBase from '../abstract-base-vc-calculator';
3
3
  export declare const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS: string[];
4
+ export declare const NON_VISUAL_ARIA_ATTRIBUTES: string[];
4
5
  export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
5
6
  constructor();
6
7
  protected isEntryIncluded(entry: VCObserverEntry): boolean;
@@ -1,6 +1,7 @@
1
1
  import type { VCObserverEntry } from '../../types';
2
2
  import AbstractVCCalculatorBase from '../abstract-base-vc-calculator';
3
3
  export declare const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS: string[];
4
+ export declare const NON_VISUAL_ARIA_ATTRIBUTES: string[];
4
5
  export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
5
6
  constructor();
6
7
  protected isEntryIncluded(entry: VCObserverEntry): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "3.13.3",
3
+ "version": "3.13.5",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -168,6 +168,9 @@
168
168
  },
169
169
  "platform_ufo_vc_observer_new_ssr_abort_listener": {
170
170
  "type": "boolean"
171
+ },
172
+ "platform_ufo_ignore_non_vis_attributes": {
173
+ "type": "boolean"
171
174
  }
172
175
  }
173
176
  }