Skip to content

Commit a32608b

Browse files
committed
Address feedback
1 parent 5b3f108 commit a32608b

File tree

4 files changed

+19
-10
lines changed

4 files changed

+19
-10
lines changed

tools/dgeni/processors/categorizer.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,11 @@ module.exports = function categorizer() {
6868
}
6969

7070
/**
71-
* Decorates public exposed docs. Creates a property with CSS classes that will be
72-
* added to the template.
71+
* Decorates public exposed docs. Creates a property on the doc that indicates whether
72+
* the item is deprecated or not.
7373
**/
7474
function decoratePublicDoc(doc) {
75-
// Specific classes that will can added to the Dgeni doc template.
76-
doc.docClasses = [
77-
isDeprecatedDoc(doc) ? 'docs-api-deprecated' : ''
78-
].join(' ');
75+
doc.isDeprecated = isDeprecatedDoc(doc);
7976
}
8077
};
8178

tools/dgeni/templates/class.template.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="{$ class.docClasses $}">
1+
<div>
22
<h4 class="docs-api-h4 docs-api-class-name">
33
<code>{$ class.name $}</code>
44
</h4>
@@ -9,6 +9,10 @@ <h4 class="docs-api-h4 docs-api-class-name">
99
<span class="docs-api-class-export-name">{$ class.directiveExportAs $}</span>
1010
{%- endif -%}
1111

12+
{%- if class.isDeprecated -%}
13+
<div class="docs-api-class-deprecated-marker">Deprecated</div>
14+
{%- endif -%}
15+
1216
{$ propertyList(class.properties) $}
1317

1418
{$ methodList(class.methods) $}

tools/dgeni/templates/method.template.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
<table class="docs-api-method-table {$ method.docClasses $}">
1+
<table class="docs-api-method-table">
22
<thead>
33
<tr class="docs-api-method-name-row">
4-
<th colspan="2" class="docs-api-method-name-cell">{$ method.name $}</th>
4+
<th colspan="2" class="docs-api-method-name-cell">
5+
{%- if method.isDeprecated -%}
6+
<div class="docs-api-deprecated-marker">Deprecated</div>
7+
{%- endif -%}
8+
{$ method.name $}
9+
</th>
510
</tr>
611
</thead>
712
<tr class="docs-api-method-description-row">

tools/dgeni/templates/property.template.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<tr class="docs-api-properties-row {$ property.docClasses $}">
1+
<tr class="docs-api-properties-row">
22
<td class="docs-api-properties-name-cell">
33
{%- if property.isDirectiveInput -%}
44
<div class="docs-api-input-marker">
@@ -18,6 +18,9 @@
1818
{%- endif -%}
1919
</div>
2020
{%- endif -%}
21+
{%- if property.isDeprecated -%}
22+
<div class="docs-api-deprecated-marker">Deprecated</div>
23+
{%- endif -%}
2124

2225
<p class="docs-api-property-name">
2326
{$ property.name $}

0 commit comments

Comments
 (0)