@atlaskit/tmp-editor-statsig 9.26.0 → 9.28.0

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,21 @@
1
1
  # @atlaskit/editor-statsig-tmp
2
2
 
3
+ ## 9.28.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#200948](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/200948)
8
+ [`8dd9a944113d5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8dd9a944113d5) -
9
+ Introduced throttling for portals
10
+
11
+ ## 9.27.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#199487](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/199487)
16
+ [`9146513a60d45`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9146513a60d45) -
17
+ Add a new experiment for code folding in the editor.
18
+
3
19
  ## 9.26.0
4
20
 
5
21
  ### Minor Changes
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.expVal = expVal;
8
+ exports.expValNoExposure = expValNoExposure;
9
+ var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
10
+ var _experimentsConfig = require("./experiments-config");
11
+ var _setup = require("./setup");
12
+ function expValInternal(_ref) {
13
+ var _experimentConfig$pro;
14
+ var experimentName = _ref.experimentName,
15
+ experimentParam = _ref.experimentParam,
16
+ defaultValue = _ref.defaultValue,
17
+ fireExperimentExposure = _ref.fireExperimentExposure;
18
+ var experimentConfig = _experimentsConfig.editorExperimentsConfig[experimentName];
19
+ if (experimentConfig === undefined) {
20
+ // Warning! If a product is improperly configured (ie. their editor packages are misaligned)
21
+ // it can cause the editor to crash here or if the experiment does not exist.
22
+ // We will definitely crash via any code path later in this function - this just makes the error explicit and clear.
23
+ throw new Error("Editor experiment configuration is not defined ".concat(experimentName, ". Likely the experiment does not exist or editor package versions are misaligned"));
24
+ }
25
+ if (!_setup._product) {
26
+ // This will be hit in the case of a product not having setup the editor experiment tooling
27
+ return defaultValue;
28
+ }
29
+
30
+ // Typescript is complaining here about accessing the productKeys property
31
+ // Ignored via go/ees005
32
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
33
+ var experimentKey = experimentConfig === null || experimentConfig === void 0 || (_experimentConfig$pro = experimentConfig.productKeys) === null || _experimentConfig$pro === void 0 ? void 0 : _experimentConfig$pro[_setup._product];
34
+ if (!experimentKey) {
35
+ // This will be hit in the case of an experiment not being set up for the product
36
+ return defaultValue;
37
+ }
38
+
39
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
40
+ var experimentValue = _featureGateJsClient.default.getExperimentValue(experimentName, experimentParam, defaultValue, {
41
+ fireExperimentExposure: fireExperimentExposure
42
+ });
43
+ return experimentValue;
44
+ }
45
+
46
+ /**
47
+ * Use to check a any param value for an experiment
48
+ *
49
+ * **Note**: this will return the default value when the experiment;
50
+ * - is not being served to the client (ie. pre start)
51
+ * - or is not configured in experiments-config
52
+ *
53
+ * If you need to check a param value without an exposure check see {@link expParamEqualsNoExposure}
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const delay = expParamEquals('experiment-name', 'param-name', defaultValue)
58
+ * await new Promise(res => setTimeout(res, delay)
59
+ * ```
60
+ */
61
+ function expVal(experimentName, experimentParam, defaultValue) {
62
+ return expValInternal({
63
+ experimentName: experimentName,
64
+ experimentParam: experimentParam,
65
+ defaultValue: defaultValue,
66
+ fireExperimentExposure: true
67
+ });
68
+ }
69
+
70
+ /**
71
+ * Use to check a any param value for an experiment without firing an exposure event
72
+ *
73
+ * **Note**: this will return the default value when the experiment;
74
+ * - is not being served to the client (ie. pre start)
75
+ * - or is not configured in experiments-config
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * const delay = expParamEqualsNoExposure('experiment-name', 'param-name', defaultValue)
80
+ * await new Promise(res => setTimeout(res, delay)
81
+ * ```
82
+ */
83
+ function expValNoExposure(experimentName, experimentParam, defaultValue) {
84
+ return expValInternal({
85
+ experimentName: experimentName,
86
+ experimentParam: experimentParam,
87
+ defaultValue: defaultValue,
88
+ fireExperimentExposure: false
89
+ });
90
+ }
@@ -359,6 +359,14 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
359
359
  param: 'isEnabled',
360
360
  defaultValue: false
361
361
  }),
362
+ // Added 2025-07-14
363
+ platform_editor_debounce_portal_provider: (0, _experimentBuilders.createBooleanExperiment)({
364
+ productKeys: {
365
+ confluence: 'platform_editor_debounce_portal_provider'
366
+ },
367
+ param: 'isEnabled',
368
+ defaultValue: false
369
+ }),
362
370
  // Added 2025-07-08 - Jira work sync description comment summary
363
371
  'jira-work-sync-desc-comment-summary': (0, _experimentBuilders.createBooleanExperiment)({
364
372
  productKeys: {
@@ -415,6 +423,14 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
415
423
  param: 'isEnabled',
416
424
  defaultValue: false
417
425
  }),
426
+ // Added 2025-07-02
427
+ platform_editor_code_block_fold_gutter: (0, _experimentBuilders.createBooleanExperiment)({
428
+ productKeys: {
429
+ confluence: 'platform_editor_code_block_fold_gutter'
430
+ },
431
+ param: 'isEnabled',
432
+ defaultValue: false
433
+ }),
418
434
  // Added 2025-06-18
419
435
  platform_editor_ai_iw_adf_streaming: (0, _experimentBuilders.createBooleanExperiment)({
420
436
  productKeys: {
@@ -644,6 +660,14 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
644
660
  param: 'isEnabled',
645
661
  defaultValue: false
646
662
  }),
663
+ // Added 2025-08-06
664
+ cc_editor_limited_mode: (0, _experimentBuilders.createBooleanExperiment)({
665
+ productKeys: {
666
+ confluence: 'cc_editor_limited_mode'
667
+ },
668
+ param: 'isEnabled',
669
+ defaultValue: false
670
+ }),
647
671
  // Added 2025-08-05
648
672
  platform_editor_tables_scaling_css: (0, _experimentBuilders.createBooleanExperiment)({
649
673
  productKeys: {
@@ -0,0 +1,83 @@
1
+ import FeatureGates from '@atlaskit/feature-gate-js-client';
2
+ import { editorExperimentsConfig } from './experiments-config';
3
+ import { _product } from './setup';
4
+ function expValInternal({
5
+ experimentName,
6
+ experimentParam,
7
+ defaultValue,
8
+ fireExperimentExposure
9
+ }) {
10
+ var _experimentConfig$pro;
11
+ const experimentConfig = editorExperimentsConfig[experimentName];
12
+ if (experimentConfig === undefined) {
13
+ // Warning! If a product is improperly configured (ie. their editor packages are misaligned)
14
+ // it can cause the editor to crash here or if the experiment does not exist.
15
+ // We will definitely crash via any code path later in this function - this just makes the error explicit and clear.
16
+ throw new Error(`Editor experiment configuration is not defined ${experimentName}. Likely the experiment does not exist or editor package versions are misaligned`);
17
+ }
18
+ if (!_product) {
19
+ // This will be hit in the case of a product not having setup the editor experiment tooling
20
+ return defaultValue;
21
+ }
22
+
23
+ // Typescript is complaining here about accessing the productKeys property
24
+ // Ignored via go/ees005
25
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
26
+ const experimentKey = experimentConfig === null || experimentConfig === void 0 ? void 0 : (_experimentConfig$pro = experimentConfig.productKeys) === null || _experimentConfig$pro === void 0 ? void 0 : _experimentConfig$pro[_product];
27
+ if (!experimentKey) {
28
+ // This will be hit in the case of an experiment not being set up for the product
29
+ return defaultValue;
30
+ }
31
+
32
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
33
+ const experimentValue = FeatureGates.getExperimentValue(experimentName, experimentParam, defaultValue, {
34
+ fireExperimentExposure: fireExperimentExposure
35
+ });
36
+ return experimentValue;
37
+ }
38
+
39
+ /**
40
+ * Use to check a any param value for an experiment
41
+ *
42
+ * **Note**: this will return the default value when the experiment;
43
+ * - is not being served to the client (ie. pre start)
44
+ * - or is not configured in experiments-config
45
+ *
46
+ * If you need to check a param value without an exposure check see {@link expParamEqualsNoExposure}
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * const delay = expParamEquals('experiment-name', 'param-name', defaultValue)
51
+ * await new Promise(res => setTimeout(res, delay)
52
+ * ```
53
+ */
54
+ export function expVal(experimentName, experimentParam, defaultValue) {
55
+ return expValInternal({
56
+ experimentName,
57
+ experimentParam,
58
+ defaultValue,
59
+ fireExperimentExposure: true
60
+ });
61
+ }
62
+
63
+ /**
64
+ * Use to check a any param value for an experiment without firing an exposure event
65
+ *
66
+ * **Note**: this will return the default value when the experiment;
67
+ * - is not being served to the client (ie. pre start)
68
+ * - or is not configured in experiments-config
69
+ *
70
+ * @example
71
+ * ```ts
72
+ * const delay = expParamEqualsNoExposure('experiment-name', 'param-name', defaultValue)
73
+ * await new Promise(res => setTimeout(res, delay)
74
+ * ```
75
+ */
76
+ export function expValNoExposure(experimentName, experimentParam, defaultValue) {
77
+ return expValInternal({
78
+ experimentName,
79
+ experimentParam,
80
+ defaultValue,
81
+ fireExperimentExposure: false
82
+ });
83
+ }
@@ -353,6 +353,14 @@ export const editorExperimentsConfig = {
353
353
  param: 'isEnabled',
354
354
  defaultValue: false
355
355
  }),
356
+ // Added 2025-07-14
357
+ platform_editor_debounce_portal_provider: createBooleanExperiment({
358
+ productKeys: {
359
+ confluence: 'platform_editor_debounce_portal_provider'
360
+ },
361
+ param: 'isEnabled',
362
+ defaultValue: false
363
+ }),
356
364
  // Added 2025-07-08 - Jira work sync description comment summary
357
365
  'jira-work-sync-desc-comment-summary': createBooleanExperiment({
358
366
  productKeys: {
@@ -409,6 +417,14 @@ export const editorExperimentsConfig = {
409
417
  param: 'isEnabled',
410
418
  defaultValue: false
411
419
  }),
420
+ // Added 2025-07-02
421
+ platform_editor_code_block_fold_gutter: createBooleanExperiment({
422
+ productKeys: {
423
+ confluence: 'platform_editor_code_block_fold_gutter'
424
+ },
425
+ param: 'isEnabled',
426
+ defaultValue: false
427
+ }),
412
428
  // Added 2025-06-18
413
429
  platform_editor_ai_iw_adf_streaming: createBooleanExperiment({
414
430
  productKeys: {
@@ -638,6 +654,14 @@ export const editorExperimentsConfig = {
638
654
  param: 'isEnabled',
639
655
  defaultValue: false
640
656
  }),
657
+ // Added 2025-08-06
658
+ cc_editor_limited_mode: createBooleanExperiment({
659
+ productKeys: {
660
+ confluence: 'cc_editor_limited_mode'
661
+ },
662
+ param: 'isEnabled',
663
+ defaultValue: false
664
+ }),
641
665
  // Added 2025-08-05
642
666
  platform_editor_tables_scaling_css: createBooleanExperiment({
643
667
  productKeys: {
@@ -0,0 +1,82 @@
1
+ import FeatureGates from '@atlaskit/feature-gate-js-client';
2
+ import { editorExperimentsConfig } from './experiments-config';
3
+ import { _product } from './setup';
4
+ function expValInternal(_ref) {
5
+ var _experimentConfig$pro;
6
+ var experimentName = _ref.experimentName,
7
+ experimentParam = _ref.experimentParam,
8
+ defaultValue = _ref.defaultValue,
9
+ fireExperimentExposure = _ref.fireExperimentExposure;
10
+ var experimentConfig = editorExperimentsConfig[experimentName];
11
+ if (experimentConfig === undefined) {
12
+ // Warning! If a product is improperly configured (ie. their editor packages are misaligned)
13
+ // it can cause the editor to crash here or if the experiment does not exist.
14
+ // We will definitely crash via any code path later in this function - this just makes the error explicit and clear.
15
+ throw new Error("Editor experiment configuration is not defined ".concat(experimentName, ". Likely the experiment does not exist or editor package versions are misaligned"));
16
+ }
17
+ if (!_product) {
18
+ // This will be hit in the case of a product not having setup the editor experiment tooling
19
+ return defaultValue;
20
+ }
21
+
22
+ // Typescript is complaining here about accessing the productKeys property
23
+ // Ignored via go/ees005
24
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
25
+ var experimentKey = experimentConfig === null || experimentConfig === void 0 || (_experimentConfig$pro = experimentConfig.productKeys) === null || _experimentConfig$pro === void 0 ? void 0 : _experimentConfig$pro[_product];
26
+ if (!experimentKey) {
27
+ // This will be hit in the case of an experiment not being set up for the product
28
+ return defaultValue;
29
+ }
30
+
31
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
32
+ var experimentValue = FeatureGates.getExperimentValue(experimentName, experimentParam, defaultValue, {
33
+ fireExperimentExposure: fireExperimentExposure
34
+ });
35
+ return experimentValue;
36
+ }
37
+
38
+ /**
39
+ * Use to check a any param value for an experiment
40
+ *
41
+ * **Note**: this will return the default value when the experiment;
42
+ * - is not being served to the client (ie. pre start)
43
+ * - or is not configured in experiments-config
44
+ *
45
+ * If you need to check a param value without an exposure check see {@link expParamEqualsNoExposure}
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const delay = expParamEquals('experiment-name', 'param-name', defaultValue)
50
+ * await new Promise(res => setTimeout(res, delay)
51
+ * ```
52
+ */
53
+ export function expVal(experimentName, experimentParam, defaultValue) {
54
+ return expValInternal({
55
+ experimentName: experimentName,
56
+ experimentParam: experimentParam,
57
+ defaultValue: defaultValue,
58
+ fireExperimentExposure: true
59
+ });
60
+ }
61
+
62
+ /**
63
+ * Use to check a any param value for an experiment without firing an exposure event
64
+ *
65
+ * **Note**: this will return the default value when the experiment;
66
+ * - is not being served to the client (ie. pre start)
67
+ * - or is not configured in experiments-config
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * const delay = expParamEqualsNoExposure('experiment-name', 'param-name', defaultValue)
72
+ * await new Promise(res => setTimeout(res, delay)
73
+ * ```
74
+ */
75
+ export function expValNoExposure(experimentName, experimentParam, defaultValue) {
76
+ return expValInternal({
77
+ experimentName: experimentName,
78
+ experimentParam: experimentParam,
79
+ defaultValue: defaultValue,
80
+ fireExperimentExposure: false
81
+ });
82
+ }
@@ -353,6 +353,14 @@ export var editorExperimentsConfig = {
353
353
  param: 'isEnabled',
354
354
  defaultValue: false
355
355
  }),
356
+ // Added 2025-07-14
357
+ platform_editor_debounce_portal_provider: createBooleanExperiment({
358
+ productKeys: {
359
+ confluence: 'platform_editor_debounce_portal_provider'
360
+ },
361
+ param: 'isEnabled',
362
+ defaultValue: false
363
+ }),
356
364
  // Added 2025-07-08 - Jira work sync description comment summary
357
365
  'jira-work-sync-desc-comment-summary': createBooleanExperiment({
358
366
  productKeys: {
@@ -409,6 +417,14 @@ export var editorExperimentsConfig = {
409
417
  param: 'isEnabled',
410
418
  defaultValue: false
411
419
  }),
420
+ // Added 2025-07-02
421
+ platform_editor_code_block_fold_gutter: createBooleanExperiment({
422
+ productKeys: {
423
+ confluence: 'platform_editor_code_block_fold_gutter'
424
+ },
425
+ param: 'isEnabled',
426
+ defaultValue: false
427
+ }),
412
428
  // Added 2025-06-18
413
429
  platform_editor_ai_iw_adf_streaming: createBooleanExperiment({
414
430
  productKeys: {
@@ -638,6 +654,14 @@ export var editorExperimentsConfig = {
638
654
  param: 'isEnabled',
639
655
  defaultValue: false
640
656
  }),
657
+ // Added 2025-08-06
658
+ cc_editor_limited_mode: createBooleanExperiment({
659
+ productKeys: {
660
+ confluence: 'cc_editor_limited_mode'
661
+ },
662
+ param: 'isEnabled',
663
+ defaultValue: false
664
+ }),
641
665
  // Added 2025-08-05
642
666
  platform_editor_tables_scaling_css: createBooleanExperiment({
643
667
  productKeys: {