@atlaskit/react-ufo 4.5.2 → 4.5.3

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,12 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 4.5.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5c1bb03531687`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5c1bb03531687) -
8
+ FG cleanup - platform_ufo_handle_non_react_element_for_3p
9
+
3
10
  ## 4.5.2
4
11
 
5
12
  ### Patch Changes
@@ -6,11 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.cleanupCaches = cleanupCaches;
8
8
  exports.default = checkWithinComponent;
9
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
9
  var _coinflip = _interopRequireDefault(require("../../../../coinflip"));
11
10
  var _checkFiberWithinComponent = _interopRequireDefault(require("./check-fiber-within-component"));
12
11
  var _findFiberWithCache = _interopRequireDefault(require("./find-fiber-with-cache"));
13
- var _findReactFiber = _interopRequireDefault(require("./find-react-fiber"));
14
12
  var DEFAULT_MAX_LEVEL = 20;
15
13
 
16
14
  // Cache cleanup
@@ -37,27 +35,21 @@ function checkWithinComponent(node, targetComponentName, resultCache) {
37
35
  }
38
36
  var fiber = null;
39
37
  var checkedNodes = [];
40
- if ((0, _platformFeatureFlags.fg)('platform_ufo_handle_non_react_element_for_3p')) {
41
- fiber = (0, _findFiberWithCache.default)(node, DEFAULT_MAX_LEVEL, checkedNodes);
42
- } else {
43
- fiber = (0, _findReactFiber.default)(node);
44
- }
38
+
39
+ // Always use cached fiber strategy to handle non-React elements reliably
40
+ fiber = (0, _findFiberWithCache.default)(node, DEFAULT_MAX_LEVEL, checkedNodes);
45
41
  if (!fiber) {
46
- if ((0, _platformFeatureFlags.fg)('platform_ufo_handle_non_react_element_for_3p')) {
47
- checkedNodes.forEach(function (checkedNode) {
48
- resultCache.set(checkedNode, false);
49
- });
50
- }
42
+ checkedNodes.forEach(function (checkedNode) {
43
+ resultCache.set(checkedNode, false);
44
+ });
51
45
  return {
52
46
  isWithin: false
53
47
  };
54
48
  }
55
49
  var isWithin = (0, _checkFiberWithinComponent.default)(fiber, targetComponentName, DEFAULT_MAX_LEVEL);
56
- if ((0, _platformFeatureFlags.fg)('platform_ufo_handle_non_react_element_for_3p')) {
57
- checkedNodes.forEach(function (checkedNode) {
58
- resultCache.set(checkedNode, isWithin);
59
- });
60
- }
50
+ checkedNodes.forEach(function (checkedNode) {
51
+ resultCache.set(checkedNode, isWithin);
52
+ });
61
53
  return {
62
54
  isWithin: isWithin
63
55
  };
@@ -1,8 +1,6 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
1
  import coinflip from '../../../../coinflip';
3
2
  import checkFiberWithinComponent from './check-fiber-within-component';
4
3
  import findFiberWithCache from './find-fiber-with-cache';
5
- import findReactFiber from './find-react-fiber';
6
4
  const DEFAULT_MAX_LEVEL = 20;
7
5
 
8
6
  // Cache cleanup
@@ -29,27 +27,21 @@ export default function checkWithinComponent(node, targetComponentName, resultCa
29
27
  }
30
28
  let fiber = null;
31
29
  let checkedNodes = [];
32
- if (fg('platform_ufo_handle_non_react_element_for_3p')) {
33
- fiber = findFiberWithCache(node, DEFAULT_MAX_LEVEL, checkedNodes);
34
- } else {
35
- fiber = findReactFiber(node);
36
- }
30
+
31
+ // Always use cached fiber strategy to handle non-React elements reliably
32
+ fiber = findFiberWithCache(node, DEFAULT_MAX_LEVEL, checkedNodes);
37
33
  if (!fiber) {
38
- if (fg('platform_ufo_handle_non_react_element_for_3p')) {
39
- checkedNodes.forEach(checkedNode => {
40
- resultCache.set(checkedNode, false);
41
- });
42
- }
34
+ checkedNodes.forEach(checkedNode => {
35
+ resultCache.set(checkedNode, false);
36
+ });
43
37
  return {
44
38
  isWithin: false
45
39
  };
46
40
  }
47
41
  const isWithin = checkFiberWithinComponent(fiber, targetComponentName, DEFAULT_MAX_LEVEL);
48
- if (fg('platform_ufo_handle_non_react_element_for_3p')) {
49
- checkedNodes.forEach(checkedNode => {
50
- resultCache.set(checkedNode, isWithin);
51
- });
52
- }
42
+ checkedNodes.forEach(checkedNode => {
43
+ resultCache.set(checkedNode, isWithin);
44
+ });
53
45
  return {
54
46
  isWithin
55
47
  };
@@ -1,8 +1,6 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
1
  import coinflip from '../../../../coinflip';
3
2
  import checkFiberWithinComponent from './check-fiber-within-component';
4
3
  import findFiberWithCache from './find-fiber-with-cache';
5
- import findReactFiber from './find-react-fiber';
6
4
  var DEFAULT_MAX_LEVEL = 20;
7
5
 
8
6
  // Cache cleanup
@@ -29,27 +27,21 @@ export default function checkWithinComponent(node, targetComponentName, resultCa
29
27
  }
30
28
  var fiber = null;
31
29
  var checkedNodes = [];
32
- if (fg('platform_ufo_handle_non_react_element_for_3p')) {
33
- fiber = findFiberWithCache(node, DEFAULT_MAX_LEVEL, checkedNodes);
34
- } else {
35
- fiber = findReactFiber(node);
36
- }
30
+
31
+ // Always use cached fiber strategy to handle non-React elements reliably
32
+ fiber = findFiberWithCache(node, DEFAULT_MAX_LEVEL, checkedNodes);
37
33
  if (!fiber) {
38
- if (fg('platform_ufo_handle_non_react_element_for_3p')) {
39
- checkedNodes.forEach(function (checkedNode) {
40
- resultCache.set(checkedNode, false);
41
- });
42
- }
34
+ checkedNodes.forEach(function (checkedNode) {
35
+ resultCache.set(checkedNode, false);
36
+ });
43
37
  return {
44
38
  isWithin: false
45
39
  };
46
40
  }
47
41
  var isWithin = checkFiberWithinComponent(fiber, targetComponentName, DEFAULT_MAX_LEVEL);
48
- if (fg('platform_ufo_handle_non_react_element_for_3p')) {
49
- checkedNodes.forEach(function (checkedNode) {
50
- resultCache.set(checkedNode, isWithin);
51
- });
52
- }
42
+ checkedNodes.forEach(function (checkedNode) {
43
+ resultCache.set(checkedNode, isWithin);
44
+ });
53
45
  return {
54
46
  isWithin: isWithin
55
47
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "4.5.2",
3
+ "version": "4.5.3",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -175,9 +175,6 @@
175
175
  "platform_ufo_enable_vc_press_interactions": {
176
176
  "type": "boolean"
177
177
  },
178
- "platform_ufo_handle_non_react_element_for_3p": {
179
- "type": "boolean"
180
- },
181
178
  "platform_ufo_segment_critical_metrics": {
182
179
  "type": "boolean"
183
180
  },