@atlaskit/tmp-editor-statsig 4.14.1 → 4.16.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,27 @@
1
1
  # @atlaskit/editor-statsig-tmp
2
2
 
3
+ ## 4.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#149327](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149327)
8
+ [`f1ba918778e20`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f1ba918778e20) -
9
+ EDITOR-676: Add editor_ai_contextual_selection_toolbar_button experiment.
10
+
11
+ ### Patch Changes
12
+
13
+ - [#148798](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/148798)
14
+ [`8112e98809756`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8112e98809756) -
15
+ [No Issue] Clean up virtualization feature flag
16
+
17
+ ## 4.15.0
18
+
19
+ ### Minor Changes
20
+
21
+ - [#147400](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/147400)
22
+ [`800ff50276ed7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/800ff50276ed7) -
23
+ Clean up experiment platform_editor_nested_non_bodied_macros
24
+
3
25
  ## 4.14.1
4
26
 
5
27
  ### Patch Changes
@@ -6,8 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.createBooleanExperiment = createBooleanExperiment;
8
8
  exports.createMultivariateExperiment = createMultivariateExperiment;
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
11
  var _typeGuards = require("./type-guards");
12
+ var _excluded = ["values"];
11
13
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
14
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
15
  /**
@@ -24,8 +26,10 @@ function createBooleanExperiment(config) {
24
26
  * Helper to create a multivariate experiment configuration
25
27
  */
26
28
  function createMultivariateExperiment(config) {
27
- return _objectSpread(_objectSpread({}, config), {}, {
28
- typeGuard: (0, _typeGuards.oneOf)(config.values),
29
+ var values = config.values,
30
+ restConfig = (0, _objectWithoutProperties2.default)(config, _excluded);
31
+ return _objectSpread(_objectSpread({}, restConfig), {}, {
32
+ typeGuard: (0, _typeGuards.oneOf)(values),
29
33
  defaultValue: config.defaultValue
30
34
  });
31
35
  }
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.editorExperimentsConfig = void 0;
7
- var _typeGuards = require("./type-guards");
7
+ var _experimentBuilders = require("./experiment-builders");
8
8
  /* eslint-disable @atlaskit/editor/no-re-export */
9
9
  // Entry file in package.json
10
10
 
@@ -15,309 +15,274 @@ var _typeGuards = require("./type-guards");
15
15
  */
16
16
  var editorExperimentsConfig = exports.editorExperimentsConfig = {
17
17
  // Added 2024-08-08
18
- 'example-boolean': {
18
+ 'example-boolean': (0, _experimentBuilders.createBooleanExperiment)({
19
19
  productKeys: {
20
20
  confluence: 'confluence_editor_experiment_test_new_package_boolean'
21
21
  },
22
22
  param: 'isEnabled',
23
- typeGuard: _typeGuards.isBoolean,
24
- // Note -- you need to set the type to boolean for the default value
25
23
  defaultValue: false
26
- },
24
+ }),
27
25
  // Added 2024-08-08
28
- 'example-multivariate': {
26
+ 'example-multivariate': (0, _experimentBuilders.createMultivariateExperiment)({
29
27
  productKeys: {
30
28
  confluence: 'confluence_editor_experiment_test_new_package_multivariate'
31
29
  },
32
30
  param: 'variant',
33
- typeGuard: (0, _typeGuards.oneOf)(['one', 'two', 'three']),
34
- // Note -- you need to specify the type of the default value as the union of all possible values
35
- // This is used to provide type safety on consumption
31
+ values: ['one', 'two', 'three'],
36
32
  defaultValue: 'one'
37
- },
33
+ }),
38
34
  // Added 2024-08-08
39
- 'test-new-experiments-package': {
35
+ 'test-new-experiments-package': (0, _experimentBuilders.createBooleanExperiment)({
40
36
  productKeys: {
41
37
  confluence: 'confluence_editor_experiment_test_new_package',
42
38
  jira: 'jira_editor_experiment_test_new_package'
43
39
  },
44
40
  param: 'isEnabled',
45
- typeGuard: _typeGuards.isBoolean,
46
41
  defaultValue: false
47
- },
42
+ }),
48
43
  // Added 2024-09-05
49
- support_table_in_comment: {
44
+ support_table_in_comment: (0, _experimentBuilders.createBooleanExperiment)({
50
45
  productKeys: {
51
46
  confluence: 'platform_editor_support_table_in_comment_exp'
52
47
  },
53
48
  param: 'isEnabled',
54
- typeGuard: _typeGuards.isBoolean,
55
49
  defaultValue: false
56
- },
50
+ }),
57
51
  // Added 2024-09-07
58
- platform_editor_exp_lazy_node_views: {
52
+ platform_editor_exp_lazy_node_views: (0, _experimentBuilders.createBooleanExperiment)({
59
53
  productKeys: {
60
54
  confluence: 'platform_editor_exp_lazy_node_views'
61
55
  },
62
56
  param: 'isEnabled',
63
- typeGuard: _typeGuards.isBoolean,
64
57
  defaultValue: false
65
- },
58
+ }),
66
59
  // Added 2024-09-18
67
- platform_renderer_table_sticky_scrollbar: {
60
+ platform_renderer_table_sticky_scrollbar: (0, _experimentBuilders.createBooleanExperiment)({
68
61
  productKeys: {
69
62
  confluence: 'platform_renderer_table_sticky_scrollbar'
70
63
  },
71
64
  param: 'isEnabled',
72
- typeGuard: _typeGuards.isBoolean,
73
65
  defaultValue: false
74
- },
66
+ }),
75
67
  // Added 2024-10-01
76
- comment_on_bodied_extensions: {
68
+ comment_on_bodied_extensions: (0, _experimentBuilders.createBooleanExperiment)({
77
69
  productKeys: {
78
70
  confluence: 'platform_editor_comment_on_bodied_extensions'
79
71
  },
80
72
  param: 'isEnabled',
81
- typeGuard: _typeGuards.isBoolean,
82
73
  defaultValue: false
83
- },
74
+ }),
84
75
  // Added 2024-10-14
85
76
  // https://console.statsig.com/LqivKg6ADZZaGczRfBKfX/experiments/platform_editor_advanced_layouts/setup
86
- advanced_layouts: {
77
+ advanced_layouts: (0, _experimentBuilders.createBooleanExperiment)({
87
78
  productKeys: {
88
79
  confluence: 'platform_editor_advanced_layouts'
89
80
  },
90
81
  param: 'isEnabled',
91
- typeGuard: _typeGuards.isBoolean,
92
82
  defaultValue: false
93
- },
83
+ }),
94
84
  // Added 2025-3-15
95
85
  // https://console.statsig.com/LqivKg6ADZZaGczRfBKfX/experiments/platform_editor_single_column_layout/setup
96
- single_column_layouts: {
86
+ single_column_layouts: (0, _experimentBuilders.createBooleanExperiment)({
97
87
  productKeys: {
98
88
  confluence: 'platform_editor_single_column_layout'
99
89
  },
100
90
  param: 'isEnabled',
101
- typeGuard: _typeGuards.isBoolean,
102
91
  defaultValue: false
103
- },
92
+ }),
104
93
  // Added 2024-10-08
105
- support_table_in_comment_jira: {
94
+ support_table_in_comment_jira: (0, _experimentBuilders.createBooleanExperiment)({
106
95
  productKeys: {
107
96
  jira: 'platform_editor_support_table_in_comment_jira'
108
97
  },
109
98
  param: 'isEnabled',
110
- typeGuard: _typeGuards.isBoolean,
111
99
  defaultValue: false
112
- },
113
- 'platform_editor_ai-prompts-placeholder': {
100
+ }),
101
+ 'platform_editor_ai-prompts-placeholder': (0, _experimentBuilders.createMultivariateExperiment)({
114
102
  productKeys: {
115
103
  confluence: 'platform_editor_ai-prompts-placeholder'
116
104
  },
117
105
  param: 'cohort',
118
- typeGuard: (0, _typeGuards.oneOf)(['control', 'test']),
106
+ values: ['control', 'test'],
119
107
  defaultValue: 'control'
120
- },
108
+ }),
121
109
  // added 2024-11-06
122
110
  // https://console.statsig.com/LqivKg6ADZZaGczRfBKfX/experiments/platform_editor_nested_tables/setup
123
- 'nested-tables-in-tables': {
111
+ 'nested-tables-in-tables': (0, _experimentBuilders.createBooleanExperiment)({
124
112
  productKeys: {
125
113
  confluence: 'platform_editor_nested_tables'
126
114
  },
127
115
  param: 'isEnabled',
128
- typeGuard: _typeGuards.isBoolean,
129
116
  defaultValue: false
130
- },
117
+ }),
131
118
  // Added 2024-11-26
132
- platform_editor_ai_unsplash_page_header: {
119
+ platform_editor_ai_unsplash_page_header: (0, _experimentBuilders.createBooleanExperiment)({
133
120
  productKeys: {
134
121
  confluence: 'platform_editor_ai_unsplash_page_header'
135
122
  },
136
123
  param: 'isEnabled',
137
- typeGuard: _typeGuards.isBoolean,
138
124
  defaultValue: false
139
- },
125
+ }),
140
126
  // Added 2024-12-05
141
- platform_editor_blockquote_in_text_formatting_menu: {
127
+ platform_editor_blockquote_in_text_formatting_menu: (0, _experimentBuilders.createBooleanExperiment)({
142
128
  productKeys: {
143
129
  confluence: 'platform_editor_blockquote_in_text_formatting_menu'
144
130
  },
145
131
  param: 'isEnabled',
146
- typeGuard: _typeGuards.isBoolean,
147
132
  defaultValue: false
148
- },
133
+ }),
149
134
  // Added 2025-01-09
150
- platform_editor_advanced_code_blocks: {
135
+ platform_editor_advanced_code_blocks: (0, _experimentBuilders.createBooleanExperiment)({
151
136
  productKeys: {
152
137
  confluence: 'platform_editor_advanced_code_blocks'
153
138
  },
154
139
  param: 'isEnabled',
155
- typeGuard: _typeGuards.isBoolean,
156
140
  defaultValue: false
157
- },
141
+ }),
158
142
  // Added 2025-01-13
159
- platform_editor_element_drag_and_drop_multiselect: {
143
+ platform_editor_element_drag_and_drop_multiselect: (0, _experimentBuilders.createBooleanExperiment)({
160
144
  productKeys: {
161
145
  confluence: 'platform_editor_element_drag_and_drop_multiselect'
162
146
  },
163
147
  param: 'isEnabled',
164
- typeGuard: _typeGuards.isBoolean,
165
148
  defaultValue: false
166
- },
149
+ }),
167
150
  // Added 2025-01-16
168
- live_pages_graceful_edit: {
151
+ live_pages_graceful_edit: (0, _experimentBuilders.createMultivariateExperiment)({
169
152
  productKeys: {
170
153
  confluence: 'live_pages_graceful_edit'
171
154
  },
172
155
  param: 'cohort',
173
- typeGuard: (0, _typeGuards.oneOf)(['control', 'text-click-delayed', 'text-click-no-delay', 'initially-hide-toolbar']),
156
+ values: ['control', 'text-click-delayed', 'text-click-no-delay', 'initially-hide-toolbar'],
174
157
  defaultValue: 'control'
175
- },
158
+ }),
176
159
  // Added 2025-01-19
177
- platform_editor_ai_edit_response_in_preview: {
160
+ platform_editor_ai_edit_response_in_preview: (0, _experimentBuilders.createBooleanExperiment)({
178
161
  productKeys: {
179
162
  confluence: 'platform_editor_ai_edit_response_in_preview'
180
163
  },
181
164
  param: 'isEnabled',
182
- typeGuard: _typeGuards.isBoolean,
183
165
  defaultValue: false
184
- },
166
+ }),
185
167
  // Added 2025-02-10
186
- platform_editor_controls: {
168
+ platform_editor_controls: (0, _experimentBuilders.createMultivariateExperiment)({
187
169
  productKeys: {
188
170
  confluence: 'platform_editor_controls'
189
171
  },
190
172
  param: 'cohort',
191
- typeGuard: (0, _typeGuards.oneOf)(['control', 'variant1']),
173
+ values: ['control', 'variant1'],
192
174
  defaultValue: 'control'
193
- },
175
+ }),
194
176
  // Added 2025-04-14
195
- platform_editor_controls_shadow: {
177
+ platform_editor_controls_shadow: (0, _experimentBuilders.createMultivariateExperiment)({
196
178
  productKeys: {
197
179
  confluence: 'platform_editor_controls_shadow'
198
180
  },
199
181
  param: 'cohort',
200
- typeGuard: (0, _typeGuards.oneOf)(['control', 'variant1']),
182
+ values: ['control', 'variant1'],
201
183
  defaultValue: 'control'
202
- },
203
- // Added 2025-02-18
204
- // https://console.statsig.com/LqivKg6ADZZaGczRfBKfX/experiments/platform_editor_nested_non_bodied_macros/setup
205
- platform_editor_nested_non_bodied_macros: {
206
- productKeys: {
207
- confluence: 'platform_editor_nested_non_bodied_macros'
208
- },
209
- param: 'cohort',
210
- typeGuard: (0, _typeGuards.oneOf)(['control', 'test']),
211
- defaultValue: 'control'
212
- },
184
+ }),
213
185
  // Added 28-02-2025
214
- platform_editor_insertion: {
186
+ platform_editor_insertion: (0, _experimentBuilders.createMultivariateExperiment)({
215
187
  productKeys: {
216
188
  confluence: 'platform_editor_insertion'
217
189
  },
218
190
  param: 'cohort',
219
- typeGuard: (0, _typeGuards.oneOf)(['control', 'variant1']),
191
+ values: ['control', 'variant1'],
220
192
  defaultValue: 'control'
221
- },
222
- // Added 2025-02-25
223
- platform_editor_inline_node_virtualization: {
224
- productKeys: {
225
- confluence: 'platform_editor_inline_node_virtualization'
226
- },
227
- param: 'variant',
228
- typeGuard: (0, _typeGuards.oneOf)(['off', 'fallback-small', 'fallback-large']),
229
- defaultValue: 'off'
230
- },
193
+ }),
231
194
  // Added 2025-04-01
232
195
  // https://console.statsig.com/LqivKg6ADZZaGczRfBKfX/experiments/platform_editor_vanilla_dom/setup
233
- platform_editor_vanilla_dom: {
196
+ platform_editor_vanilla_dom: (0, _experimentBuilders.createBooleanExperiment)({
234
197
  productKeys: {
235
198
  confluence: 'platform_editor_vanilla_dom'
236
199
  },
237
200
  param: 'isEnabled',
238
- typeGuard: _typeGuards.isBoolean,
239
201
  defaultValue: false
240
- },
202
+ }),
241
203
  // Added 2025-03-13
242
- editor_text_highlight_orange_to_yellow: {
204
+ editor_text_highlight_orange_to_yellow: (0, _experimentBuilders.createMultivariateExperiment)({
243
205
  productKeys: {
244
206
  confluence: 'editor_text_highlight_orange_to_yellow'
245
207
  },
246
208
  param: 'cohort',
247
- typeGuard: (0, _typeGuards.oneOf)(['control', 'test']),
209
+ values: ['control', 'test'],
248
210
  defaultValue: 'control'
249
- },
211
+ }),
250
212
  // Added 2025-03-28
251
- platform_editor_ai_proactive_ai_nudge_parameters: {
213
+ platform_editor_ai_proactive_ai_nudge_parameters: (0, _experimentBuilders.createMultivariateExperiment)({
252
214
  productKeys: {
253
215
  confluence: 'platform_editor_ai_proactive_ai_nudge_parameters'
254
216
  },
255
217
  param: 'cohort',
256
- typeGuard: (0, _typeGuards.oneOf)(['control', 'variant1']),
218
+ values: ['control', 'variant1'],
257
219
  defaultValue: 'control'
258
- },
220
+ }),
259
221
  // Added 2025-04-14
260
222
  // https://switcheroo.atlassian.com/ui/gates/b159b45a-86d9-4f4b-b482-f9aca5b615d6/key/platform_editor_offline_editing_web
261
- platform_editor_offline_editing_web: {
223
+ platform_editor_offline_editing_web: (0, _experimentBuilders.createBooleanExperiment)({
262
224
  productKeys: {
263
225
  confluence: 'platform_editor_offline_editing_web'
264
226
  },
265
227
  param: 'isEnabled',
266
- typeGuard: _typeGuards.isBoolean,
267
228
  defaultValue: false
268
- },
229
+ }),
269
230
  // Added 2025-03-26
270
- platform_editor_markdown_next_media_plugin_exp: {
231
+ platform_editor_markdown_next_media_plugin_exp: (0, _experimentBuilders.createBooleanExperiment)({
271
232
  productKeys: {
272
233
  confluence: 'platform_editor_markdown_next_media_plugin_exp'
273
234
  },
274
235
  param: 'isEnabled',
275
- typeGuard: _typeGuards.isBoolean,
276
236
  defaultValue: false
277
- },
237
+ }),
278
238
  // Added 2025-04-14
279
- editor_ai_inline_suggestion_date_v2: {
239
+ editor_ai_inline_suggestion_date_v2: (0, _experimentBuilders.createMultivariateExperiment)({
280
240
  productKeys: {
281
241
  confluence: 'editor_ai_inline_suggestion_date_v2'
282
242
  },
283
243
  param: 'cohort',
284
- typeGuard: (0, _typeGuards.oneOf)(['control', 'test']),
244
+ values: ['control', 'test'],
285
245
  defaultValue: 'control'
286
- },
246
+ }),
287
247
  // Added 2025-04-17
288
- platform_editor_tables_drag_and_drop: {
248
+ platform_editor_tables_drag_and_drop: (0, _experimentBuilders.createBooleanExperiment)({
289
249
  productKeys: {
290
250
  confluence: 'platform_editor_tables_drag_and_drop'
291
251
  },
292
252
  param: 'isEnabled',
293
- typeGuard: _typeGuards.isBoolean,
294
253
  defaultValue: false
295
- },
254
+ }),
296
255
  // Added 2025-04-17
297
- platform_editor_tables_table_selector: {
256
+ platform_editor_tables_table_selector: (0, _experimentBuilders.createBooleanExperiment)({
298
257
  productKeys: {
299
258
  confluence: 'platform_editor_tables_table_selector'
300
259
  },
301
260
  param: 'isEnabled',
302
- typeGuard: _typeGuards.isBoolean,
303
261
  defaultValue: false
304
- },
262
+ }),
305
263
  // Added 2025-04-23
306
- platform_editor_usesharedpluginstateselector: {
264
+ platform_editor_usesharedpluginstateselector: (0, _experimentBuilders.createBooleanExperiment)({
307
265
  productKeys: {
308
266
  confluence: 'platform_editor_usesharedpluginstateselector'
309
267
  },
310
268
  param: 'isEnabled',
311
- typeGuard: _typeGuards.isBoolean,
312
269
  defaultValue: false
313
- },
270
+ }),
314
271
  // Added 2025-04-23
315
- platform_renderer_fix_analytics_memo_callback: {
272
+ platform_renderer_fix_analytics_memo_callback: (0, _experimentBuilders.createBooleanExperiment)({
316
273
  productKeys: {
317
274
  confluence: 'platform_renderer_fix_analytics_memo_callback'
318
275
  },
319
276
  param: 'isEnabled',
320
- typeGuard: _typeGuards.isBoolean,
321
277
  defaultValue: false
322
- }
278
+ }),
279
+ // Added 2025-05-05
280
+ editor_ai_contextual_selection_toolbar_button: (0, _experimentBuilders.createMultivariateExperiment)({
281
+ productKeys: {
282
+ confluence: 'editor_ai_contextual_selection_toolbar_button'
283
+ },
284
+ param: 'cohort',
285
+ values: ['control', 'test'],
286
+ defaultValue: 'control'
287
+ })
323
288
  };
@@ -14,9 +14,13 @@ export function createBooleanExperiment(config) {
14
14
  * Helper to create a multivariate experiment configuration
15
15
  */
16
16
  export function createMultivariateExperiment(config) {
17
+ const {
18
+ values,
19
+ ...restConfig
20
+ } = config;
17
21
  return {
18
- ...config,
19
- typeGuard: oneOf(config.values),
22
+ ...restConfig,
23
+ typeGuard: oneOf(values),
20
24
  defaultValue: config.defaultValue
21
25
  };
22
26
  }