OT creation form bug fixes (#3865)
* OT creation form bug fixes * non-deprecation trials require a usecounter value * lint fix
This commit is contained in:
Родитель
82eab3fa5f
Коммит
42668ce7b2
|
@ -98,8 +98,8 @@ class OriginTrialsAPI(basehandlers.EntitiesAPIHandler):
|
|||
'Origin trial feature name not found in file')
|
||||
|
||||
if not body.get('ot_is_deprecation_trial', {}).get('value', False):
|
||||
use_counter = body.get('ot_webfeature_use_counter', {}).get('value')
|
||||
if use_counter is None:
|
||||
use_counter = body.get('ot_webfeature_use_counter', {}).get('')
|
||||
if not use_counter:
|
||||
validation_errors['ot_webfeature_use_counter'] = (
|
||||
'No UseCounter specified for non-deprecation trial.')
|
||||
elif f'{use_counter} =' not in webfeature_file:
|
||||
|
|
|
@ -511,8 +511,8 @@ export const ORIGIN_TRIAL_CREATION_FIELDS = {
|
|||
'ot_documentation_url',
|
||||
'ot_feedback_submission_url',
|
||||
'ot_chromium_trial_name',
|
||||
'ot_webfeature_use_counter',
|
||||
'ot_is_deprecation_trial',
|
||||
'ot_webfeature_use_counter',
|
||||
'ot_has_third_party_support',
|
||||
'ot_is_critical_trial',
|
||||
'ot_require_approvals',
|
||||
|
|
|
@ -1284,7 +1284,8 @@ export const ALL_FIELDS = {
|
|||
attrs: TEXT_FIELD_ATTRS,
|
||||
required: true,
|
||||
label: 'Chromium trial name',
|
||||
help_text: html` Name for the trial, as specified in
|
||||
help_text: html` Name for the trial, given as the value of the property
|
||||
"origin_trial_feature_name" as specified in
|
||||
<a
|
||||
target="_blank"
|
||||
href="https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/renderer/platform/runtime_enabled_features.json5"
|
||||
|
@ -1375,7 +1376,6 @@ export const ALL_FIELDS = {
|
|||
placeholder: 'e.g. "kWebFeature"',
|
||||
pattern: String.raw`k\S*`,
|
||||
},
|
||||
required: true,
|
||||
label: 'WebFeature UseCounter name',
|
||||
help_text: html` For measuring usage, this must be a single named value from
|
||||
the WebFeature enum, e.g. kWorkerStart. The use counter must be landed in
|
||||
|
@ -1383,7 +1383,7 @@ export const ALL_FIELDS = {
|
|||
target="_blank"
|
||||
href="https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom"
|
||||
>web_feature.mojom</a
|
||||
>.`,
|
||||
>. Not required for deprecation trials.`,
|
||||
},
|
||||
|
||||
ot_require_approvals: {
|
||||
|
@ -1432,13 +1432,12 @@ export const ALL_FIELDS = {
|
|||
},
|
||||
|
||||
ot_creation__intent_to_experiment_url: {
|
||||
name: 'intent_to_experiment_url',
|
||||
type: 'input',
|
||||
attrs: URL_FIELD_ATTRS,
|
||||
required: true,
|
||||
label: 'Intent to Experiment link',
|
||||
help_text: html`After you have started the "Intent to Experiment" discussion
|
||||
thread, link to it here.`,
|
||||
help_text: html`Your "Intent to Experiment" discussion thread. The necessary
|
||||
LGTMs should already have been received.`,
|
||||
},
|
||||
|
||||
ot_creation__milestone_desktop_first: {
|
||||
|
|
Загрузка…
Ссылка в новой задаче