Add `ot_feedback_submission_url` field (#3333)
This commit is contained in:
Родитель
9e48ba1363
Коммит
5ecb14e050
|
@ -107,6 +107,7 @@ STAGE_FIELD_DATA_TYPES: FIELD_INFO_DATA_TYPE = [
|
|||
('ot_chromium_trial_name', 'str'),
|
||||
('ot_documentation_url', 'link'),
|
||||
('ot_emails', 'emails'),
|
||||
('ot_feedback_submission_url', 'link'),
|
||||
('ot_has_third_party_support', 'bool'),
|
||||
('ot_is_critical_trial', 'bool'),
|
||||
('ot_is_deprecation_trial', 'bool'),
|
||||
|
|
|
@ -177,7 +177,6 @@ def stage_to_json_dict(
|
|||
'created': str(stage.created),
|
||||
'feature_id': stage.feature_id,
|
||||
'stage_type': stage.stage_type,
|
||||
'ot_description': stage.ot_description,
|
||||
'display_name': stage.display_name,
|
||||
'intent_stage': INTENT_STAGES_BY_STAGE_TYPE.get(
|
||||
stage.stage_type, INTENT_NONE),
|
||||
|
@ -193,8 +192,10 @@ def stage_to_json_dict(
|
|||
'origin_trial_id': stage.origin_trial_id,
|
||||
'origin_trial_feedback_url': stage.origin_trial_feedback_url,
|
||||
'ot_chromium_trial_name': stage.ot_chromium_trial_name,
|
||||
'ot_description': stage.ot_description,
|
||||
'ot_documentation_url': stage.ot_documentation_url,
|
||||
'ot_emails': stage.ot_emails,
|
||||
'ot_feedback_submission_url': stage.ot_feedback_submission_url,
|
||||
'ot_has_third_party_support': stage.ot_has_third_party_support,
|
||||
'ot_is_critical_trial': stage.ot_is_critical_trial,
|
||||
'ot_is_deprecation_trial': stage.ot_is_deprecation_trial,
|
||||
|
|
|
@ -71,6 +71,7 @@ class StagesAPITest(testing_config.CustomTestCase):
|
|||
ot_description='An origin trial\'s description',
|
||||
ot_documentation_url='https://example.com/ot_docs',
|
||||
ot_emails=['user1@example.com', 'user2@example.com'],
|
||||
ot_feedback_submission_url='https://example.com/submit_feedback',
|
||||
ot_has_third_party_support=True,
|
||||
ot_is_deprecation_trial=True,
|
||||
ot_is_critical_trial=True,
|
||||
|
@ -107,6 +108,7 @@ class StagesAPITest(testing_config.CustomTestCase):
|
|||
'ot_description': None,
|
||||
'ot_documentation_url': None,
|
||||
'ot_emails': [],
|
||||
'ot_feedback_submission_url': None,
|
||||
'ot_has_third_party_support': False,
|
||||
'ot_is_critical_trial': False,
|
||||
'ot_is_deprecation_trial': False,
|
||||
|
@ -199,6 +201,7 @@ class StagesAPITest(testing_config.CustomTestCase):
|
|||
'ot_description': None,
|
||||
'ot_documentation_url': None,
|
||||
'ot_emails': [],
|
||||
'ot_feedback_submission_url': None,
|
||||
'ot_has_third_party_support': False,
|
||||
'ot_is_critical_trial': False,
|
||||
'ot_is_deprecation_trial': False,
|
||||
|
@ -248,6 +251,7 @@ class StagesAPITest(testing_config.CustomTestCase):
|
|||
'ot_description': 'An origin trial\'s description',
|
||||
'ot_documentation_url': 'https://example.com/ot_docs',
|
||||
'ot_emails': ['user1@example.com', 'user2@example.com'],
|
||||
'ot_feedback_submission_url': 'https://example.com/submit_feedback',
|
||||
'ot_has_third_party_support': True,
|
||||
'ot_is_critical_trial': True,
|
||||
'ot_is_deprecation_trial': True,
|
||||
|
|
|
@ -245,6 +245,7 @@ export const STAGE_SPECIFIC_FIELDS = new Set([
|
|||
'ot_chromium_trial_name',
|
||||
'ot_description',
|
||||
'ot_emails',
|
||||
'ot_feedback_submission_url',
|
||||
'ot_request_note',
|
||||
'ot_webfeature_use_counter',
|
||||
'ot_documentation_url',
|
||||
|
|
|
@ -1423,6 +1423,16 @@ export const ALL_FIELDS = {
|
|||
</p>`,
|
||||
},
|
||||
|
||||
'ot_feedback_submission_url': {
|
||||
type: 'input',
|
||||
attrs: URL_FIELD_ATTRS,
|
||||
required: false,
|
||||
label: 'Feature feedback link',
|
||||
help_text: html`
|
||||
Link for developers to file feedback on the feature
|
||||
(e.g. GitHub issues, or WICG page).`,
|
||||
},
|
||||
|
||||
'enterprise_policies': {
|
||||
type: 'input',
|
||||
attrs: MULTI_STRING_FIELD_ATTRS,
|
||||
|
|
|
@ -284,6 +284,7 @@ class Stage(ndb.Model):
|
|||
ot_description = ndb.TextProperty()
|
||||
ot_documentation_url = ndb.StringProperty()
|
||||
ot_emails = ndb.StringProperty(repeated=True)
|
||||
ot_feedback_submission_url = ndb.StringProperty()
|
||||
ot_has_third_party_support = ndb.BooleanProperty(default=False)
|
||||
ot_is_critical_trial = ndb.BooleanProperty(default=False)
|
||||
ot_is_deprecation_trial = ndb.BooleanProperty(default=False)
|
||||
|
|
|
@ -48,6 +48,7 @@ class StageDict(TypedDict):
|
|||
ot_description: str | None
|
||||
ot_documentation_url: str | None
|
||||
ot_emails: list[str]
|
||||
ot_feedback_submission_url: str | None
|
||||
ot_has_third_party_support: bool
|
||||
ot_is_critical_trial: bool
|
||||
ot_is_deprecation_trial: bool
|
||||
|
|
|
@ -258,6 +258,7 @@ class FeatureEditHandler(basehandlers.FlaskHandler):
|
|||
('ot_description', 'str'),
|
||||
('ot_documentation_url', 'link'),
|
||||
('ot_emails', 'emails'),
|
||||
('ot_feedback_submission_url', 'link'),
|
||||
('ot_has_third_party_support', 'bool'),
|
||||
('ot_is_critical_trial', 'bool'),
|
||||
('ot_is_deprecation_trial', 'bool'),
|
||||
|
|
Загрузка…
Ссылка в новой задаче