Commit 057915a0 authored by rdevlin.cronin's avatar rdevlin.cronin Committed by Commit bot

[Extension DocServer] Remove availability warning for enums

The availability warning for enums isn't really that helpful, since if an enum
is added somewhere, the availability warning will be on wherever it is used.

BUG=474980

Review URL: https://codereview.chromium.org/1070873002

Cr-Commit-Position: refs/heads/master@{#324287}
parent a04d4f9f
application: chrome-apps-doc
version: 3-48-2
version: 3-49-0
runtime: python27
api_version: 1
threadsafe: false
......
......@@ -2,4 +2,4 @@ cron:
- description: Repopulates all cached data.
url: /_cron
schedule: every 180 minutes
target: 3-48-2
target: 3-49-0
......@@ -233,7 +233,8 @@ class _JSCViewBuilder(object):
'functions': self._GenerateFunctions(type_.functions),
'events': self._GenerateEvents(type_.events),
'id': _CreateId(type_, 'type'),
'availability': self._GetAvailabilityTemplate()
'availability': self._GetAvailabilityTemplate(
is_enum=type_.property_type == model.PropertyType.ENUM)
}
self._RenderTypeInformation(type_, type_dict)
return type_dict
......@@ -444,10 +445,16 @@ class _JSCViewBuilder(object):
'version': version
}
def _GetAvailabilityTemplate(self):
def _GetAvailabilityTemplate(self, is_enum=False):
'''Gets availability for the current node and returns an appropriate
template object.
'''
# We don't show an availability warning for enums.
# TODO(devlin): We should also render enums differently, indicating that
# symbolic constants are available from version 44 onwards.
if is_enum:
return None
# Displaying deprecated status takes precedence over when the API
# became stable.
availability_info = self._current_node.GetDeprecated()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment