Skip to content

Commit

Permalink
Add web_feature for feature creation backend
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleJu committed Dec 27, 2024
1 parent e495689 commit 15c6f4d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions api/api_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
('ergonomics_risks', 'str'),
('explainer_links', 'links'),
('feature_notes', 'str'),
('web_feature', 'str'),
('feature_type', 'int'),
('ff_views', 'int'),
('ff_views_link', 'link'),
Expand Down
1 change: 1 addition & 0 deletions api/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ def feature_entry_to_json_verbose(
'category': FEATURE_CATEGORIES[fe.category],
'category_int': fe.category,
'feature_notes': fe.feature_notes,
'web_feature': fe.web_feature,
'enterprise_feature_categories': fe.enterprise_feature_categories or [],
'enterprise_product_category': fe.enterprise_product_category or ENTERPRISE_PRODUCT_CATEGORY_CHROME_BROWSER_UPDATE,
'stages': stage_info['all_stages'],
Expand Down
3 changes: 2 additions & 1 deletion api/converters_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def setUp(self):
devrel_emails=['[email protected]'], prefixed=False,
intent_stage=1, tag_review_status=1, security_review_status=2,
privacy_review_status=1, feature_notes='notes',
updated=self.date, accurate_as_of=self.date, created=self.date)
updated=self.date, accurate_as_of=self.date, created=self.date, web_feature='css')
self.fe_1.put()

# Write stages for the feature.
Expand Down Expand Up @@ -371,6 +371,7 @@ def test_feature_entry_to_json_verbose__normal(self):
'experiment_timeline': None,
'explainer_links': [],
'feature_notes': 'notes',
'web_feature': 'css',
'ff_views': 5,
'flag_name': None,
'finch_name': None,
Expand Down
1 change: 1 addition & 0 deletions internals/core_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class FeatureEntry(ndb.Model): # Copy from Feature
star_count = ndb.IntegerProperty(default=0)
search_tags = ndb.StringProperty(repeated=True)
feature_notes = ndb.TextProperty() # copy from comments
web_feature = ndb.TextProperty()

# Metadata: Process information
feature_type = ndb.IntegerProperty(required=True, default=FEATURE_TYPE_INCUBATE_ID)
Expand Down
1 change: 1 addition & 0 deletions internals/data_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ class VerboseFeatureDict(TypedDict):
feature_notes: str | None
enterprise_feature_categories: list[str]
enterprise_product_category: int
web_feature: str | None

# Metadata: Process information
feature_type: str
Expand Down
3 changes: 2 additions & 1 deletion pages/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def process_post_data(self, **kwargs):
enterprise_impact=int(self.form.get('enterprise_impact', '1')),
first_enterprise_notification_milestone=enterprise_notification_milestone,
blink_components=blink_components,
tag_review_status=processes.initial_tag_review_status(feature_type))
tag_review_status=processes.initial_tag_review_status(feature_type),
web_feature=self.form.get('web_feature'))
if shipping_year:
feature_entry.shipping_year = shipping_year
key: ndb.Key = feature_entry.put()
Expand Down

0 comments on commit 15c6f4d

Please sign in to comment.