-
Notifications
You must be signed in to change notification settings - Fork 411
/
Copy pathform-definition.js
896 lines (821 loc) · 28.3 KB
/
form-definition.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
import {html} from 'lit';
import * as enums from './form-field-enums';
const COMMA_SEPARATED_FIELDS = [
'owner',
'editors',
'cc_recipients',
'spec_mentors',
'search_tags',
'devrel',
'i2e_lgtms',
'i2s_lgtms',
];
const LINE_SEPARATED_FIELDS = [
'explainer_links',
'doc_links',
'sample_links',
'screenshot_links',
];
/* Convert the format of feature object fetched from API into those for edit.
* The feature object from API is formatted by the feature_to_legacy_json
* function in internals/feature_helpers.py
*/
export function formatFeatureForEdit(feature) {
const formattedFeature = {
...feature,
category: feature.category_int,
enterprise_feature_categories: Array.from(new Set(feature.enterprise_feature_categories || []))
.map(x => parseInt(x).toString()),
feature_type: feature.feature_type_int,
intent_stage: feature.intent_stage_int,
// accurate_as_of field should always be checked, regardless of
// the current value. This is only necessary if the feature
// has been created before this field was added.
accurate_as_of: true,
// from feature.standards
spec_link: feature.standards.spec,
standard_maturity: feature.standards.maturity.val,
tag_review_status: feature.tag_review_status_int,
security_review_status: feature.security_review_status_int,
privacy_review_status: feature.privacy_review_status_int,
// from feature.resources
sample_links: feature.resources.samples,
doc_links: feature.resources.docs,
search_tags: feature.tags,
// from feature.browsers.chrome
blink_components: feature.browsers.chrome.blink_components[0],
bug_url: feature.browsers.chrome.bug,
devrel: feature.browsers.chrome.devrel,
owner: feature.browsers.chrome.owners,
prefixed: feature.browsers.chrome.prefixed,
impl_status_chrome: feature.browsers.chrome.status.val,
shipped_milestone: feature.browsers.chrome.desktop,
shipped_android_milestone: feature.browsers.chrome.android,
shipped_webview_milestone: feature.browsers.chrome.webview,
shipped_ios_milestone: feature.browsers.chrome.ios,
// from feature.browsers.ff
ff_views: feature.browsers.ff.view.val,
ff_views_link: feature.browsers.ff.view.url,
ff_views_notes: feature.browsers.ff.view.notes,
// from feature.browsers.safari
safari_views: feature.browsers.safari.view.val,
safari_views_link: feature.browsers.safari.view.url,
safari_views_notes: feature.browsers.safari.view.notes,
// from feature.browsers.webdev
web_dev_views: feature.browsers.webdev.view.val,
web_dev_views_link: feature.browsers.webdev.view.url,
web_dev_views_notes: feature.browsers.webdev.view.notes,
// from feature.browsers.other
other_views_notes: feature.browsers.other.view.notes,
};
COMMA_SEPARATED_FIELDS.map((field) => {
if (formattedFeature[field]) formattedFeature[field] = formattedFeature[field].join(', ');
});
LINE_SEPARATED_FIELDS.map((field) => {
if (formattedFeature[field]) formattedFeature[field] = formattedFeature[field].join('\r\n');
});
return formattedFeature;
}
/**
*
* The following objects define the list of fields for each guide form.
*
* Most stages have flat form definitions, with overriding definitions
* for stages that display differently than their flat definitions.
*/
// The fields shown to the user when first creating a new feature.
// Note: feature_type is done with custom HTML in chromedash-guide-new-page
export const NEW_FEATURE_FORM_FIELDS = [
'name',
'summary',
'unlisted',
'enterprise_impact',
'owner',
'editors',
'cc_recipients',
'blink_components',
'category',
];
export const ENTERPRISE_NEW_FEATURE_FORM_FIELDS = [
'name',
'summary',
'owner',
'editors',
'enterprise_feature_categories',
'first_enterprise_notification_milestone',
'enterprise_impact',
'screenshot_links',
];
// The fields that are available to every feature.
export const FLAT_METADATA_FIELDS = {
name: 'Feature metadata',
sections: [
// Standardizaton
{
name: 'Feature metadata',
fields: [
'name',
'summary',
'unlisted',
'enterprise_impact',
'owner',
'editors',
'cc_recipients',
'devrel',
'category',
'feature_type',
'search_tags',
],
},
// Implementation
{
name: 'Implementation in Chromium',
fields: [
'impl_status_chrome',
'blink_components',
'bug_url',
'launch_bug_url',
'comments',
],
isImplementationSection: true,
},
],
};
// The fields that are available to every enterprise feature.
export const FLAT_ENTERPRISE_METADATA_FIELDS = {
name: 'Feature metadata',
sections: [
// Standardizaton
{
name: 'Feature metadata',
fields: [
'name',
'summary',
'owner',
'editors',
'enterprise_feature_categories',
'enterprise_impact',
'first_enterprise_notification_milestone',
'screenshot_links',
],
},
],
};
// All fields relevant to the incubate/planning stage.
const FLAT_INCUBATE_FIELDS = {
name: 'Identify the need',
sections: [
// Standardization
{
name: 'Identify the need',
fields: [
'motivation',
'initial_public_proposal_url',
'explainer_links',
],
},
// Implementation
{
name: 'Implementation in Chromium',
fields: ['requires_embedder_support'],
isImplementationSection: true,
implStatusValue: null,
},
],
};
// All fields relevant to the implement/prototyping stage.
// TODO(jrobbins): advise user to request a tag review
// TODO(jrobbins): api overview link
const FLAT_PROTOTYPE_FIELDS = {
name: 'Prototype a solution',
sections: [
// Standardization
{
name: 'Prototype a solution',
fields: [
'motivation',
'spec_link',
'standard_maturity',
'api_spec',
'spec_mentors',
'intent_to_implement_url',
],
},
],
};
// All fields relevant to the dev trials stage.
const FLAT_DEV_TRIAL_FIELDS = {
name: 'Dev trials and iterate on design',
sections: [
// Standardizaton
{
name: 'Dev trial',
fields: [
'devtrial_instructions',
'doc_links',
'interop_compat_risks',
'safari_views',
'safari_views_link',
'safari_views_notes',
'ff_views',
'ff_views_link',
'ff_views_notes',
'web_dev_views',
'web_dev_views_link',
'web_dev_views_notes',
'other_views_notes',
'security_review_status',
'privacy_review_status',
'ergonomics_risks',
'activation_risks',
'security_risks',
'debuggability',
'all_platforms',
'all_platforms_descr',
'wpt',
'wpt_descr',
'sample_links',
],
},
// Implementation
{
name: 'Implementation in Chromium',
fields: [
'flag_name',
'finch_name',
'non_finch_justification',
'dt_milestone_desktop_start',
'dt_milestone_android_start',
'dt_milestone_ios_start',
'announcement_url',
],
isImplementationSection: true,
implStatusValue: enums.IMPLEMENTATION_STATUS.BEHIND_A_FLAG[0],
},
],
};
// TODO(jrobbins): UA support signals section
// TODO(jrobbins): api overview link
// All fields relevant to the origin trial stage.
const FLAT_ORIGIN_TRIAL_FIELDS = {
name: 'Origin trial',
sections: [
// Standardization
{
name: 'Origin trial',
fields: [
'display_name',
'experiment_goals',
'experiment_risks',
'ongoing_constraints',
// TODO(jrobbins): display r4dt_url instead when deprecating.
'i2e_lgtms',
'intent_to_experiment_url',
'origin_trial_feedback_url',
],
},
// Implementation
{
name: 'Implementation in Chromium',
fields: [
'ot_milestone_desktop_start',
'ot_milestone_desktop_end',
'ot_milestone_android_start',
'ot_milestone_android_end',
'ot_milestone_webview_start',
'ot_milestone_webview_end',
'experiment_timeline', // deprecated
],
isImplementationSection: true,
implStatusValue: enums.IMPLEMENTATION_STATUS.ORIGIN_TRIAL[0],
},
],
};
export const FLAT_TRIAL_EXTENSION_FIELDS = {
name: 'Trial extension',
sections: [
{
name: 'Trial extension',
fields: [
'experiment_extension_reason',
'intent_to_extend_experiment_url',
'extension_desktop_last',
'extension_android_last',
'extension_webview_last',
],
},
],
};
const FLAT_EVAL_READINESS_TO_SHIP_FIELDS = {
name: 'Evaluate readiness to ship',
sections: [
{
name: 'Evaluate readiness to ship',
fields: [
'prefixed',
'tag_review',
],
},
],
};
// All fields relevant to the prepare to ship stage.
const FLAT_PREPARE_TO_SHIP_FIELDS = {
name: 'Prepare to ship',
sections: [
{
name: 'Prepare to ship',
fields: [
'display_name',
// Standardization
'tag_review_status',
'webview_risks',
'anticipated_spec_changes',
'i2s_lgtms',
'availability_expectation',
'adoption_expectation',
'adoption_plan',
// Implementation
'measurement',
'non_oss_deps',
// Stage-specific fields
'finch_url',
'intent_to_ship_url',
],
},
{
name: 'Implementation in Chromium',
fields: [
'shipped_milestone',
'shipped_android_milestone',
'shipped_ios_milestone',
'shipped_webview_milestone',
],
isImplementationSection: true,
implStatusValue: enums.IMPLEMENTATION_STATUS.ENABLED_BY_DEFAULT[0],
},
],
};
// All fields relevant to the enterprise prepare to ship stage.
export const FLAT_ENTERPRISE_PREPARE_TO_SHIP_FIELDS = {
name: 'Rollout step',
sections: [
{
name: 'Rollout step',
fields: [
'rollout_milestone',
'rollout_platforms',
'rollout_details',
'enterprise_policies',
],
},
],
};
/**
* The following definitions override the flat form definitions for
* specific stage types.
*/
const PSA_IMPLEMENT_FIELDS = {
name: 'Start prototyping',
sections: [
// Standardization
{
name: 'Start prototyping',
fields: [
'motivation',
'spec_link',
'standard_maturity',
],
},
],
};
const PSA_PREPARE_TO_SHIP_FIELDS = {
name: 'Prepare to ship',
sections: [
// Standardization
{
name: 'Prepare to ship',
fields: [
'intent_to_ship_url',
],
},
// Implementation
{
name: 'Implementation in Chromium',
fields: [
'shipped_milestone',
'shipped_android_milestone',
'shipped_ios_milestone',
'shipped_webview_milestone',
],
isImplementationSection: true,
implStatusValue: enums.IMPLEMENTATION_STATUS.ENABLED_BY_DEFAULT[0],
},
],
};
const DEPRECATION_PLAN_FIELDS = {
name: 'Write up motivation',
sections: [
{
name: 'Write up motivation',
fields: [
'motivation',
'spec_link',
],
},
],
};
const DEPRECATION_DEV_TRIAL_FIELDS = {
name: 'Dev trial of deprecation',
sections: [
// Standardizaton
{
name: 'Dev trial of deprecation',
fields: [
'devtrial_instructions',
'doc_links',
'interop_compat_risks',
'safari_views',
'safari_views_link',
'safari_views_notes',
'ff_views',
'ff_views_link',
'ff_views_notes',
'web_dev_views',
'web_dev_views_link',
'web_dev_views_notes',
'other_views_notes',
'security_review_status',
'privacy_review_status',
'ergonomics_risks',
'activation_risks',
'security_risks',
'debuggability',
'all_platforms',
'all_platforms_descr',
'wpt',
'wpt_descr',
'sample_links',
],
},
// Implementation
{
name: 'Implementation in Chromium',
fields: [
'flag_name',
'finch_name',
'non_finch_justification',
'dt_milestone_desktop_start',
'dt_milestone_android_start',
'dt_milestone_ios_start',
'announcement_url',
],
isImplementationSection: true,
implStatusValue: enums.IMPLEMENTATION_STATUS.BEHIND_A_FLAG[0],
},
],
};
export const ORIGIN_TRIAL_CREATION_FIELDS = {
name: 'Origin trial creation',
sections: [
{
fields: [
'ot_display_name',
'ot_description',
'ot_owner_email',
'ot_emails',
'ot_creation__milestone_desktop_first',
'ot_creation__milestone_desktop_last',
'ot_creation__intent_to_experiment_url',
'ot_documentation_url',
'ot_feedback_submission_url',
'ot_chromium_trial_name',
'ot_webfeature_use_counter',
'ot_is_deprecation_trial',
'ot_has_third_party_support',
'ot_is_critical_trial',
'ot_require_approvals',
'ot_request_note',
],
},
],
};
export const ORIGIN_TRIAL_EXTENSION_FIELDS = {
name: 'Origin trial extension',
sections: [
{
fields: [
'ot_extension__intent_to_extend_experiment_url',
'ot_extension__milestone_desktop_last',
],
},
],
};
// Note: Even though this is similar to another form, it is likely to change.
const DEPRECATION_ORIGIN_TRIAL_FIELDS = {
name: 'Origin trial',
sections: [
{
name: 'Origin trial',
fields: [
'display_name',
'experiment_goals',
'experiment_risks',
'ongoing_constraints',
'r4dt_url', // map to name="intent_to_experiment_url" field upon form submission
'r4dt_lgtms', // map to name="i2e_lgtms" field upon form submission
'origin_trial_feedback_url',
],
},
// Implementation
{
name: 'Implementation in Chromium',
fields: [
'ot_milestone_desktop_start',
'ot_milestone_desktop_end',
'ot_milestone_android_start',
'ot_milestone_android_end',
'ot_milestone_webview_start',
'ot_milestone_webview_end',
'experiment_timeline', // deprecated
],
isImplementationSection: true,
implStatusValue: enums.IMPLEMENTATION_STATUS.ORIGIN_TRIAL[0],
},
],
};
// Note: Even though this is similar to another form, it is likely to change.
const DEPRECATION_PREPARE_TO_SHIP_FIELDS = {
name: 'Prepare to ship',
sections: [
// Standardization
{
name: 'Prepare to ship',
fields: [
'display_name',
'intent_to_ship_url',
'i2s_lgtms',
],
},
// Implementation
{
name: 'Implementation in Chromium',
fields: [
'shipped_milestone',
'shipped_android_milestone',
'shipped_ios_milestone',
'shipped_webview_milestone',
],
isImplementationSection: true,
implStatusValue: enums.IMPLEMENTATION_STATUS.ENABLED_BY_DEFAULT[0],
},
],
};
// ****************************
// ** Verify Accuracy fields **
// ****************************
// The fields shown to the user when verifying the accuracy of a feature.
// Only one stage can be used for each definition object, so
// multiple definitions exist for each stage that might be updated.
export const VERIFY_ACCURACY_METADATA_FIELDS = {
name: 'Feature Metadata',
sections: [
{
name: 'Feature Metadata',
fields: [
'summary',
'owner',
'editors',
'cc_recipients',
'impl_status_chrome',
],
},
],
};
const VERIFY_ACCURACY_DEV_TRIAL_FIELDS = {
name: 'Dev trials and iterate on design',
sections: [
{
name: 'Dev trials milestones',
fields: [
'dt_milestone_desktop_start',
'dt_milestone_android_start',
'dt_milestone_ios_start',
],
},
],
};
const VERIFY_ACCURACY_ORIGIN_TRIAL_FIELDS = {
name: 'Origin trial',
sections: [
{
name: 'Origin trial milestones',
fields: [
'ot_milestone_desktop_start',
'ot_milestone_desktop_end',
'ot_milestone_android_start',
'ot_milestone_android_end',
'ot_milestone_webview_start',
'ot_milestone_webview_end',
],
},
],
};
export const VERIFY_ACCURACY_TRIAL_EXTENSION_FIELDS = {
name: 'Trial extension',
sections: [
{
name: 'Trial extension milestones',
fields: [
'extension_android_last',
'extension_desktop_last',
'extension_webview_last',
],
},
],
};
const VERIFY_ACCURACY_PREPARE_TO_SHIP_FIELDS = {
name: 'Prepare to ship',
sections: [
{
name: 'Shipping milestones',
fields: [
'shipped_milestone',
'shipped_android_milestone',
'shipped_ios_milestone',
'shipped_webview_milestone',
],
},
],
};
// A single form to display the checkbox for verifying accuracy at the end.
export const VERIFY_ACCURACY_CONFIRMATION_FIELD = {
name: 'Verify Accuracy',
sections: [
{
name: 'Verify Accuracy',
fields: [
'accurate_as_of',
],
},
],
};
export const FORMS_BY_STAGE_TYPE = {
[enums.STAGE_BLINK_INCUBATE]: FLAT_INCUBATE_FIELDS,
[enums.STAGE_BLINK_PROTOTYPE]: FLAT_PROTOTYPE_FIELDS,
[enums.STAGE_BLINK_DEV_TRIAL]: FLAT_DEV_TRIAL_FIELDS,
[enums.STAGE_BLINK_EVAL_READINESS]: FLAT_EVAL_READINESS_TO_SHIP_FIELDS,
[enums.STAGE_BLINK_ORIGIN_TRIAL]: FLAT_ORIGIN_TRIAL_FIELDS,
[enums.STAGE_BLINK_SHIPPING]: FLAT_PREPARE_TO_SHIP_FIELDS,
[enums.STAGE_FAST_PROTOTYPE]: FLAT_PROTOTYPE_FIELDS,
[enums.STAGE_FAST_DEV_TRIAL]: FLAT_DEV_TRIAL_FIELDS,
[enums.STAGE_FAST_ORIGIN_TRIAL]: FLAT_ORIGIN_TRIAL_FIELDS,
[enums.STAGE_FAST_SHIPPING]: FLAT_PREPARE_TO_SHIP_FIELDS,
[enums.STAGE_PSA_IMPLEMENT_FIELDS]: PSA_IMPLEMENT_FIELDS,
[enums.STAGE_PSA_DEV_TRIAL]: FLAT_DEV_TRIAL_FIELDS,
[enums.STAGE_PSA_SHIPPING]: PSA_PREPARE_TO_SHIP_FIELDS,
[enums.STAGE_DEP_PLAN]: DEPRECATION_PLAN_FIELDS,
[enums.STAGE_DEP_DEV_TRIAL]: DEPRECATION_DEV_TRIAL_FIELDS,
[enums.STAGE_DEP_DEPRECATION_TRIAL]: DEPRECATION_ORIGIN_TRIAL_FIELDS,
[enums.STAGE_DEP_SHIPPING]: DEPRECATION_PREPARE_TO_SHIP_FIELDS,
[enums.STAGE_ENT_ROLLOUT]: FLAT_ENTERPRISE_PREPARE_TO_SHIP_FIELDS,
[enums.STAGE_ENT_SHIPPED]: FLAT_PREPARE_TO_SHIP_FIELDS,
};
export const CREATEABLE_STAGES = {
[enums.FEATURE_TYPES.FEATURE_TYPE_INCUBATE_ID[0]]: [
enums.STAGE_BLINK_ORIGIN_TRIAL,
enums.STAGE_BLINK_SHIPPING,
enums.STAGE_ENT_ROLLOUT,
],
[enums.FEATURE_TYPES.FEATURE_TYPE_EXISTING_ID[0]]: [
enums.STAGE_FAST_ORIGIN_TRIAL,
enums.STAGE_FAST_SHIPPING,
enums.STAGE_ENT_ROLLOUT,
],
[enums.FEATURE_TYPES.FEATURE_TYPE_CODE_CHANGE_ID[0]]: [
enums.STAGE_PSA_SHIPPING,
enums.STAGE_ENT_ROLLOUT,
],
[enums.FEATURE_TYPES.FEATURE_TYPE_DEPRECATION_ID[0]]: [
enums.STAGE_DEP_DEPRECATION_TRIAL,
enums.STAGE_DEP_SHIPPING,
enums.STAGE_ENT_ROLLOUT,
],
[enums.FEATURE_TYPES.FEATURE_TYPE_ENTERPRISE_ID[0]]: [
enums.STAGE_ENT_ROLLOUT,
],
};
export const VERIFY_ACCURACY_FORMS_BY_STAGE_TYPE = {
[enums.STAGE_BLINK_DEV_TRIAL]: VERIFY_ACCURACY_DEV_TRIAL_FIELDS,
[enums.STAGE_BLINK_ORIGIN_TRIAL]: VERIFY_ACCURACY_ORIGIN_TRIAL_FIELDS,
[enums.STAGE_BLINK_SHIPPING]: VERIFY_ACCURACY_PREPARE_TO_SHIP_FIELDS,
[enums.STAGE_FAST_DEV_TRIAL]: VERIFY_ACCURACY_DEV_TRIAL_FIELDS,
[enums.STAGE_FAST_ORIGIN_TRIAL]: VERIFY_ACCURACY_ORIGIN_TRIAL_FIELDS,
[enums.STAGE_FAST_SHIPPING]: VERIFY_ACCURACY_PREPARE_TO_SHIP_FIELDS,
[enums.STAGE_PSA_DEV_TRIAL]: VERIFY_ACCURACY_DEV_TRIAL_FIELDS,
[enums.STAGE_PSA_SHIPPING]: VERIFY_ACCURACY_PREPARE_TO_SHIP_FIELDS,
[enums.STAGE_DEP_DEV_TRIAL]: VERIFY_ACCURACY_DEV_TRIAL_FIELDS,
[enums.STAGE_DEP_DEPRECATION_TRIAL]: VERIFY_ACCURACY_ORIGIN_TRIAL_FIELDS,
[enums.STAGE_DEP_SHIPPING]: VERIFY_ACCURACY_PREPARE_TO_SHIP_FIELDS,
[enums.STAGE_ENT_SHIPPED]: VERIFY_ACCURACY_PREPARE_TO_SHIP_FIELDS,
};
const BLINK_GENERIC_QUESTIONNAIRE = (
'To request a review, use the "Draft intent..." button ' +
'above to generate an intent messsage, ' +
'and then post that message to [email protected].\n' +
'\n' +
'Be sure to update your feature entry in response to ' +
'any suggestions on that email thread.'
);
const PRIVACY_GENERIC_QUESTIONNAIRE = (
html`<p><b>Please fill out the Security & Privacy self-review questionnaire: <a href="https://www.w3.org/TR/security-privacy-questionnaire/" target="_blank">https://www.w3.org/TR/security-privacy-questionnaire</a>/</b></p>
<p>Share it as a public document, as a file in your repository, or in any other public format of your choice.</p>
<p>You can reuse the same filled-out questionnaire in the security review below, across all stages of this ChromeStatus entry, and across all entries related to the same API. If you updated an existing questionnaire to reflect new changes to the API, please highlight them for an easier review.</p>
<p><b>If you believe your feature has no privacy impact</b> and none of the questions in the questionnaire apply, you can provide a justification instead, e.g. "Removing a prefix from the API, no changes to functionality" or "New CSS property that doesn't depend on the user state, therefore doesn't reveal any user information". Note that if your reviewer disagrees with the justification, they may ask you to fill out the questionnaire nevertheless.</p>`
);
const SECURITY_GENERIC_QUESTIONNAIRE = (
html`<p><b>Please fill out the Security & Privacy self-review questionnaire: <a href="https://www.w3.org/TR/security-privacy-questionnaire/" target="_blank">https://www.w3.org/TR/security-privacy-questionnaire</a>/</b></p>
<p>Share it as a public document, as a file in your repository, or in any other public format of your choice.</p>
<p>You can reuse the same filled-out questionnaire in the privacy review above, across all stages of this ChromeStatus entry, and across all entries related to an API. If you updated an existing questionnaire to reflect new changes to the API, please highlight them for an easier review.</p>
<p><b>If you believe your feature has no security impact</b> and none of the questions in the questionnaire apply, you can provide a justification instead. Note that if your reviewer disagrees with the justification, they may ask you to fill out the questionnaire nevertheless.</p>`
);
const ENTERPRISE_SHIP_QUESTIONNAIRE = (
html`<b>(1) Does this launch include a breaking change?</b>
Does this launch remove or modify existing behavior or does it interrupt an existing user flow? (e.g. removing or restricting an API, or significant UI change). Answer with one of the following options, and/or describe anything you're unsure about:
<ul>
<li>No. There's no change visible to users, developers, or IT admins (e.g. internal refactoring)
<li>No. This launch is strictly additive functionality
<li>Yes. Something that exists is changing or being removed (even if usage is very small)
<li>I don't know. Enterprise reviewers, please help me decide. The relevant information is: ______
</ul>
<b>(2) Is there any other reason you expect that enterprises will care about this launch?</b>
(e.g. they may perceive a risk of data leaks if the browser is uploading new information, or it may be a surprise to employees resulting in them calling their help desk). Answer with one of the following options, and/or describe anything you're unsure about:
<ul>
<li>No. Enterprises won't care about this
<li>Yes. They'll probably care because ______
<li>I don't know. Enterprise reviewers, please help me decide. The relevant information is: ______
</ul>
<b>(3) Does your launch have an enterprise policy to control it, and will it be available when this rolls out to stable (even to 1%)?</b>
Only required if you answered Yes to either of the first 2 questions. Answer with one of the following options, and/or describe anything you're unsure about:
<ul>
<li>Yes. It's called ______. It will be a permanent policy, and it will be available when stable rollout starts
<li>Yes. It's called ______. This is a temporary transition period, so the policy will stop working on milestone ___. It will be available when stable rollout starts
<li>No. A policy is infeasible because ______ (e.g. this launch is a change in how we compile Chrome)
<li>No. A policy isn't necessary because ______ (e.g. there's a better method of control available to admins)
</ul>
<b>(4) Provide a brief title and description of this launch, which can be shared with enterprises.</b>
Only required if you answered Yes to either of the first 2 questions. This may be added to browser release notes. Where applicable, explain the benefit to users, and describe the policy to control it.
`
);
const DEBUGGABILITY_ORIGIN_TRIAL_QUESTIONNAIRE = (
`(1) Does the introduction of the new Web Platform feature break Chrome DevTools' existing developer experience?
(2) Does Chrome DevTools' existing set of tooling features interact with the new Web Platform feature in an expected way?
(3) Would the new Web Platform feature's acceptance and/or adoption benefit from adding a new developer workflow to Chrome DevTools?
When in doubt, please check out https://goo.gle/devtools-checklist for details!
`
);
const DEBUGGABILITY_SHIP_QUESTIONNAIRE = DEBUGGABILITY_ORIGIN_TRIAL_QUESTIONNAIRE;
const TESTING_SHIP_QUESTIONNAIRE = (
html`<b>(1) Does your feature have sufficient automated test coverage (Unit tests, WPT, browser tests and other integration tests)?</b>
Chrome requires at least 70% automation code coverage (<a href="https://analysis.chromium.org/coverage/p/chromium" target="_blank">dashboard</a>) running on the main/release branch and 70% Changelist <a href="https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/testing/code_coverage_in_gerrit.md" target="_blank">code coverage in Gerrit</a>?
Do the automated tests have more than 93% green (flakiness < 7%) on CQ and CI builders?
<ul>
<li>Yes. My feature met the minimum automated test coverage and health requirements.
<li>No. My feature does not meet the requirements since __________.
</ul>
<b>(2) How are performance tests conducted on Chromium builders?</b> List links to tests if any.
<b>(3) Does this feature have non-automatable test cases that require manual testing? Do you have a plan to get them tested?</b>
<ul>
<li>No. All feature related test cases are automated.
<li>Yes. There are non-automatable test cases and I have completed test execution or allocated resources to ensure the coverage of these test cases.
<li>Yes. There are non-automatable test cases and my feature impacts Google products.
</ul>
<b>(4) If your feature impacts Google products, please fill in <a href="http://go/chrome-wp-test-survey" target="_blank">go/chrome-wp-test-survey</a>.</b> Make a copy, answer the survey questions, and provide a link to your document here.
`
);
export const GATE_QUESTIONNAIRES = {
[enums.GATE_TYPES.API_PROTOTYPE]: BLINK_GENERIC_QUESTIONNAIRE,
[enums.GATE_TYPES.API_ORIGIN_TRIAL]: BLINK_GENERIC_QUESTIONNAIRE,
[enums.GATE_TYPES.API_EXTEND_ORIGIN_TRIAL]: BLINK_GENERIC_QUESTIONNAIRE,
[enums.GATE_TYPES.API_SHIP]: BLINK_GENERIC_QUESTIONNAIRE,
[enums.GATE_TYPES.API_PLAN]: BLINK_GENERIC_QUESTIONNAIRE,
[enums.GATE_TYPES.PRIVACY_ORIGIN_TRIAL]: PRIVACY_GENERIC_QUESTIONNAIRE,
[enums.GATE_TYPES.PRIVACY_SHIP]: PRIVACY_GENERIC_QUESTIONNAIRE,
// Note: There is no privacy planning gate.
[enums.GATE_TYPES.SECURITY_ORIGIN_TRIAL]: SECURITY_GENERIC_QUESTIONNAIRE,
[enums.GATE_TYPES.SECURITY_SHIP]: SECURITY_GENERIC_QUESTIONNAIRE,
// Note: There is no security planning gate.
[enums.GATE_TYPES.ENTERPRISE_SHIP]: ENTERPRISE_SHIP_QUESTIONNAIRE,
[enums.GATE_TYPES.ENTERPRISE_PLAN]: ENTERPRISE_SHIP_QUESTIONNAIRE,
[enums.GATE_TYPES.DEBUGGABILITY_ORIGIN_TRIAL]:
DEBUGGABILITY_ORIGIN_TRIAL_QUESTIONNAIRE,
[enums.GATE_TYPES.DEBUGGABILITY_SHIP]: DEBUGGABILITY_SHIP_QUESTIONNAIRE,
[enums.GATE_TYPES.DEBUGGABILITY_PLAN]: DEBUGGABILITY_SHIP_QUESTIONNAIRE,
[enums.GATE_TYPES.TESTING_SHIP]: TESTING_SHIP_QUESTIONNAIRE,
[enums.GATE_TYPES.TESTING_PLAN]: TESTING_SHIP_QUESTIONNAIRE,
};
/** Copy field SRC to DST if SRC is edited and DST was empty and has not been edited */
export const COPY_ON_EDIT = Object.freeze({
'ot_milestone_desktop_start': ['ot_milestone_android_start', 'ot_milestone_webview_start'],
'ot_milestone_desktop_end': ['ot_milestone_android_end', 'ot_milestone_webview_end'],
'dt_milestone_desktop_start': ['dt_milestone_android_start', 'dt_milestone_webview_start'],
});