From 378618fb50d6d343c1945324b2b3526c14e56d05 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 12 Apr 2017 17:54:53 -0700 Subject: [PATCH] Address feedback --- tools/dgeni/processors/categorizer.js | 9 +++---- tools/dgeni/templates/class.template.html | 26 +++++++++++--------- tools/dgeni/templates/method.template.html | 9 +++++-- tools/dgeni/templates/property.template.html | 5 +++- 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/tools/dgeni/processors/categorizer.js b/tools/dgeni/processors/categorizer.js index 5aaec49b69b0..b515e5a026c5 100644 --- a/tools/dgeni/processors/categorizer.js +++ b/tools/dgeni/processors/categorizer.js @@ -68,14 +68,11 @@ module.exports = function categorizer() { } /** - * Decorates public exposed docs. Creates a property with CSS classes that will be - * added to the template. + * Decorates public exposed docs. Creates a property on the doc that indicates whether + * the item is deprecated or not. **/ function decoratePublicDoc(doc) { - // Specific classes that will can added to the Dgeni doc template. - doc.docClasses = [ - isDeprecatedDoc(doc) ? 'docs-api-deprecated' : '' - ].join(' '); + doc.isDeprecated = isDeprecatedDoc(doc); } }; diff --git a/tools/dgeni/templates/class.template.html b/tools/dgeni/templates/class.template.html index bf9ad46e0a88..f23c5d4e4d86 100644 --- a/tools/dgeni/templates/class.template.html +++ b/tools/dgeni/templates/class.template.html @@ -1,15 +1,17 @@ -
-

- {$ class.name $} -

-

{$ class.description $}

+

+ {$ class.name $} +

+

{$ class.description $}

- {%- if class.directiveExportAs -%} - Exported as: - {$ class.directiveExportAs $} - {%- endif -%} +{%- if class.directiveExportAs -%} +Exported as: +{$ class.directiveExportAs $} +{%- endif -%} - {$ propertyList(class.properties) $} +{%- if class.isDeprecated -%} +
Deprecated
+{%- endif -%} - {$ methodList(class.methods) $} -
\ No newline at end of file +{$ propertyList(class.properties) $} + +{$ methodList(class.methods) $} diff --git a/tools/dgeni/templates/method.template.html b/tools/dgeni/templates/method.template.html index c563d07c731e..eeb7373d0852 100644 --- a/tools/dgeni/templates/method.template.html +++ b/tools/dgeni/templates/method.template.html @@ -1,7 +1,12 @@ - +
- + diff --git a/tools/dgeni/templates/property.template.html b/tools/dgeni/templates/property.template.html index 7dcc00f39f32..2d17ace86d83 100644 --- a/tools/dgeni/templates/property.template.html +++ b/tools/dgeni/templates/property.template.html @@ -1,4 +1,4 @@ - +
{$ method.name $} + {%- if method.isDeprecated -%} +
Deprecated
+ {%- endif -%} + {$ method.name $} +
{%- if property.isDirectiveInput -%}
@@ -18,6 +18,9 @@ {%- endif -%}
{%- endif -%} + {%- if property.isDeprecated -%} +
Deprecated
+ {%- endif -%}

{$ property.name $}