@atlaskit/renderer 137.2.6 → 137.2.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,18 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 137.2.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`43740d342ffe7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/43740d342ffe7) -
8
+ Clean up feature gate `platform_renderer_sample_high_volume_events`. This means the "started" and
9
+ "rendered" analytics events will only be fired 10% of the time. This is designed to reduce running
10
+ costs. If you need to hook into the rendered lifecycle then you should use the `onRendered` hook.
11
+ - [`a6c26b16402ca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a6c26b16402ca) -
12
+ Migrate nine dogfooding editor experiments from `@atlaskit/tmp-editor-statsig` to the Platform
13
+ experiment API and move their tests to Platform experiment mocks.
14
+ - Updated dependencies
15
+
3
16
  ## 137.2.6
4
17
 
5
18
  ### Patch Changes
@@ -8,17 +8,17 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = Link;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
11
12
  var _componentWithCondition = require("@atlaskit/platform-feature-flags-react/component-with-condition");
12
13
  var _utils = require("../../utils");
13
14
  var _events = require("../../analytics/events");
14
15
  var _analytics = require("@atlaskit/editor-common/analytics");
15
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
16
  var _AnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-next/AnalyticsContext"));
17
17
  var _linkCompiled = require("./link-compiled");
18
18
  var _linkEmotion = require("./link-emotion");
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
20
  var LinkUrlMigration = (0, _componentWithCondition.componentWithCondition)(function () {
21
- return (0, _expValEquals.expValEquals)('platform_editor_renderer_static_css', 'isEnabled', true);
21
+ return (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_renderer_static_css');
22
22
  }, _linkCompiled.LinkUrlCompiled, _linkEmotion.LinkUrlEmotion);
23
23
  /**
24
24
  * Render an ADF link mark in renderer.
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = LayoutSection;
8
8
  var _react = _interopRequireDefault(require("react"));
9
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
9
10
  var _componentWithCondition = require("@atlaskit/platform-feature-flags-react/component-with-condition");
10
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
11
  var _layoutColumnCompiled = require("./layoutColumn-compiled");
12
12
  var _layoutColumnEmotion = require("./layoutColumn-emotion");
13
13
  var LayoutSectionMigration = (0, _componentWithCondition.componentWithCondition)(function () {
14
- return (0, _expValEquals.expValEquals)('platform_editor_renderer_static_css', 'isEnabled', true);
14
+ return (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_renderer_static_css');
15
15
  }, _layoutColumnCompiled.LayoutSectionCompiled, _layoutColumnEmotion.LayoutSectionEmotion);
16
16
 
17
17
  /**
@@ -11,8 +11,8 @@ var _icons = require("@atlaskit/editor-common/icons");
11
11
  var _panel2 = require("@atlaskit/editor-common/panel");
12
12
  var _emoji = _interopRequireDefault(require("@atlaskit/icon/core/emoji"));
13
13
  var _lightbulb = _interopRequireDefault(require("@atlaskit/icon/core/lightbulb"));
14
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
14
15
  var _componentWithCondition = require("@atlaskit/platform-feature-flags-react/component-with-condition");
15
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
16
  var _emoji2 = _interopRequireDefault(require("./emoji"));
17
17
  var _panelCompiled = require("./panel-compiled");
18
18
  var _panelEmotion = require("./panel-emotion");
@@ -26,7 +26,7 @@ var panelIcons = {
26
26
  custom: _emoji.default
27
27
  };
28
28
  var PanelStyledMigration = (0, _componentWithCondition.componentWithCondition)(function () {
29
- return (0, _expValEquals.expValEquals)('platform_editor_renderer_static_css', 'isEnabled', true);
29
+ return (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_renderer_static_css');
30
30
  }, _panelCompiled.PanelStyledCompiled, _panelEmotion.PanelStyledEmotion);
31
31
  var Panel = function Panel(props) {
32
32
  var allowCustomPanels = props.allowCustomPanels,
@@ -11,8 +11,8 @@ var _react = _interopRequireWildcard(require("react"));
11
11
  var _mediaClientProvider = require("@atlaskit/media-client-react/media-client-provider");
12
12
  var _getMediaClient = require("@atlaskit/media-client-react/get-media-client");
13
13
  var _providerFactory = require("@atlaskit/editor-common/provider-factory");
14
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
14
15
  var _fg = require("@atlaskit/platform-feature-flags/fg");
15
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
17
17
  var getMediaClientConfigForRenderer = function getMediaClientConfigForRenderer(provider) {
18
18
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -22,7 +22,7 @@ var EditorMediaClientProvider = exports.EditorMediaClientProvider = function Edi
22
22
  var children = _ref.children,
23
23
  ssr = _ref.ssr;
24
24
  var _useState = (0, _react.useState)(function () {
25
- return (0, _expValEquals.expValEquals)('platform_editor_media_reliability_enhancements', 'isEnabled', true) ? ssr === null || ssr === void 0 ? void 0 : ssr.config : undefined;
25
+ return (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_media_reliability_enhancements') ? ssr === null || ssr === void 0 ? void 0 : ssr.config : undefined;
26
26
  }),
27
27
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
28
28
  mediaClientConfig = _useState2[0],
@@ -44,7 +44,7 @@ var EditorMediaClientProvider = exports.EditorMediaClientProvider = function Edi
44
44
  *
45
45
  * hasProvider() is synchronous and correct from render 1, closing that window.
46
46
  */
47
- var shouldSkipContext = (0, _expValEquals.expValEquals)('platform_editor_media_reliability_enhancements', 'isEnabled', true) ? Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || providerFactory.hasProvider('mediaProvider') || mediaProvider) : Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || mediaProvider);
47
+ var shouldSkipContext = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_media_reliability_enhancements') ? Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || providerFactory.hasProvider('mediaProvider') || mediaProvider) : Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || mediaProvider);
48
48
  var contextMediaClient = (0, _react.useContext)(_mediaClientProvider.MediaClientContext);
49
49
 
50
50
  // MediaClientProvider currently requires a mediaClientConfig
@@ -70,7 +70,7 @@ var EditorMediaClientProvider = exports.EditorMediaClientProvider = function Edi
70
70
  // The two hooks below are mutually exclusive — only one runs per render — so there is no
71
71
  // actual chaining of state updates at runtime. The lint rule cannot statically prove this.
72
72
  (0, _react.useEffect)(function () {
73
- if (!(0, _expValEquals.expValEquals)('platform_editor_media_reliability_enhancements', 'isEnabled', true)) {
73
+ if (!(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_media_reliability_enhancements')) {
74
74
  return;
75
75
  }
76
76
  if (ssr !== null && ssr !== void 0 && ssr.config) {
@@ -96,7 +96,7 @@ var EditorMediaClientProvider = exports.EditorMediaClientProvider = function Edi
96
96
  // Legacy path (experiment off): keep useLayoutEffect to preserve existing behaviour.
97
97
  // remove this when clean up platform_editor_media_reliability_enhancements
98
98
  (0, _react.useLayoutEffect)(function () {
99
- if ((0, _expValEquals.expValEquals)('platform_editor_media_reliability_enhancements', 'isEnabled', true)) {
99
+ if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_media_reliability_enhancements')) {
100
100
  return;
101
101
  }
102
102
  if (ssr !== null && ssr !== void 0 && ssr.config) {
@@ -74,7 +74,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
74
74
  var TABLE_INFO_TIMEOUT = 10000;
75
75
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
76
76
  var packageName = "@atlaskit/renderer";
77
- var packageVersion = "137.2.5";
77
+ var packageVersion = "137.2.6";
78
78
  var setAsQueryContainerStyles = (0, _react2.css)({
79
79
  containerName: 'ak-renderer-wrapper',
80
80
  containerType: 'inline-size'
@@ -351,13 +351,13 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
351
351
  var heightWidthAnalyticsRicID;
352
352
  var heightWidthAnalyticsRafID;
353
353
  var handleAnalytics = function handleAnalytics() {
354
- if (!(0, _fg.fg)('platform_renderer_sample_high_volume_events') || Math.random() < RENDER_EVENT_SAMPLE_RATE) {
354
+ if (Math.random() < RENDER_EVENT_SAMPLE_RATE) {
355
355
  _fireAnalyticsEvent({
356
356
  action: _analytics.ACTION.STARTED,
357
357
  actionSubject: _analytics.ACTION_SUBJECT.RENDERER,
358
358
  attributes: {
359
359
  platform: _events.PLATFORM.WEB,
360
- sampleRate: (0, _fg.fg)('platform_renderer_sample_high_volume_events') ? RENDER_EVENT_SAMPLE_RATE : 1
360
+ sampleRate: RENDER_EVENT_SAMPLE_RATE
361
361
  },
362
362
  eventType: _analytics.EVENT_TYPE.UI
363
363
  });
@@ -399,11 +399,11 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
399
399
  nodes: nodes,
400
400
  nestedRendererType: nestedRendererType,
401
401
  severity: severity,
402
- sampleRate: (0, _fg.fg)('platform_renderer_sample_high_volume_events') ? RENDER_EVENT_SAMPLE_RATE : 1
402
+ sampleRate: RENDER_EVENT_SAMPLE_RATE
403
403
  },
404
404
  eventType: _analytics.EVENT_TYPE.OPERATIONAL
405
405
  };
406
- if (!(0, _fg.fg)('platform_renderer_sample_high_volume_events') || Math.random() < RENDER_EVENT_SAMPLE_RATE) {
406
+ if (Math.random() < RENDER_EVENT_SAMPLE_RATE) {
407
407
  _fireAnalyticsEvent(event);
408
408
  }
409
409
  }
@@ -1,14 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { Fragment } from 'react';
3
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
3
4
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
4
5
  import { getEventHandler } from '../../utils';
5
6
  import { PLATFORM, MODE } from '../../analytics/events';
6
7
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
7
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
8
  import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
9
9
  import { LinkUrlCompiled } from './link-compiled';
10
10
  import { LinkUrlEmotion } from './link-emotion';
11
- const LinkUrlMigration = componentWithCondition(() => expValEquals('platform_editor_renderer_static_css', 'isEnabled', true), LinkUrlCompiled, LinkUrlEmotion);
11
+ const LinkUrlMigration = componentWithCondition(() => isExperimentEnabled('platform_editor_renderer_static_css'), LinkUrlCompiled, LinkUrlEmotion);
12
12
  /**
13
13
  * Render an ADF link mark in renderer.
14
14
  */
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
2
3
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
4
  import { LayoutSectionCompiled } from './layoutColumn-compiled';
5
5
  import { LayoutSectionEmotion } from './layoutColumn-emotion';
6
- const LayoutSectionMigration = componentWithCondition(() => expValEquals('platform_editor_renderer_static_css', 'isEnabled', true), LayoutSectionCompiled, LayoutSectionEmotion);
6
+ const LayoutSectionMigration = componentWithCondition(() => isExperimentEnabled('platform_editor_renderer_static_css'), LayoutSectionCompiled, LayoutSectionEmotion);
7
7
 
8
8
  /**
9
9
  * Render a layout column in renderer.
@@ -4,8 +4,8 @@ import { PanelInfoIcon, PanelSuccessIcon, PanelNoteIcon, PanelWarningIcon, Panel
4
4
  import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
5
5
  import EmojiIcon from '@atlaskit/icon/core/emoji';
6
6
  import TipIcon from '@atlaskit/icon/core/lightbulb';
7
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
7
8
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
8
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
9
  import EmojiItem from './emoji';
10
10
  import { PanelStyledCompiled } from './panel-compiled';
11
11
  import { PanelStyledEmotion } from './panel-emotion';
@@ -18,7 +18,7 @@ const panelIcons = {
18
18
  error: PanelErrorIcon,
19
19
  custom: EmojiIcon
20
20
  };
21
- const PanelStyledMigration = componentWithCondition(() => expValEquals('platform_editor_renderer_static_css', 'isEnabled', true), PanelStyledCompiled, PanelStyledEmotion);
21
+ const PanelStyledMigration = componentWithCondition(() => isExperimentEnabled('platform_editor_renderer_static_css'), PanelStyledCompiled, PanelStyledEmotion);
22
22
  const Panel = props => {
23
23
  const {
24
24
  allowCustomPanels,
@@ -2,8 +2,8 @@ import React, { useContext, useEffect, useLayoutEffect, useMemo, useState } from
2
2
  import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
3
3
  import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
4
4
  import { useProviderFactory, useProviderLayout } from '@atlaskit/editor-common/provider-factory';
5
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
5
6
  import { fg } from '@atlaskit/platform-feature-flags/fg';
6
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
7
  const getMediaClientConfigForRenderer = provider => {
8
8
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
9
9
  return provider.viewAndUploadMediaClientConfig && fg('platform_media_video_captions') ? provider.viewAndUploadMediaClientConfig : provider.viewMediaClientConfig;
@@ -12,7 +12,7 @@ export const EditorMediaClientProvider = ({
12
12
  children,
13
13
  ssr
14
14
  }) => {
15
- const [mediaClientConfig, setMediaClientConfig] = useState(() => expValEquals('platform_editor_media_reliability_enhancements', 'isEnabled', true) ? ssr === null || ssr === void 0 ? void 0 : ssr.config : undefined);
15
+ const [mediaClientConfig, setMediaClientConfig] = useState(() => isExperimentEnabled('platform_editor_media_reliability_enhancements') ? ssr === null || ssr === void 0 ? void 0 : ssr.config : undefined);
16
16
  const providerFactory = useProviderFactory();
17
17
  const mediaProvider = useProviderLayout('mediaProvider');
18
18
 
@@ -30,7 +30,7 @@ export const EditorMediaClientProvider = ({
30
30
  *
31
31
  * hasProvider() is synchronous and correct from render 1, closing that window.
32
32
  */
33
- const shouldSkipContext = expValEquals('platform_editor_media_reliability_enhancements', 'isEnabled', true) ? Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || providerFactory.hasProvider('mediaProvider') || mediaProvider) : Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || mediaProvider);
33
+ const shouldSkipContext = isExperimentEnabled('platform_editor_media_reliability_enhancements') ? Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || providerFactory.hasProvider('mediaProvider') || mediaProvider) : Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || mediaProvider);
34
34
  const contextMediaClient = useContext(MediaClientContext);
35
35
 
36
36
  // MediaClientProvider currently requires a mediaClientConfig
@@ -54,7 +54,7 @@ export const EditorMediaClientProvider = ({
54
54
  // The two hooks below are mutually exclusive — only one runs per render — so there is no
55
55
  // actual chaining of state updates at runtime. The lint rule cannot statically prove this.
56
56
  useEffect(() => {
57
- if (!expValEquals('platform_editor_media_reliability_enhancements', 'isEnabled', true)) {
57
+ if (!isExperimentEnabled('platform_editor_media_reliability_enhancements')) {
58
58
  return;
59
59
  }
60
60
  if (ssr !== null && ssr !== void 0 && ssr.config) {
@@ -80,7 +80,7 @@ export const EditorMediaClientProvider = ({
80
80
  // Legacy path (experiment off): keep useLayoutEffect to preserve existing behaviour.
81
81
  // remove this when clean up platform_editor_media_reliability_enhancements
82
82
  useLayoutEffect(() => {
83
- if (expValEquals('platform_editor_media_reliability_enhancements', 'isEnabled', true)) {
83
+ if (isExperimentEnabled('platform_editor_media_reliability_enhancements')) {
84
84
  return;
85
85
  }
86
86
  if (ssr !== null && ssr !== void 0 && ssr.config) {
@@ -60,7 +60,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
60
60
  const TABLE_INFO_TIMEOUT = 10000;
61
61
  const RENDER_EVENT_SAMPLE_RATE = 0.1;
62
62
  const packageName = "@atlaskit/renderer";
63
- const packageVersion = "137.2.5";
63
+ const packageVersion = "137.2.6";
64
64
  const setAsQueryContainerStyles = css({
65
65
  containerName: 'ak-renderer-wrapper',
66
66
  containerType: 'inline-size'
@@ -341,13 +341,13 @@ export const RendererFunctionalComponent = props => {
341
341
  let heightWidthAnalyticsRicID;
342
342
  let heightWidthAnalyticsRafID;
343
343
  const handleAnalytics = () => {
344
- if (!fg('platform_renderer_sample_high_volume_events') || Math.random() < RENDER_EVENT_SAMPLE_RATE) {
344
+ if (Math.random() < RENDER_EVENT_SAMPLE_RATE) {
345
345
  fireAnalyticsEvent({
346
346
  action: ACTION.STARTED,
347
347
  actionSubject: ACTION_SUBJECT.RENDERER,
348
348
  attributes: {
349
349
  platform: PLATFORM.WEB,
350
- sampleRate: fg('platform_renderer_sample_high_volume_events') ? RENDER_EVENT_SAMPLE_RATE : 1
350
+ sampleRate: RENDER_EVENT_SAMPLE_RATE
351
351
  },
352
352
  eventType: EVENT_TYPE.UI
353
353
  });
@@ -389,11 +389,11 @@ export const RendererFunctionalComponent = props => {
389
389
  nodes,
390
390
  nestedRendererType,
391
391
  severity,
392
- sampleRate: fg('platform_renderer_sample_high_volume_events') ? RENDER_EVENT_SAMPLE_RATE : 1
392
+ sampleRate: RENDER_EVENT_SAMPLE_RATE
393
393
  },
394
394
  eventType: EVENT_TYPE.OPERATIONAL
395
395
  };
396
- if (!fg('platform_renderer_sample_high_volume_events') || Math.random() < RENDER_EVENT_SAMPLE_RATE) {
396
+ if (Math.random() < RENDER_EVENT_SAMPLE_RATE) {
397
397
  fireAnalyticsEvent(event);
398
398
  }
399
399
  }
@@ -1,15 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { Fragment } from 'react';
3
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
3
4
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
4
5
  import { getEventHandler } from '../../utils';
5
6
  import { PLATFORM, MODE } from '../../analytics/events';
6
7
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
7
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
8
  import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
9
9
  import { LinkUrlCompiled } from './link-compiled';
10
10
  import { LinkUrlEmotion } from './link-emotion';
11
11
  var LinkUrlMigration = componentWithCondition(function () {
12
- return expValEquals('platform_editor_renderer_static_css', 'isEnabled', true);
12
+ return isExperimentEnabled('platform_editor_renderer_static_css');
13
13
  }, LinkUrlCompiled, LinkUrlEmotion);
14
14
  /**
15
15
  * Render an ADF link mark in renderer.
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
2
3
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
4
  import { LayoutSectionCompiled } from './layoutColumn-compiled';
5
5
  import { LayoutSectionEmotion } from './layoutColumn-emotion';
6
6
  var LayoutSectionMigration = componentWithCondition(function () {
7
- return expValEquals('platform_editor_renderer_static_css', 'isEnabled', true);
7
+ return isExperimentEnabled('platform_editor_renderer_static_css');
8
8
  }, LayoutSectionCompiled, LayoutSectionEmotion);
9
9
 
10
10
  /**
@@ -4,8 +4,8 @@ import { PanelInfoIcon, PanelSuccessIcon, PanelNoteIcon, PanelWarningIcon, Panel
4
4
  import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
5
5
  import EmojiIcon from '@atlaskit/icon/core/emoji';
6
6
  import TipIcon from '@atlaskit/icon/core/lightbulb';
7
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
7
8
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
8
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
9
  import EmojiItem from './emoji';
10
10
  import { PanelStyledCompiled } from './panel-compiled';
11
11
  import { PanelStyledEmotion } from './panel-emotion';
@@ -19,7 +19,7 @@ var panelIcons = {
19
19
  custom: EmojiIcon
20
20
  };
21
21
  var PanelStyledMigration = componentWithCondition(function () {
22
- return expValEquals('platform_editor_renderer_static_css', 'isEnabled', true);
22
+ return isExperimentEnabled('platform_editor_renderer_static_css');
23
23
  }, PanelStyledCompiled, PanelStyledEmotion);
24
24
  var Panel = function Panel(props) {
25
25
  var allowCustomPanels = props.allowCustomPanels,
@@ -3,8 +3,8 @@ import React, { useContext, useEffect, useLayoutEffect, useMemo, useState } from
3
3
  import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
4
4
  import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
5
5
  import { useProviderFactory, useProviderLayout } from '@atlaskit/editor-common/provider-factory';
6
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
6
7
  import { fg } from '@atlaskit/platform-feature-flags/fg';
7
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
8
  var getMediaClientConfigForRenderer = function getMediaClientConfigForRenderer(provider) {
9
9
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
10
10
  return provider.viewAndUploadMediaClientConfig && fg('platform_media_video_captions') ? provider.viewAndUploadMediaClientConfig : provider.viewMediaClientConfig;
@@ -13,7 +13,7 @@ export var EditorMediaClientProvider = function EditorMediaClientProvider(_ref)
13
13
  var children = _ref.children,
14
14
  ssr = _ref.ssr;
15
15
  var _useState = useState(function () {
16
- return expValEquals('platform_editor_media_reliability_enhancements', 'isEnabled', true) ? ssr === null || ssr === void 0 ? void 0 : ssr.config : undefined;
16
+ return isExperimentEnabled('platform_editor_media_reliability_enhancements') ? ssr === null || ssr === void 0 ? void 0 : ssr.config : undefined;
17
17
  }),
18
18
  _useState2 = _slicedToArray(_useState, 2),
19
19
  mediaClientConfig = _useState2[0],
@@ -35,7 +35,7 @@ export var EditorMediaClientProvider = function EditorMediaClientProvider(_ref)
35
35
  *
36
36
  * hasProvider() is synchronous and correct from render 1, closing that window.
37
37
  */
38
- var shouldSkipContext = expValEquals('platform_editor_media_reliability_enhancements', 'isEnabled', true) ? Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || providerFactory.hasProvider('mediaProvider') || mediaProvider) : Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || mediaProvider);
38
+ var shouldSkipContext = isExperimentEnabled('platform_editor_media_reliability_enhancements') ? Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || providerFactory.hasProvider('mediaProvider') || mediaProvider) : Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || mediaProvider);
39
39
  var contextMediaClient = useContext(MediaClientContext);
40
40
 
41
41
  // MediaClientProvider currently requires a mediaClientConfig
@@ -61,7 +61,7 @@ export var EditorMediaClientProvider = function EditorMediaClientProvider(_ref)
61
61
  // The two hooks below are mutually exclusive — only one runs per render — so there is no
62
62
  // actual chaining of state updates at runtime. The lint rule cannot statically prove this.
63
63
  useEffect(function () {
64
- if (!expValEquals('platform_editor_media_reliability_enhancements', 'isEnabled', true)) {
64
+ if (!isExperimentEnabled('platform_editor_media_reliability_enhancements')) {
65
65
  return;
66
66
  }
67
67
  if (ssr !== null && ssr !== void 0 && ssr.config) {
@@ -87,7 +87,7 @@ export var EditorMediaClientProvider = function EditorMediaClientProvider(_ref)
87
87
  // Legacy path (experiment off): keep useLayoutEffect to preserve existing behaviour.
88
88
  // remove this when clean up platform_editor_media_reliability_enhancements
89
89
  useLayoutEffect(function () {
90
- if (expValEquals('platform_editor_media_reliability_enhancements', 'isEnabled', true)) {
90
+ if (isExperimentEnabled('platform_editor_media_reliability_enhancements')) {
91
91
  return;
92
92
  }
93
93
  if (ssr !== null && ssr !== void 0 && ssr.config) {
@@ -65,7 +65,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
65
65
  var TABLE_INFO_TIMEOUT = 10000;
66
66
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
67
67
  var packageName = "@atlaskit/renderer";
68
- var packageVersion = "137.2.5";
68
+ var packageVersion = "137.2.6";
69
69
  var setAsQueryContainerStyles = css({
70
70
  containerName: 'ak-renderer-wrapper',
71
71
  containerType: 'inline-size'
@@ -342,13 +342,13 @@ export var RendererFunctionalComponent = function RendererFunctionalComponent(pr
342
342
  var heightWidthAnalyticsRicID;
343
343
  var heightWidthAnalyticsRafID;
344
344
  var handleAnalytics = function handleAnalytics() {
345
- if (!fg('platform_renderer_sample_high_volume_events') || Math.random() < RENDER_EVENT_SAMPLE_RATE) {
345
+ if (Math.random() < RENDER_EVENT_SAMPLE_RATE) {
346
346
  _fireAnalyticsEvent({
347
347
  action: ACTION.STARTED,
348
348
  actionSubject: ACTION_SUBJECT.RENDERER,
349
349
  attributes: {
350
350
  platform: PLATFORM.WEB,
351
- sampleRate: fg('platform_renderer_sample_high_volume_events') ? RENDER_EVENT_SAMPLE_RATE : 1
351
+ sampleRate: RENDER_EVENT_SAMPLE_RATE
352
352
  },
353
353
  eventType: EVENT_TYPE.UI
354
354
  });
@@ -390,11 +390,11 @@ export var RendererFunctionalComponent = function RendererFunctionalComponent(pr
390
390
  nodes: nodes,
391
391
  nestedRendererType: nestedRendererType,
392
392
  severity: severity,
393
- sampleRate: fg('platform_renderer_sample_high_volume_events') ? RENDER_EVENT_SAMPLE_RATE : 1
393
+ sampleRate: RENDER_EVENT_SAMPLE_RATE
394
394
  },
395
395
  eventType: EVENT_TYPE.OPERATIONAL
396
396
  };
397
- if (!fg('platform_renderer_sample_high_volume_events') || Math.random() < RENDER_EVENT_SAMPLE_RATE) {
397
+ if (Math.random() < RENDER_EVENT_SAMPLE_RATE) {
398
398
  _fireAnalyticsEvent(event);
399
399
  }
400
400
  }
@@ -180,11 +180,10 @@ export interface RendererProps {
180
180
  * Called when the renderer completes a render pass — on the animation frame following
181
181
  * mount (i.e. after paint), exposing basic information about the render.
182
182
  *
183
- * Unlike the `renderer` `rendered` analytics event, which may be sampled (see the
184
- * `platform_renderer_sample_high_volume_events` feature gate) and therefore only fires
185
- * for a fraction of renders, this callback ALWAYS fires on every render pass regardless
186
- * of analytics sampling. Use it for reliable lifecycle signals for example releasing a
187
- * UFO load hold — rather than depending on the sampled analytics event.
183
+ * Unlike the `renderer` `rendered` analytics event, which is sampled and therefore only
184
+ * fires for a fraction of renders, this callback ALWAYS fires on every render pass
185
+ * regardless of analytics sampling. Use it for reliable lifecycle signals for example
186
+ * releasing a UFO load hold rather than depending on the sampled analytics event.
188
187
  *
189
188
  * @param info - Basic information about the completed render.
190
189
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "137.2.6",
3
+ "version": "137.2.7",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -70,7 +70,7 @@
70
70
  "@atlaskit/status": "^5.9.0",
71
71
  "@atlaskit/task-decision": "^21.9.0",
72
72
  "@atlaskit/theme": "^28.2.0",
73
- "@atlaskit/tmp-editor-statsig": "^173.0.0",
73
+ "@atlaskit/tmp-editor-statsig": "^174.0.0",
74
74
  "@atlaskit/tokens": "^16.11.0",
75
75
  "@atlaskit/tooltip": "^24.3.0",
76
76
  "@atlaskit/visually-hidden": "^4.4.0",
@@ -85,7 +85,7 @@
85
85
  "uuid": "^3.1.0"
86
86
  },
87
87
  "peerDependencies": {
88
- "@atlaskit/editor-common": "^120.11.0",
88
+ "@atlaskit/editor-common": "^120.12.0",
89
89
  "@atlaskit/link-provider": "^5.5.0",
90
90
  "@atlaskit/media-core": "^38.2.0",
91
91
  "react": "^18.2.0",
@@ -168,9 +168,6 @@
168
168
  "platform_editor_content_mode_button_mvp": {
169
169
  "type": "boolean"
170
170
  },
171
- "platform_renderer_sample_high_volume_events": {
172
- "type": "boolean"
173
- },
174
171
  "platform_editor_comments_api_manager": {
175
172
  "type": "boolean"
176
173
  },