@atlaskit/tmp-editor-statsig 210.0.0 → 212.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 +28 -0
- package/dist/cjs/editor-experiment.js +43 -0
- package/dist/cjs/experiments-config.js +0 -17
- package/dist/es2019/editor-experiment.js +42 -0
- package/dist/es2019/experiments-config.js +0 -17
- package/dist/esm/editor-experiment.js +42 -0
- package/dist/esm/experiments-config.js +0 -17
- package/dist/types/experiments-config.d.ts +0 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @atlaskit/editor-statsig-tmp
|
|
2
2
|
|
|
3
|
+
## 212.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`c004ba24db31f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c004ba24db31f) -
|
|
8
|
+
Clean up the shipped `platform_editor_external_embed_grid_fix` experiment. The grid overlay now
|
|
9
|
+
always sizes itself from the content line length plus the gutter width, so the conditional and the
|
|
10
|
+
experiment registration have been removed. The experiment is no longer available in the Statsig
|
|
11
|
+
configuration; consumers should remove its overrides and checks.
|
|
12
|
+
|
|
13
|
+
## 211.0.0
|
|
14
|
+
|
|
15
|
+
### Major Changes
|
|
16
|
+
|
|
17
|
+
- [`034ef0dcd5baa`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/034ef0dcd5baa) -
|
|
18
|
+
Remove the shipped `cc_fix_hydration_ttvc` experiment configuration.
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- [`038da6c703ee9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/038da6c703ee9) -
|
|
23
|
+
`editorExperiment('platform_editor_controls', …)` now returns `variant1` for the Confluence and
|
|
24
|
+
Jira products, whose product code has been cleaned up to always behave as `variant1`.
|
|
25
|
+
|
|
26
|
+
Every other app (no product, or a product without a product key) now also returns `variant1`, so
|
|
27
|
+
the editor controls experience is enabled by default. It returns `control` only when the
|
|
28
|
+
`platform_editor_controls_other_apps_ks` kill switch is on for that app, or before the Statsig
|
|
29
|
+
client has initialised. Test overrides and the `test` product are unchanged.
|
|
30
|
+
|
|
3
31
|
## 210.0.0
|
|
4
32
|
|
|
5
33
|
### Major 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;
|
|
@@ -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: {
|
|
@@ -1044,15 +1036,6 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
|
|
|
1044
1036
|
param: 'isEnabled',
|
|
1045
1037
|
defaultValue: false
|
|
1046
1038
|
}),
|
|
1047
|
-
// Added 2026-06-11
|
|
1048
|
-
platform_editor_external_embed_grid_fix: (0, _createBooleanExperiment.createBooleanExperiment)({
|
|
1049
|
-
productKeys: {
|
|
1050
|
-
confluence: 'platform_editor_external_embed_grid_fix',
|
|
1051
|
-
jira: 'platform_editor_external_embed_grid_fix'
|
|
1052
|
-
},
|
|
1053
|
-
param: 'isEnabled',
|
|
1054
|
-
defaultValue: false
|
|
1055
|
-
}),
|
|
1056
1039
|
// Added 2026-04-08
|
|
1057
1040
|
cc_fd_wb_jira_quick_insert_experiment: (0, _createBooleanExperiment.createBooleanExperiment)({
|
|
1058
1041
|
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;
|
|
@@ -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: {
|
|
@@ -1038,15 +1030,6 @@ export const editorExperimentsConfig = {
|
|
|
1038
1030
|
param: 'isEnabled',
|
|
1039
1031
|
defaultValue: false
|
|
1040
1032
|
}),
|
|
1041
|
-
// Added 2026-06-11
|
|
1042
|
-
platform_editor_external_embed_grid_fix: createBooleanExperiment({
|
|
1043
|
-
productKeys: {
|
|
1044
|
-
confluence: 'platform_editor_external_embed_grid_fix',
|
|
1045
|
-
jira: 'platform_editor_external_embed_grid_fix'
|
|
1046
|
-
},
|
|
1047
|
-
param: 'isEnabled',
|
|
1048
|
-
defaultValue: false
|
|
1049
|
-
}),
|
|
1050
1033
|
// Added 2026-04-08
|
|
1051
1034
|
cc_fd_wb_jira_quick_insert_experiment: createBooleanExperiment({
|
|
1052
1035
|
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;
|
|
@@ -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: {
|
|
@@ -1038,15 +1030,6 @@ export var editorExperimentsConfig = {
|
|
|
1038
1030
|
param: 'isEnabled',
|
|
1039
1031
|
defaultValue: false
|
|
1040
1032
|
}),
|
|
1041
|
-
// Added 2026-06-11
|
|
1042
|
-
platform_editor_external_embed_grid_fix: createBooleanExperiment({
|
|
1043
|
-
productKeys: {
|
|
1044
|
-
confluence: 'platform_editor_external_embed_grid_fix',
|
|
1045
|
-
jira: 'platform_editor_external_embed_grid_fix'
|
|
1046
|
-
},
|
|
1047
|
-
param: 'isEnabled',
|
|
1048
|
-
defaultValue: false
|
|
1049
|
-
}),
|
|
1050
1033
|
// Added 2026-04-08
|
|
1051
1034
|
cc_fd_wb_jira_quick_insert_experiment: createBooleanExperiment({
|
|
1052
1035
|
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;
|
|
@@ -739,12 +733,6 @@ export declare const editorExperimentsConfig: {
|
|
|
739
733
|
productKeys?: ProductKeys;
|
|
740
734
|
typeGuard: IsBooleanType;
|
|
741
735
|
};
|
|
742
|
-
platform_editor_external_embed_grid_fix: {
|
|
743
|
-
defaultValue: boolean;
|
|
744
|
-
param: string;
|
|
745
|
-
productKeys?: ProductKeys;
|
|
746
|
-
typeGuard: IsBooleanType;
|
|
747
|
-
};
|
|
748
736
|
platform_editor_sync_block_ssr_config: {
|
|
749
737
|
defaultValue: boolean;
|
|
750
738
|
param: string;
|
package/package.json
CHANGED