@atlaskit/tmp-editor-statsig 209.1.1 → 211.0.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,38 @@
1
1
  # @atlaskit/editor-statsig-tmp
2
2
 
3
+ ## 211.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`034ef0dcd5baa`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/034ef0dcd5baa) -
8
+ Remove the shipped `cc_fix_hydration_ttvc` experiment configuration.
9
+
10
+ ### Minor Changes
11
+
12
+ - [`038da6c703ee9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/038da6c703ee9) -
13
+ `editorExperiment('platform_editor_controls', …)` now returns `variant1` for the Confluence and
14
+ Jira products, whose product code has been cleaned up to always behave as `variant1`.
15
+
16
+ Every other app (no product, or a product without a product key) now also returns `variant1`, so
17
+ the editor controls experience is enabled by default. It returns `control` only when the
18
+ `platform_editor_controls_other_apps_ks` kill switch is on for that app, or before the Statsig
19
+ client has initialised. Test overrides and the `test` product are unchanged.
20
+
21
+ ## 210.0.0
22
+
23
+ ### Major Changes
24
+
25
+ - [`517ce6768d96a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/517ce6768d96a) -
26
+ Clean up experiment `platform_editor_vc90_transition_panel_icon`.
27
+ - [`5f61320693517`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5f61320693517) -
28
+ Clean up experiment `platform_editor_remove_collab_step_metrics`
29
+
30
+ ### Patch Changes
31
+
32
+ - [`4b854d5786237`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4b854d5786237) -
33
+ Clean up feature gate `platform_editor_experiments_use_product_keys`. Product-specific experiment
34
+ keys are now always used for experiments that are not in `disallowsProductKeys`.
35
+
3
36
  ## 209.1.1
4
37
 
5
38
  ### Patch Changes
@@ -12,6 +12,40 @@ var _setup = require("./setup");
12
12
  /* eslint-disable @atlaskit/editor/no-re-export */
13
13
  // Entry file in package.json
14
14
 
15
+ var EDITOR_CONTROLS_EXPERIMENT = 'platform_editor_controls';
16
+ var EDITOR_CONTROLS_OTHER_APPS_KILL_SWITCH = 'platform_editor_controls_other_apps_ks';
17
+
18
+ /**
19
+ * Resolves the `platform_editor_controls` cohort while the experiment is being cleaned up.
20
+ *
21
+ * - Confluence and Jira always get `variant1`. Their product code has been cleaned up to always
22
+ * behave as `variant1` (EDITOR-9269, EDITOR-9270), so the editor must agree with it.
23
+ * - Every other app (no product, or a product without a product key such as Bitbucket) gets
24
+ * `variant1` unless the kill switch `platform_editor_controls_other_apps_ks` passes for that app,
25
+ * in which case it gets `control`. The kill switch defaults to false, so controls are on by
26
+ * default. Its exposure always fires so Statsig shows which apps run this code.
27
+ * - Before the Statsig client is initialised, other apps get the experiment's default value.
28
+ * - The `test` product keeps the experiment's default value.
29
+ *
30
+ * Remove together with the experiment in EDITOR-9262.
31
+ */
32
+ function getEditorControlsCohort(defaultValue) {
33
+ if (_setup._product === 'confluence' || _setup._product === 'jira') {
34
+ return 'variant1';
35
+ }
36
+ if (_setup._product === 'test') {
37
+ return defaultValue;
38
+ }
39
+ if (!_featureGates.default.initializeCompleted()) {
40
+ return defaultValue;
41
+ }
42
+
43
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
44
+ return _featureGates.default.checkGate(EDITOR_CONTROLS_OTHER_APPS_KILL_SWITCH, {
45
+ fireGateExposure: true
46
+ }) ? 'control' : 'variant1';
47
+ }
48
+
15
49
  /**
16
50
  * Check the value of an editor experiment.
17
51
  *
@@ -77,6 +111,15 @@ function editorExperiment(experimentName, expectedExperimentValue) {
77
111
  // We will definitely crash via any code path later in this function - this just makes the error explicit and clear.
78
112
  throw new Error("Editor experiment configuration is not defined ".concat(experimentName, ". Likely the experiment does not exist or editor package versions are misaligned"));
79
113
  }
114
+ if (experimentName === EDITOR_CONTROLS_EXPERIMENT) {
115
+ var cohort = getEditorControlsCohort(experimentConfig.defaultValue);
116
+ if (
117
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
118
+ _featureGates.default.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
119
+ (0, _featureFlagsAccessed.addFeatureFlagAccessed)("".concat(experimentName, ":").concat(experimentConfig.param), cohort);
120
+ }
121
+ return cohort === expectedExperimentValue;
122
+ }
80
123
  if (!_setup._product) {
81
124
  // This will be hit in the case of a product not having setup the editor experiment tooling
82
125
  return experimentConfig.defaultValue === expectedExperimentValue;
@@ -18,7 +18,6 @@ Object.defineProperty(exports, "expValNoExposure", {
18
18
  }
19
19
  });
20
20
  var _featureGates = _interopRequireDefault(require("@atlaskit/feature-gate-js-client/feature-gates"));
21
- var _fg = require("@atlaskit/platform-feature-flags/fg");
22
21
  var _featureFlagsAccessed = require("@atlaskit/react-ufo/feature-flags-accessed");
23
22
  var _experimentsConfig = require("./experiments-config");
24
23
  var _setup = require("./setup");
@@ -69,7 +68,7 @@ function expValInternal(_ref) {
69
68
  // This will be hit in the case of an experiment not being set up for the product
70
69
  return defaultValue;
71
70
  }
72
- var resolvedExperimentKey = !_experimentsConfig.disallowsProductKeys.includes(experimentName) && (0, _fg.fg)('platform_editor_experiments_use_product_keys') ? experimentKey : experimentName;
71
+ var resolvedExperimentKey = _experimentsConfig.disallowsProductKeys.includes(experimentName) ? experimentName : experimentKey;
73
72
 
74
73
  // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
75
74
  var experimentValue = _featureGates.default.getExperimentValue(resolvedExperimentKey, experimentParam, defaultValue, {
@@ -77,14 +77,6 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
77
77
  param: 'isEnabled',
78
78
  defaultValue: false
79
79
  }),
80
- // Added 02-12-2025
81
- cc_fix_hydration_ttvc: (0, _createBooleanExperiment.createBooleanExperiment)({
82
- productKeys: {
83
- confluence: 'cc_fix_hydration_ttvc'
84
- },
85
- param: 'isEnabled',
86
- defaultValue: false
87
- }),
88
80
  // Added 2026-03-25
89
81
  'editor_a11y__enghealth-46814_fy26': (0, _createBooleanExperiment.createBooleanExperiment)({
90
82
  productKeys: {
@@ -839,14 +831,6 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
839
831
  param: 'isEnabled',
840
832
  defaultValue: false
841
833
  }),
842
- // Added 2026-03-04
843
- platform_editor_vc90_transition_panel_icon: (0, _createBooleanExperiment.createBooleanExperiment)({
844
- productKeys: {
845
- confluence: 'platform_editor_vc90_transition_panel_icon'
846
- },
847
- param: 'isEnabled',
848
- defaultValue: false
849
- }),
850
834
  // Added 2026-02-24
851
835
  platform_editor_emoji_default_scale: (0, _createBooleanExperiment.createBooleanExperiment)({
852
836
  productKeys: {
@@ -955,14 +939,6 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
955
939
  param: 'isEnabled',
956
940
  defaultValue: false
957
941
  }),
958
- // Added 2026-03-09
959
- platform_editor_remove_collab_step_metrics: (0, _createBooleanExperiment.createBooleanExperiment)({
960
- productKeys: {
961
- confluence: 'platform_editor_remove_collab_step_metrics'
962
- },
963
- param: 'isEnabled',
964
- defaultValue: false
965
- }),
966
942
  // Added 2026-05-01
967
943
  platform_editor_ai_normalized_telemetry: (0, _createBooleanExperiment.createBooleanExperiment)({
968
944
  productKeys: {
@@ -5,6 +5,39 @@ import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
5
5
  import { addFeatureFlagAccessed } from '@atlaskit/react-ufo/feature-flags-accessed';
6
6
  import { editorExperimentsConfig } from './experiments-config';
7
7
  import { _overrides, _product } from './setup';
8
+ const EDITOR_CONTROLS_EXPERIMENT = 'platform_editor_controls';
9
+ const EDITOR_CONTROLS_OTHER_APPS_KILL_SWITCH = 'platform_editor_controls_other_apps_ks';
10
+
11
+ /**
12
+ * Resolves the `platform_editor_controls` cohort while the experiment is being cleaned up.
13
+ *
14
+ * - Confluence and Jira always get `variant1`. Their product code has been cleaned up to always
15
+ * behave as `variant1` (EDITOR-9269, EDITOR-9270), so the editor must agree with it.
16
+ * - Every other app (no product, or a product without a product key such as Bitbucket) gets
17
+ * `variant1` unless the kill switch `platform_editor_controls_other_apps_ks` passes for that app,
18
+ * in which case it gets `control`. The kill switch defaults to false, so controls are on by
19
+ * default. Its exposure always fires so Statsig shows which apps run this code.
20
+ * - Before the Statsig client is initialised, other apps get the experiment's default value.
21
+ * - The `test` product keeps the experiment's default value.
22
+ *
23
+ * Remove together with the experiment in EDITOR-9262.
24
+ */
25
+ function getEditorControlsCohort(defaultValue) {
26
+ if (_product === 'confluence' || _product === 'jira') {
27
+ return 'variant1';
28
+ }
29
+ if (_product === 'test') {
30
+ return defaultValue;
31
+ }
32
+ if (!FeatureGates.initializeCompleted()) {
33
+ return defaultValue;
34
+ }
35
+
36
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
37
+ return FeatureGates.checkGate(EDITOR_CONTROLS_OTHER_APPS_KILL_SWITCH, {
38
+ fireGateExposure: true
39
+ }) ? 'control' : 'variant1';
40
+ }
8
41
 
9
42
  /**
10
43
  * Check the value of an editor experiment.
@@ -70,6 +103,15 @@ export function editorExperiment(experimentName, expectedExperimentValue, option
70
103
  // We will definitely crash via any code path later in this function - this just makes the error explicit and clear.
71
104
  throw new Error(`Editor experiment configuration is not defined ${experimentName}. Likely the experiment does not exist or editor package versions are misaligned`);
72
105
  }
106
+ if (experimentName === EDITOR_CONTROLS_EXPERIMENT) {
107
+ const cohort = getEditorControlsCohort(experimentConfig.defaultValue);
108
+ if (
109
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
110
+ FeatureGates.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
111
+ addFeatureFlagAccessed(`${experimentName}:${experimentConfig.param}`, cohort);
112
+ }
113
+ return cohort === expectedExperimentValue;
114
+ }
73
115
  if (!_product) {
74
116
  // This will be hit in the case of a product not having setup the editor experiment tooling
75
117
  return experimentConfig.defaultValue === expectedExperimentValue;
@@ -2,7 +2,6 @@
2
2
  /* eslint-disable @atlaskit/editor/no-re-export -- deprecated shims re-exporting the split `expVal`/`expValNoExposure` modules for backwards compatibility (VOLTC-139). */
3
3
 
4
4
  import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
5
- import { fg } from '@atlaskit/platform-feature-flags/fg';
6
5
  import { addFeatureFlagAccessed } from '@atlaskit/react-ufo/feature-flags-accessed';
7
6
  import { disallowsProductKeys, editorExperimentsConfig } from './experiments-config';
8
7
  import { _overrides, _paramOverrides, _product } from './setup';
@@ -49,7 +48,7 @@ export function expValInternal({
49
48
  // This will be hit in the case of an experiment not being set up for the product
50
49
  return defaultValue;
51
50
  }
52
- const resolvedExperimentKey = !disallowsProductKeys.includes(experimentName) && fg('platform_editor_experiments_use_product_keys') ? experimentKey : experimentName;
51
+ const resolvedExperimentKey = disallowsProductKeys.includes(experimentName) ? experimentName : experimentKey;
53
52
 
54
53
  // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
55
54
  const experimentValue = FeatureGates.getExperimentValue(resolvedExperimentKey, experimentParam, defaultValue, {
@@ -71,14 +71,6 @@ export const editorExperimentsConfig = {
71
71
  param: 'isEnabled',
72
72
  defaultValue: false
73
73
  }),
74
- // Added 02-12-2025
75
- cc_fix_hydration_ttvc: createBooleanExperiment({
76
- productKeys: {
77
- confluence: 'cc_fix_hydration_ttvc'
78
- },
79
- param: 'isEnabled',
80
- defaultValue: false
81
- }),
82
74
  // Added 2026-03-25
83
75
  'editor_a11y__enghealth-46814_fy26': createBooleanExperiment({
84
76
  productKeys: {
@@ -833,14 +825,6 @@ export const editorExperimentsConfig = {
833
825
  param: 'isEnabled',
834
826
  defaultValue: false
835
827
  }),
836
- // Added 2026-03-04
837
- platform_editor_vc90_transition_panel_icon: createBooleanExperiment({
838
- productKeys: {
839
- confluence: 'platform_editor_vc90_transition_panel_icon'
840
- },
841
- param: 'isEnabled',
842
- defaultValue: false
843
- }),
844
828
  // Added 2026-02-24
845
829
  platform_editor_emoji_default_scale: createBooleanExperiment({
846
830
  productKeys: {
@@ -949,14 +933,6 @@ export const editorExperimentsConfig = {
949
933
  param: 'isEnabled',
950
934
  defaultValue: false
951
935
  }),
952
- // Added 2026-03-09
953
- platform_editor_remove_collab_step_metrics: createBooleanExperiment({
954
- productKeys: {
955
- confluence: 'platform_editor_remove_collab_step_metrics'
956
- },
957
- param: 'isEnabled',
958
- defaultValue: false
959
- }),
960
936
  // Added 2026-05-01
961
937
  platform_editor_ai_normalized_telemetry: createBooleanExperiment({
962
938
  productKeys: {
@@ -5,6 +5,39 @@ import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
5
5
  import { addFeatureFlagAccessed } from '@atlaskit/react-ufo/feature-flags-accessed';
6
6
  import { editorExperimentsConfig } from './experiments-config';
7
7
  import { _overrides, _product } from './setup';
8
+ var EDITOR_CONTROLS_EXPERIMENT = 'platform_editor_controls';
9
+ var EDITOR_CONTROLS_OTHER_APPS_KILL_SWITCH = 'platform_editor_controls_other_apps_ks';
10
+
11
+ /**
12
+ * Resolves the `platform_editor_controls` cohort while the experiment is being cleaned up.
13
+ *
14
+ * - Confluence and Jira always get `variant1`. Their product code has been cleaned up to always
15
+ * behave as `variant1` (EDITOR-9269, EDITOR-9270), so the editor must agree with it.
16
+ * - Every other app (no product, or a product without a product key such as Bitbucket) gets
17
+ * `variant1` unless the kill switch `platform_editor_controls_other_apps_ks` passes for that app,
18
+ * in which case it gets `control`. The kill switch defaults to false, so controls are on by
19
+ * default. Its exposure always fires so Statsig shows which apps run this code.
20
+ * - Before the Statsig client is initialised, other apps get the experiment's default value.
21
+ * - The `test` product keeps the experiment's default value.
22
+ *
23
+ * Remove together with the experiment in EDITOR-9262.
24
+ */
25
+ function getEditorControlsCohort(defaultValue) {
26
+ if (_product === 'confluence' || _product === 'jira') {
27
+ return 'variant1';
28
+ }
29
+ if (_product === 'test') {
30
+ return defaultValue;
31
+ }
32
+ if (!FeatureGates.initializeCompleted()) {
33
+ return defaultValue;
34
+ }
35
+
36
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
37
+ return FeatureGates.checkGate(EDITOR_CONTROLS_OTHER_APPS_KILL_SWITCH, {
38
+ fireGateExposure: true
39
+ }) ? 'control' : 'variant1';
40
+ }
8
41
 
9
42
  /**
10
43
  * Check the value of an editor experiment.
@@ -71,6 +104,15 @@ export function editorExperiment(experimentName, expectedExperimentValue) {
71
104
  // We will definitely crash via any code path later in this function - this just makes the error explicit and clear.
72
105
  throw new Error("Editor experiment configuration is not defined ".concat(experimentName, ". Likely the experiment does not exist or editor package versions are misaligned"));
73
106
  }
107
+ if (experimentName === EDITOR_CONTROLS_EXPERIMENT) {
108
+ var cohort = getEditorControlsCohort(experimentConfig.defaultValue);
109
+ if (
110
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
111
+ FeatureGates.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
112
+ addFeatureFlagAccessed("".concat(experimentName, ":").concat(experimentConfig.param), cohort);
113
+ }
114
+ return cohort === expectedExperimentValue;
115
+ }
74
116
  if (!_product) {
75
117
  // This will be hit in the case of a product not having setup the editor experiment tooling
76
118
  return experimentConfig.defaultValue === expectedExperimentValue;
@@ -2,7 +2,6 @@
2
2
  /* eslint-disable @atlaskit/editor/no-re-export -- deprecated shims re-exporting the split `expVal`/`expValNoExposure` modules for backwards compatibility (VOLTC-139). */
3
3
 
4
4
  import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
5
- import { fg } from '@atlaskit/platform-feature-flags/fg';
6
5
  import { addFeatureFlagAccessed } from '@atlaskit/react-ufo/feature-flags-accessed';
7
6
  import { disallowsProductKeys, editorExperimentsConfig } from './experiments-config';
8
7
  import { _overrides, _paramOverrides, _product } from './setup';
@@ -48,7 +47,7 @@ export function expValInternal(_ref) {
48
47
  // This will be hit in the case of an experiment not being set up for the product
49
48
  return defaultValue;
50
49
  }
51
- var resolvedExperimentKey = !disallowsProductKeys.includes(experimentName) && fg('platform_editor_experiments_use_product_keys') ? experimentKey : experimentName;
50
+ var resolvedExperimentKey = disallowsProductKeys.includes(experimentName) ? experimentName : experimentKey;
52
51
 
53
52
  // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
54
53
  var experimentValue = FeatureGates.getExperimentValue(resolvedExperimentKey, experimentParam, defaultValue, {
@@ -71,14 +71,6 @@ export var editorExperimentsConfig = {
71
71
  param: 'isEnabled',
72
72
  defaultValue: false
73
73
  }),
74
- // Added 02-12-2025
75
- cc_fix_hydration_ttvc: createBooleanExperiment({
76
- productKeys: {
77
- confluence: 'cc_fix_hydration_ttvc'
78
- },
79
- param: 'isEnabled',
80
- defaultValue: false
81
- }),
82
74
  // Added 2026-03-25
83
75
  'editor_a11y__enghealth-46814_fy26': createBooleanExperiment({
84
76
  productKeys: {
@@ -833,14 +825,6 @@ export var editorExperimentsConfig = {
833
825
  param: 'isEnabled',
834
826
  defaultValue: false
835
827
  }),
836
- // Added 2026-03-04
837
- platform_editor_vc90_transition_panel_icon: createBooleanExperiment({
838
- productKeys: {
839
- confluence: 'platform_editor_vc90_transition_panel_icon'
840
- },
841
- param: 'isEnabled',
842
- defaultValue: false
843
- }),
844
828
  // Added 2026-02-24
845
829
  platform_editor_emoji_default_scale: createBooleanExperiment({
846
830
  productKeys: {
@@ -949,14 +933,6 @@ export var editorExperimentsConfig = {
949
933
  param: 'isEnabled',
950
934
  defaultValue: false
951
935
  }),
952
- // Added 2026-03-09
953
- platform_editor_remove_collab_step_metrics: createBooleanExperiment({
954
- productKeys: {
955
- confluence: 'platform_editor_remove_collab_step_metrics'
956
- },
957
- param: 'isEnabled',
958
- defaultValue: false
959
- }),
960
936
  // Added 2026-05-01
961
937
  platform_editor_ai_normalized_telemetry: createBooleanExperiment({
962
938
  productKeys: {
@@ -131,12 +131,6 @@ export declare const editorExperimentsConfig: {
131
131
  productKeys?: ProductKeys;
132
132
  typeGuard: IsBooleanType;
133
133
  };
134
- cc_fix_hydration_ttvc: {
135
- defaultValue: boolean;
136
- param: string;
137
- productKeys?: ProductKeys;
138
- typeGuard: IsBooleanType;
139
- };
140
134
  platform_editor_code_block_q4_lovability: {
141
135
  defaultValue: boolean;
142
136
  param: string;
@@ -655,12 +649,6 @@ export declare const editorExperimentsConfig: {
655
649
  productKeys?: ProductKeys;
656
650
  typeGuard: IsBooleanType;
657
651
  };
658
- platform_editor_vc90_transition_panel_icon: {
659
- defaultValue: boolean;
660
- param: string;
661
- productKeys?: ProductKeys;
662
- typeGuard: IsBooleanType;
663
- };
664
652
  platform_editor_emoji_default_scale: {
665
653
  defaultValue: boolean;
666
654
  param: string;
@@ -739,12 +727,6 @@ export declare const editorExperimentsConfig: {
739
727
  productKeys?: ProductKeys;
740
728
  typeGuard: IsBooleanType;
741
729
  };
742
- platform_editor_remove_collab_step_metrics: {
743
- defaultValue: boolean;
744
- param: string;
745
- productKeys?: ProductKeys;
746
- typeGuard: IsBooleanType;
747
- };
748
730
  platform_editor_table_fit_to_content_on_demand: {
749
731
  defaultValue: boolean;
750
732
  param: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tmp-editor-statsig",
3
- "version": "209.1.1",
3
+ "version": "211.0.0",
4
4
  "description": "Temp plugin to ease use of statsig feature flags until platform feature flags are available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,9 +31,6 @@
31
31
  "@babel/runtime": "^7.0.0"
32
32
  },
33
33
  "platform-feature-flags": {
34
- "platform_editor_experiments_use_product_keys": {
35
- "type": "boolean"
36
- },
37
34
  "confluence_editor_paste_3p_link_actions_menu": {
38
35
  "type": "boolean"
39
36
  }