@atlaskit/react-ufo 4.11.5 → 4.11.7

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,19 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 4.11.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`273616f4575b7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/273616f4575b7) -
8
+ FG cleanup - platform_ufo_enable_minor_interactions
9
+
10
+ ## 4.11.6
11
+
12
+ ### Patch Changes
13
+
14
+ - [`b629e44ac5c35`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b629e44ac5c35) -
15
+ Do not send prior fg for press interactions
16
+
3
17
  ## 4.11.5
4
18
 
5
19
  ### Patch Changes
@@ -557,7 +557,7 @@ function _createInteractionMetricsPayload() {
557
557
  'ufo:multipayload': true,
558
558
  'ufo:criticalPayloadCount': criticalPayloadCount
559
559
  } : {}), (0, _getBrowserMetadata.getBrowserMetadataToLegacyFormat)()), getSSRProperties(type)), getAssetsMetrics(interaction, pageLoadInteractionMetrics === null || pageLoadInteractionMetrics === void 0 ? void 0 : pageLoadInteractionMetrics.SSRDoneTime)), getPPSMetrics(interaction)), paintMetrics), (0, _getNavigationMetrics.getNavigationMetricsToLegacyFormat)(type)), finalVCMetrics), experimentalMetrics), (_config$additionalPay = config.additionalPayloadData) === null || _config$additionalPay === void 0 ? void 0 : _config$additionalPay.call(config, interaction)), getTracingContextData(interaction)), getStylesheetMetrics()), getErrorCounts(interaction)), getReactHydrationStats()), {}, {
560
- interactionMetrics: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
560
+ interactionMetrics: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
561
561
  namePrefix: config.namePrefix || '',
562
562
  segmentPrefix: config.segmentPrefix || '',
563
563
  interactionId: interactionId,
@@ -581,7 +581,8 @@ function _createInteractionMetricsPayload() {
581
581
  segments: (0, _getReactUfoPayloadVersion.getReactUFOPayloadVersion)(interaction.type) === '2.0.0' ? segmentTree : (0, _utils.getOldSegmentsLabelStack)(segments, interaction.type),
582
582
  marks: (0, _optimizeMarks.optimizeMarks)(interaction.marks, (0, _getReactUfoPayloadVersion.getReactUFOPayloadVersion)(interaction.type)),
583
583
  customData: optimizeCustomData(interaction),
584
- reactProfilerTimings: (0, _optimizeReactProfilerTimings.optimizeReactProfilerTimings)(interaction.reactProfilerTimings, start, (0, _getReactUfoPayloadVersion.getReactUFOPayloadVersion)(interaction.type))
584
+ reactProfilerTimings: (0, _optimizeReactProfilerTimings.optimizeReactProfilerTimings)(interaction.reactProfilerTimings, start, (0, _getReactUfoPayloadVersion.getReactUFOPayloadVersion)(interaction.type)),
585
+ minorInteractions: interaction.minorInteractions
585
586
  }, responsiveness ? {
586
587
  responsiveness: responsiveness
587
588
  } : {}), labelStack), pageLoadInteractionMetrics), getDetailedInteractionMetrics(resourceTimings)), getPageLoadDetailedInteractionMetrics()), getBm3TrackerTimings(interaction)), {}, {
@@ -591,8 +592,6 @@ function _createInteractionMetricsPayload() {
591
592
  unknownElementName: unknownElementName
592
593
  } : {}), unknownElementHierarchy ? {
593
594
  unknownElementHierarchy: unknownElementHierarchy
594
- } : {}), (0, _platformFeatureFlags.fg)('platform_ufo_enable_minor_interactions') ? {
595
- minorInteractions: interaction.minorInteractions
596
595
  } : {}),
597
596
  'ufo:payloadTime': (0, _roundNumber.roundEpsilon)(performance.now() - interactionPayloadStart)
598
597
  })
@@ -1045,9 +1045,7 @@ function addNewInteraction(interactionId, ufoName, type, startTime, rate, labelS
1045
1045
  };
1046
1046
  vcObserver = (0, _vc.newVCObserver)(vcOptions);
1047
1047
  }
1048
-
1049
- // Create per-interaction VC observer when feature flag is enabled
1050
-
1048
+ var priorAccessedFg = type === 'press' && (0, _platformFeatureFlags.fg)('platform_ufo_drop_prior_fg_interactions') ? {} : Object.fromEntries(_featureFlagsAccessed.allFeatureFlagsAccessed);
1051
1049
  var metrics = {
1052
1050
  id: interactionId,
1053
1051
  start: startTime,
@@ -1079,7 +1077,7 @@ function addNewInteraction(interactionId, ufoName, type, startTime, rate, labelS
1079
1077
  labelStack: labelStack,
1080
1078
  routeName: routeName !== null && routeName !== void 0 ? routeName : ufoName,
1081
1079
  featureFlags: addFeatureFlagsToInteraction ? {
1082
- prior: Object.fromEntries(_featureFlagsAccessed.allFeatureFlagsAccessed),
1080
+ prior: priorAccessedFg,
1083
1081
  during: {}
1084
1082
  } : undefined,
1085
1083
  knownSegments: [],
@@ -11,7 +11,6 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
11
11
  var _react = _interopRequireWildcard(require("react"));
12
12
  var _scheduler = require("scheduler");
13
13
  var _uuid = require("uuid");
14
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
14
  var _coinflip = _interopRequireDefault(require("../coinflip"));
16
15
  var _config = require("../config");
17
16
  var _experienceTraceIdContext = require("../experience-trace-id-context");
@@ -160,26 +159,20 @@ function UFOSegment(_ref) {
160
159
  this._internalHoldByID(labelStack, id, name, true);
161
160
  },
162
161
  tracePress: function tracePress() {
162
+ var _getDoNotAbortActiveP, _getMinorInteractions;
163
163
  var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'unknown';
164
164
  var timestamp = arguments.length > 1 ? arguments[1] : undefined;
165
- if ((0, _platformFeatureFlags.fg)('platform_ufo_enable_minor_interactions')) {
166
- var _getDoNotAbortActiveP, _getMinorInteractions;
167
- var minorInteractions = [].concat((0, _toConsumableArray2.default)((_getDoNotAbortActiveP = (0, _config.getDoNotAbortActivePressInteraction)()) !== null && _getDoNotAbortActiveP !== void 0 ? _getDoNotAbortActiveP : []), (0, _toConsumableArray2.default)((_getMinorInteractions = (0, _config.getMinorInteractions)()) !== null && _getMinorInteractions !== void 0 ? _getMinorInteractions : []));
168
- if (minorInteractions.includes(name)) {
169
- var _activeInteraction$mi;
170
- var activeInteraction = (0, _interactionMetrics.getActiveInteraction)();
171
- activeInteraction === null || activeInteraction === void 0 || (_activeInteraction$mi = activeInteraction.minorInteractions) === null || _activeInteraction$mi === void 0 || _activeInteraction$mi.push({
172
- name: name,
173
- startTime: timestamp !== null && timestamp !== void 0 ? timestamp : performance.now()
174
- });
175
- return;
176
- } else if (interactionId.current != null) {
177
- (0, _interactionMetrics.abortByNewInteraction)(interactionId.current, name);
178
- }
179
- } else {
180
- if (interactionId.current != null) {
181
- (0, _interactionMetrics.abortByNewInteraction)(interactionId.current, name);
182
- }
165
+ var minorInteractions = [].concat((0, _toConsumableArray2.default)((_getDoNotAbortActiveP = (0, _config.getDoNotAbortActivePressInteraction)()) !== null && _getDoNotAbortActiveP !== void 0 ? _getDoNotAbortActiveP : []), (0, _toConsumableArray2.default)((_getMinorInteractions = (0, _config.getMinorInteractions)()) !== null && _getMinorInteractions !== void 0 ? _getMinorInteractions : []));
166
+ if (minorInteractions.includes(name)) {
167
+ var _activeInteraction$mi;
168
+ var activeInteraction = (0, _interactionMetrics.getActiveInteraction)();
169
+ activeInteraction === null || activeInteraction === void 0 || (_activeInteraction$mi = activeInteraction.minorInteractions) === null || _activeInteraction$mi === void 0 || _activeInteraction$mi.push({
170
+ name: name,
171
+ startTime: timestamp !== null && timestamp !== void 0 ? timestamp : performance.now()
172
+ });
173
+ return;
174
+ } else if (interactionId.current != null) {
175
+ (0, _interactionMetrics.abortByNewInteraction)(interactionId.current, name);
183
176
  }
184
177
  var rate = (0, _config.getInteractionRate)(name, 'press');
185
178
  if ((0, _coinflip.default)(rate)) {
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _uuid = require("uuid");
9
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
9
  var _coinflip = _interopRequireDefault(require("../../coinflip"));
11
10
  var _config = require("../../config");
12
11
  var _experienceTraceIdContext = require("../../experience-trace-id-context");
@@ -14,33 +13,20 @@ var _interactionIdContext = require("../../interaction-id-context");
14
13
  var _interactionMetrics = require("../../interaction-metrics");
15
14
  var _routeNameContext = _interopRequireDefault(require("../../route-name-context"));
16
15
  function traceUFOInteraction(name, interactionType, startTime) {
16
+ var _getMinorInteractions;
17
17
  var rate = (0, _config.getInteractionRate)(name, interactionType);
18
18
  var pressInteractionsList = (0, _config.getDoNotAbortActivePressInteraction)();
19
- if ((0, _platformFeatureFlags.fg)('platform_ufo_enable_minor_interactions')) {
20
- var _getMinorInteractions;
21
- var minorInteractions = (pressInteractionsList !== null && pressInteractionsList !== void 0 ? pressInteractionsList : []).concat((_getMinorInteractions = (0, _config.getMinorInteractions)()) !== null && _getMinorInteractions !== void 0 ? _getMinorInteractions : []);
22
- if (minorInteractions.includes(name)) {
23
- var _activeInteraction$mi;
24
- var activeInteraction = (0, _interactionMetrics.getActiveInteraction)();
25
- activeInteraction === null || activeInteraction === void 0 || (_activeInteraction$mi = activeInteraction.minorInteractions) === null || _activeInteraction$mi === void 0 || _activeInteraction$mi.push({
26
- name: name,
27
- startTime: startTime !== null && startTime !== void 0 ? startTime : performance.now()
28
- });
29
- return;
30
- } else {
31
- (0, _interactionMetrics.abortAll)('new_interaction', name);
32
- }
19
+ var minorInteractions = (pressInteractionsList !== null && pressInteractionsList !== void 0 ? pressInteractionsList : []).concat((_getMinorInteractions = (0, _config.getMinorInteractions)()) !== null && _getMinorInteractions !== void 0 ? _getMinorInteractions : []);
20
+ if (minorInteractions.includes(name)) {
21
+ var _activeInteraction$mi;
22
+ var activeInteraction = (0, _interactionMetrics.getActiveInteraction)();
23
+ activeInteraction === null || activeInteraction === void 0 || (_activeInteraction$mi = activeInteraction.minorInteractions) === null || _activeInteraction$mi === void 0 || _activeInteraction$mi.push({
24
+ name: name,
25
+ startTime: startTime !== null && startTime !== void 0 ? startTime : performance.now()
26
+ });
27
+ return;
33
28
  } else {
34
- if (pressInteractionsList !== null && pressInteractionsList !== void 0 && pressInteractionsList.includes(name)) {
35
- var interaction = (0, _interactionMetrics.getActiveInteraction)();
36
- if ((interaction === null || interaction === void 0 ? void 0 : interaction.ufoName) !== 'unknown' && (interaction === null || interaction === void 0 ? void 0 : interaction.type) === 'press') {
37
- return;
38
- }
39
- } else {
40
- // Abort any existing interaction regardless of the coinflip outcome
41
- // Ensures measurements are not carried over between distinct interactions
42
- (0, _interactionMetrics.abortAll)('new_interaction', name);
43
- }
29
+ (0, _interactionMetrics.abortAll)('new_interaction', name);
44
30
  }
45
31
  if ((0, _coinflip.default)(rate)) {
46
32
  var startTimestamp = startTime !== null && startTime !== void 0 ? startTime : performance.now();
@@ -577,6 +577,7 @@ async function createInteractionMetricsPayload(interaction, interactionId, exper
577
577
  marks: optimizeMarks(interaction.marks, getReactUFOPayloadVersion(interaction.type)),
578
578
  customData: optimizeCustomData(interaction),
579
579
  reactProfilerTimings: optimizeReactProfilerTimings(interaction.reactProfilerTimings, start, getReactUFOPayloadVersion(interaction.type)),
580
+ minorInteractions: interaction.minorInteractions,
580
581
  ...(responsiveness ? {
581
582
  responsiveness
582
583
  } : {}),
@@ -592,9 +593,6 @@ async function createInteractionMetricsPayload(interaction, interactionId, exper
592
593
  } : {}),
593
594
  ...(unknownElementHierarchy ? {
594
595
  unknownElementHierarchy
595
- } : {}),
596
- ...(fg('platform_ufo_enable_minor_interactions') ? {
597
- minorInteractions: interaction.minorInteractions
598
596
  } : {})
599
597
  },
600
598
  'ufo:payloadTime': roundEpsilon(performance.now() - interactionPayloadStart)
@@ -924,9 +924,7 @@ export function addNewInteraction(interactionId, ufoName, type, startTime, rate,
924
924
  };
925
925
  vcObserver = newVCObserver(vcOptions);
926
926
  }
927
-
928
- // Create per-interaction VC observer when feature flag is enabled
929
-
927
+ const priorAccessedFg = type === 'press' && fg('platform_ufo_drop_prior_fg_interactions') ? {} : Object.fromEntries(allFeatureFlagsAccessed);
930
928
  const metrics = {
931
929
  id: interactionId,
932
930
  start: startTime,
@@ -958,7 +956,7 @@ export function addNewInteraction(interactionId, ufoName, type, startTime, rate,
958
956
  labelStack,
959
957
  routeName: routeName !== null && routeName !== void 0 ? routeName : ufoName,
960
958
  featureFlags: addFeatureFlagsToInteraction ? {
961
- prior: Object.fromEntries(allFeatureFlagsAccessed),
959
+ prior: priorAccessedFg,
962
960
  during: {}
963
961
  } : undefined,
964
962
  knownSegments: [],
@@ -1,7 +1,6 @@
1
1
  import React, { Profiler, useCallback, useContext, useEffect, useMemo, useRef } from 'react';
2
2
  import { unstable_NormalPriority as NormalPriority, unstable_scheduleCallback as scheduleCallback } from 'scheduler';
3
3
  import { v4 as createUUID } from 'uuid';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import coinflip from '../coinflip';
6
5
  import { getConfig, getDoNotAbortActivePressInteraction, getInteractionRate, getMinorInteractions } from '../config';
7
6
  import { getActiveTrace, setInteractionActiveTrace } from '../experience-trace-id-context';
@@ -141,24 +140,18 @@ export default function UFOSegment({
141
140
  this._internalHoldByID(labelStack, id, name, true);
142
141
  },
143
142
  tracePress(name = 'unknown', timestamp) {
144
- if (fg('platform_ufo_enable_minor_interactions')) {
145
- var _getDoNotAbortActiveP, _getMinorInteractions;
146
- const minorInteractions = [...((_getDoNotAbortActiveP = getDoNotAbortActivePressInteraction()) !== null && _getDoNotAbortActiveP !== void 0 ? _getDoNotAbortActiveP : []), ...((_getMinorInteractions = getMinorInteractions()) !== null && _getMinorInteractions !== void 0 ? _getMinorInteractions : [])];
147
- if (minorInteractions.includes(name)) {
148
- var _activeInteraction$mi;
149
- const activeInteraction = getActiveInteraction();
150
- activeInteraction === null || activeInteraction === void 0 ? void 0 : (_activeInteraction$mi = activeInteraction.minorInteractions) === null || _activeInteraction$mi === void 0 ? void 0 : _activeInteraction$mi.push({
151
- name,
152
- startTime: timestamp !== null && timestamp !== void 0 ? timestamp : performance.now()
153
- });
154
- return;
155
- } else if (interactionId.current != null) {
156
- abortByNewInteraction(interactionId.current, name);
157
- }
158
- } else {
159
- if (interactionId.current != null) {
160
- abortByNewInteraction(interactionId.current, name);
161
- }
143
+ var _getDoNotAbortActiveP, _getMinorInteractions;
144
+ const minorInteractions = [...((_getDoNotAbortActiveP = getDoNotAbortActivePressInteraction()) !== null && _getDoNotAbortActiveP !== void 0 ? _getDoNotAbortActiveP : []), ...((_getMinorInteractions = getMinorInteractions()) !== null && _getMinorInteractions !== void 0 ? _getMinorInteractions : [])];
145
+ if (minorInteractions.includes(name)) {
146
+ var _activeInteraction$mi;
147
+ const activeInteraction = getActiveInteraction();
148
+ activeInteraction === null || activeInteraction === void 0 ? void 0 : (_activeInteraction$mi = activeInteraction.minorInteractions) === null || _activeInteraction$mi === void 0 ? void 0 : _activeInteraction$mi.push({
149
+ name,
150
+ startTime: timestamp !== null && timestamp !== void 0 ? timestamp : performance.now()
151
+ });
152
+ return;
153
+ } else if (interactionId.current != null) {
154
+ abortByNewInteraction(interactionId.current, name);
162
155
  }
163
156
  const rate = getInteractionRate(name, 'press');
164
157
  if (coinflip(rate)) {
@@ -1,5 +1,4 @@
1
1
  import { v4 as createUUID } from 'uuid';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import coinflip from '../../coinflip';
4
3
  import { getDoNotAbortActivePressInteraction, getInteractionRate, getMinorInteractions } from '../../config';
5
4
  import { getActiveTrace, setInteractionActiveTrace } from '../../experience-trace-id-context';
@@ -7,33 +6,20 @@ import { DefaultInteractionID } from '../../interaction-id-context';
7
6
  import { abortAll, addNewInteraction, getActiveInteraction } from '../../interaction-metrics';
8
7
  import UFORouteName from '../../route-name-context';
9
8
  function traceUFOInteraction(name, interactionType, startTime) {
9
+ var _getMinorInteractions;
10
10
  const rate = getInteractionRate(name, interactionType);
11
11
  const pressInteractionsList = getDoNotAbortActivePressInteraction();
12
- if (fg('platform_ufo_enable_minor_interactions')) {
13
- var _getMinorInteractions;
14
- const minorInteractions = (pressInteractionsList !== null && pressInteractionsList !== void 0 ? pressInteractionsList : []).concat((_getMinorInteractions = getMinorInteractions()) !== null && _getMinorInteractions !== void 0 ? _getMinorInteractions : []);
15
- if (minorInteractions.includes(name)) {
16
- var _activeInteraction$mi;
17
- const activeInteraction = getActiveInteraction();
18
- activeInteraction === null || activeInteraction === void 0 ? void 0 : (_activeInteraction$mi = activeInteraction.minorInteractions) === null || _activeInteraction$mi === void 0 ? void 0 : _activeInteraction$mi.push({
19
- name,
20
- startTime: startTime !== null && startTime !== void 0 ? startTime : performance.now()
21
- });
22
- return;
23
- } else {
24
- abortAll('new_interaction', name);
25
- }
12
+ const minorInteractions = (pressInteractionsList !== null && pressInteractionsList !== void 0 ? pressInteractionsList : []).concat((_getMinorInteractions = getMinorInteractions()) !== null && _getMinorInteractions !== void 0 ? _getMinorInteractions : []);
13
+ if (minorInteractions.includes(name)) {
14
+ var _activeInteraction$mi;
15
+ const activeInteraction = getActiveInteraction();
16
+ activeInteraction === null || activeInteraction === void 0 ? void 0 : (_activeInteraction$mi = activeInteraction.minorInteractions) === null || _activeInteraction$mi === void 0 ? void 0 : _activeInteraction$mi.push({
17
+ name,
18
+ startTime: startTime !== null && startTime !== void 0 ? startTime : performance.now()
19
+ });
20
+ return;
26
21
  } else {
27
- if (pressInteractionsList !== null && pressInteractionsList !== void 0 && pressInteractionsList.includes(name)) {
28
- const interaction = getActiveInteraction();
29
- if ((interaction === null || interaction === void 0 ? void 0 : interaction.ufoName) !== 'unknown' && (interaction === null || interaction === void 0 ? void 0 : interaction.type) === 'press') {
30
- return;
31
- }
32
- } else {
33
- // Abort any existing interaction regardless of the coinflip outcome
34
- // Ensures measurements are not carried over between distinct interactions
35
- abortAll('new_interaction', name);
36
- }
22
+ abortAll('new_interaction', name);
37
23
  }
38
24
  if (coinflip(rate)) {
39
25
  const startTimestamp = startTime !== null && startTime !== void 0 ? startTime : performance.now();
@@ -549,7 +549,7 @@ function _createInteractionMetricsPayload() {
549
549
  'ufo:multipayload': true,
550
550
  'ufo:criticalPayloadCount': criticalPayloadCount
551
551
  } : {}), getBrowserMetadataToLegacyFormat()), getSSRProperties(type)), getAssetsMetrics(interaction, pageLoadInteractionMetrics === null || pageLoadInteractionMetrics === void 0 ? void 0 : pageLoadInteractionMetrics.SSRDoneTime)), getPPSMetrics(interaction)), paintMetrics), getNavigationMetricsToLegacyFormat(type)), finalVCMetrics), experimentalMetrics), (_config$additionalPay = config.additionalPayloadData) === null || _config$additionalPay === void 0 ? void 0 : _config$additionalPay.call(config, interaction)), getTracingContextData(interaction)), getStylesheetMetrics()), getErrorCounts(interaction)), getReactHydrationStats()), {}, {
552
- interactionMetrics: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
552
+ interactionMetrics: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
553
553
  namePrefix: config.namePrefix || '',
554
554
  segmentPrefix: config.segmentPrefix || '',
555
555
  interactionId: interactionId,
@@ -573,7 +573,8 @@ function _createInteractionMetricsPayload() {
573
573
  segments: getReactUFOPayloadVersion(interaction.type) === '2.0.0' ? segmentTree : getOldSegmentsLabelStack(segments, interaction.type),
574
574
  marks: optimizeMarks(interaction.marks, getReactUFOPayloadVersion(interaction.type)),
575
575
  customData: optimizeCustomData(interaction),
576
- reactProfilerTimings: optimizeReactProfilerTimings(interaction.reactProfilerTimings, start, getReactUFOPayloadVersion(interaction.type))
576
+ reactProfilerTimings: optimizeReactProfilerTimings(interaction.reactProfilerTimings, start, getReactUFOPayloadVersion(interaction.type)),
577
+ minorInteractions: interaction.minorInteractions
577
578
  }, responsiveness ? {
578
579
  responsiveness: responsiveness
579
580
  } : {}), labelStack), pageLoadInteractionMetrics), getDetailedInteractionMetrics(resourceTimings)), getPageLoadDetailedInteractionMetrics()), getBm3TrackerTimings(interaction)), {}, {
@@ -583,8 +584,6 @@ function _createInteractionMetricsPayload() {
583
584
  unknownElementName: unknownElementName
584
585
  } : {}), unknownElementHierarchy ? {
585
586
  unknownElementHierarchy: unknownElementHierarchy
586
- } : {}), fg('platform_ufo_enable_minor_interactions') ? {
587
- minorInteractions: interaction.minorInteractions
588
587
  } : {}),
589
588
  'ufo:payloadTime': roundEpsilon(performance.now() - interactionPayloadStart)
590
589
  })
@@ -999,9 +999,7 @@ export function addNewInteraction(interactionId, ufoName, type, startTime, rate,
999
999
  };
1000
1000
  vcObserver = newVCObserver(vcOptions);
1001
1001
  }
1002
-
1003
- // Create per-interaction VC observer when feature flag is enabled
1004
-
1002
+ var priorAccessedFg = type === 'press' && fg('platform_ufo_drop_prior_fg_interactions') ? {} : Object.fromEntries(allFeatureFlagsAccessed);
1005
1003
  var metrics = {
1006
1004
  id: interactionId,
1007
1005
  start: startTime,
@@ -1033,7 +1031,7 @@ export function addNewInteraction(interactionId, ufoName, type, startTime, rate,
1033
1031
  labelStack: labelStack,
1034
1032
  routeName: routeName !== null && routeName !== void 0 ? routeName : ufoName,
1035
1033
  featureFlags: addFeatureFlagsToInteraction ? {
1036
- prior: Object.fromEntries(allFeatureFlagsAccessed),
1034
+ prior: priorAccessedFg,
1037
1035
  during: {}
1038
1036
  } : undefined,
1039
1037
  knownSegments: [],
@@ -5,7 +5,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import React, { Profiler, useCallback, useContext, useEffect, useMemo, useRef } from 'react';
6
6
  import { unstable_NormalPriority as NormalPriority, unstable_scheduleCallback as scheduleCallback } from 'scheduler';
7
7
  import { v4 as createUUID } from 'uuid';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  import coinflip from '../coinflip';
10
9
  import { getConfig, getDoNotAbortActivePressInteraction, getInteractionRate, getMinorInteractions } from '../config';
11
10
  import { getActiveTrace, setInteractionActiveTrace } from '../experience-trace-id-context';
@@ -151,26 +150,20 @@ export default function UFOSegment(_ref) {
151
150
  this._internalHoldByID(labelStack, id, name, true);
152
151
  },
153
152
  tracePress: function tracePress() {
153
+ var _getDoNotAbortActiveP, _getMinorInteractions;
154
154
  var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'unknown';
155
155
  var timestamp = arguments.length > 1 ? arguments[1] : undefined;
156
- if (fg('platform_ufo_enable_minor_interactions')) {
157
- var _getDoNotAbortActiveP, _getMinorInteractions;
158
- var minorInteractions = [].concat(_toConsumableArray((_getDoNotAbortActiveP = getDoNotAbortActivePressInteraction()) !== null && _getDoNotAbortActiveP !== void 0 ? _getDoNotAbortActiveP : []), _toConsumableArray((_getMinorInteractions = getMinorInteractions()) !== null && _getMinorInteractions !== void 0 ? _getMinorInteractions : []));
159
- if (minorInteractions.includes(name)) {
160
- var _activeInteraction$mi;
161
- var activeInteraction = getActiveInteraction();
162
- activeInteraction === null || activeInteraction === void 0 || (_activeInteraction$mi = activeInteraction.minorInteractions) === null || _activeInteraction$mi === void 0 || _activeInteraction$mi.push({
163
- name: name,
164
- startTime: timestamp !== null && timestamp !== void 0 ? timestamp : performance.now()
165
- });
166
- return;
167
- } else if (interactionId.current != null) {
168
- abortByNewInteraction(interactionId.current, name);
169
- }
170
- } else {
171
- if (interactionId.current != null) {
172
- abortByNewInteraction(interactionId.current, name);
173
- }
156
+ var minorInteractions = [].concat(_toConsumableArray((_getDoNotAbortActiveP = getDoNotAbortActivePressInteraction()) !== null && _getDoNotAbortActiveP !== void 0 ? _getDoNotAbortActiveP : []), _toConsumableArray((_getMinorInteractions = getMinorInteractions()) !== null && _getMinorInteractions !== void 0 ? _getMinorInteractions : []));
157
+ if (minorInteractions.includes(name)) {
158
+ var _activeInteraction$mi;
159
+ var activeInteraction = getActiveInteraction();
160
+ activeInteraction === null || activeInteraction === void 0 || (_activeInteraction$mi = activeInteraction.minorInteractions) === null || _activeInteraction$mi === void 0 || _activeInteraction$mi.push({
161
+ name: name,
162
+ startTime: timestamp !== null && timestamp !== void 0 ? timestamp : performance.now()
163
+ });
164
+ return;
165
+ } else if (interactionId.current != null) {
166
+ abortByNewInteraction(interactionId.current, name);
174
167
  }
175
168
  var rate = getInteractionRate(name, 'press');
176
169
  if (coinflip(rate)) {
@@ -1,5 +1,4 @@
1
1
  import { v4 as createUUID } from 'uuid';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import coinflip from '../../coinflip';
4
3
  import { getDoNotAbortActivePressInteraction, getInteractionRate, getMinorInteractions } from '../../config';
5
4
  import { getActiveTrace, setInteractionActiveTrace } from '../../experience-trace-id-context';
@@ -7,33 +6,20 @@ import { DefaultInteractionID } from '../../interaction-id-context';
7
6
  import { abortAll, addNewInteraction, getActiveInteraction } from '../../interaction-metrics';
8
7
  import UFORouteName from '../../route-name-context';
9
8
  function traceUFOInteraction(name, interactionType, startTime) {
9
+ var _getMinorInteractions;
10
10
  var rate = getInteractionRate(name, interactionType);
11
11
  var pressInteractionsList = getDoNotAbortActivePressInteraction();
12
- if (fg('platform_ufo_enable_minor_interactions')) {
13
- var _getMinorInteractions;
14
- var minorInteractions = (pressInteractionsList !== null && pressInteractionsList !== void 0 ? pressInteractionsList : []).concat((_getMinorInteractions = getMinorInteractions()) !== null && _getMinorInteractions !== void 0 ? _getMinorInteractions : []);
15
- if (minorInteractions.includes(name)) {
16
- var _activeInteraction$mi;
17
- var activeInteraction = getActiveInteraction();
18
- activeInteraction === null || activeInteraction === void 0 || (_activeInteraction$mi = activeInteraction.minorInteractions) === null || _activeInteraction$mi === void 0 || _activeInteraction$mi.push({
19
- name: name,
20
- startTime: startTime !== null && startTime !== void 0 ? startTime : performance.now()
21
- });
22
- return;
23
- } else {
24
- abortAll('new_interaction', name);
25
- }
12
+ var minorInteractions = (pressInteractionsList !== null && pressInteractionsList !== void 0 ? pressInteractionsList : []).concat((_getMinorInteractions = getMinorInteractions()) !== null && _getMinorInteractions !== void 0 ? _getMinorInteractions : []);
13
+ if (minorInteractions.includes(name)) {
14
+ var _activeInteraction$mi;
15
+ var activeInteraction = getActiveInteraction();
16
+ activeInteraction === null || activeInteraction === void 0 || (_activeInteraction$mi = activeInteraction.minorInteractions) === null || _activeInteraction$mi === void 0 || _activeInteraction$mi.push({
17
+ name: name,
18
+ startTime: startTime !== null && startTime !== void 0 ? startTime : performance.now()
19
+ });
20
+ return;
26
21
  } else {
27
- if (pressInteractionsList !== null && pressInteractionsList !== void 0 && pressInteractionsList.includes(name)) {
28
- var interaction = getActiveInteraction();
29
- if ((interaction === null || interaction === void 0 ? void 0 : interaction.ufoName) !== 'unknown' && (interaction === null || interaction === void 0 ? void 0 : interaction.type) === 'press') {
30
- return;
31
- }
32
- } else {
33
- // Abort any existing interaction regardless of the coinflip outcome
34
- // Ensures measurements are not carried over between distinct interactions
35
- abortAll('new_interaction', name);
36
- }
22
+ abortAll('new_interaction', name);
37
23
  }
38
24
  if (coinflip(rate)) {
39
25
  var startTimestamp = startTime !== null && startTime !== void 0 ? startTime : performance.now();