@atlaskit/react-ufo 2.4.2 → 2.4.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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 2.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a03da52505965`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a03da52505965) -
8
+ Remove the flag from test files as well as its not present on LD or Statsig
9
+
10
+ ## 2.4.3
11
+
12
+ ### Patch Changes
13
+
14
+ - [#171491](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/171491)
15
+ [`85cd3e428869a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/85cd3e428869a) -
16
+ observe attributes VC90 impact via ufo:vc:next
17
+
3
18
  ## 2.4.2
4
19
 
5
20
  ### Patch Changes
@@ -80,7 +80,7 @@ var Observers = exports.Observers = /*#__PURE__*/function () {
80
80
  renderStop: -1
81
81
  };
82
82
  (_this$mutationObserve = this.mutationObserver) === null || _this$mutationObserve === void 0 || _this$mutationObserve.observe(document.body, {
83
- attributeFilter: ['hidden', 'style', 'src'],
83
+ attributeFilter: (0, _platformFeatureFlags.fg)('platform-ufo-vc-observe-attributes') ? ['hidden', 'style', 'src', 'class'] : ['hidden', 'style', 'src'],
84
84
  attributeOldValue: true,
85
85
  attributes: true,
86
86
  childList: true,
@@ -196,12 +196,8 @@ var Observers = exports.Observers = /*#__PURE__*/function () {
196
196
  });
197
197
  } else if (mutation.type === 'attributes') {
198
198
  if (mutation.target instanceof HTMLElement) {
199
- // Commenting the following line temporarily.
200
- // this.observeElement(mutation.target, mutation, 'attr', ignoreReason);
201
-
202
- // using the if below to collect data
203
- // how would VC90 changes if only style display changes are accounted for
204
- if (mutation.attributeName === 'style' && _this2.getStyleDisplay(mutation.target.getAttribute('style')) !== _this2.getStyleDisplay(mutation.oldValue)) {
199
+ var isDisplayStyleAttributeMutation = mutation.attributeName === 'style' && _this2.getStyleDisplay(mutation.target.getAttribute('style')) !== _this2.getStyleDisplay(mutation.oldValue);
200
+ if ((0, _platformFeatureFlags.fg)('platform-ufo-vc-observe-attributes') || isDisplayStyleAttributeMutation) {
205
201
  _this2.observeElement(mutation.target, mutation, 'attr', ignoreReason);
206
202
  }
207
203
  }
@@ -62,7 +62,7 @@ export class Observers {
62
62
  renderStop: -1
63
63
  };
64
64
  (_this$mutationObserve = this.mutationObserver) === null || _this$mutationObserve === void 0 ? void 0 : _this$mutationObserve.observe(document.body, {
65
- attributeFilter: ['hidden', 'style', 'src'],
65
+ attributeFilter: fg('platform-ufo-vc-observe-attributes') ? ['hidden', 'style', 'src', 'class'] : ['hidden', 'style', 'src'],
66
66
  attributeOldValue: true,
67
67
  attributes: true,
68
68
  childList: true,
@@ -164,12 +164,8 @@ export class Observers {
164
164
  });
165
165
  } else if (mutation.type === 'attributes') {
166
166
  if (mutation.target instanceof HTMLElement) {
167
- // Commenting the following line temporarily.
168
- // this.observeElement(mutation.target, mutation, 'attr', ignoreReason);
169
-
170
- // using the if below to collect data
171
- // how would VC90 changes if only style display changes are accounted for
172
- if (mutation.attributeName === 'style' && this.getStyleDisplay(mutation.target.getAttribute('style')) !== this.getStyleDisplay(mutation.oldValue)) {
167
+ const isDisplayStyleAttributeMutation = mutation.attributeName === 'style' && this.getStyleDisplay(mutation.target.getAttribute('style')) !== this.getStyleDisplay(mutation.oldValue);
168
+ if (fg('platform-ufo-vc-observe-attributes') || isDisplayStyleAttributeMutation) {
173
169
  this.observeElement(mutation.target, mutation, 'attr', ignoreReason);
174
170
  }
175
171
  }
@@ -73,7 +73,7 @@ export var Observers = /*#__PURE__*/function () {
73
73
  renderStop: -1
74
74
  };
75
75
  (_this$mutationObserve = this.mutationObserver) === null || _this$mutationObserve === void 0 || _this$mutationObserve.observe(document.body, {
76
- attributeFilter: ['hidden', 'style', 'src'],
76
+ attributeFilter: fg('platform-ufo-vc-observe-attributes') ? ['hidden', 'style', 'src', 'class'] : ['hidden', 'style', 'src'],
77
77
  attributeOldValue: true,
78
78
  attributes: true,
79
79
  childList: true,
@@ -189,12 +189,8 @@ export var Observers = /*#__PURE__*/function () {
189
189
  });
190
190
  } else if (mutation.type === 'attributes') {
191
191
  if (mutation.target instanceof HTMLElement) {
192
- // Commenting the following line temporarily.
193
- // this.observeElement(mutation.target, mutation, 'attr', ignoreReason);
194
-
195
- // using the if below to collect data
196
- // how would VC90 changes if only style display changes are accounted for
197
- if (mutation.attributeName === 'style' && _this2.getStyleDisplay(mutation.target.getAttribute('style')) !== _this2.getStyleDisplay(mutation.oldValue)) {
192
+ var isDisplayStyleAttributeMutation = mutation.attributeName === 'style' && _this2.getStyleDisplay(mutation.target.getAttribute('style')) !== _this2.getStyleDisplay(mutation.oldValue);
193
+ if (fg('platform-ufo-vc-observe-attributes') || isDisplayStyleAttributeMutation) {
198
194
  _this2.observeElement(mutation.target, mutation, 'attr', ignoreReason);
199
195
  }
200
196
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "2.4.2",
3
+ "version": "2.4.4",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -130,6 +130,9 @@
130
130
  "platform-ufo-invisible-element-vc-calculations": {
131
131
  "type": "boolean"
132
132
  },
133
+ "platform-ufo-vc-observe-attributes": {
134
+ "type": "boolean"
135
+ },
133
136
  "react-ufo-payload-segment-compressed": {
134
137
  "type": "boolean"
135
138
  },