Skip to content

Commit 378618f

Browse files
committed
Address feedback
1 parent 5b3f108 commit 378618f

File tree

4 files changed

+28
-21
lines changed

4 files changed

+28
-21
lines changed

tools/dgeni/processors/categorizer.js

Lines changed: 3 additions & 6 deletions
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

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
<div class="{$ class.docClasses $}">
2-
<h4 class="docs-api-h4 docs-api-class-name">
3-
<code>{$ class.name $}</code>
4-
</h4>
5-
<p class="docs-api-class-description">{$ class.description $}</p>
1+
<h4 class="docs-api-h4 docs-api-class-name">
2+
<code>{$ class.name $}</code>
3+
</h4>
4+
<p class="docs-api-class-description">{$ class.description $}</p>
65

7-
{%- if class.directiveExportAs -%}
8-
<span class="docs-api-h4 docs-api-class-export-label">Exported as:</span>
9-
<span class="docs-api-class-export-name">{$ class.directiveExportAs $}</span>
10-
{%- endif -%}
6+
{%- if class.directiveExportAs -%}
7+
<span class="docs-api-h4 docs-api-class-export-label">Exported as:</span>
8+
<span class="docs-api-class-export-name">{$ class.directiveExportAs $}</span>
9+
{%- endif -%}
1110

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

14-
{$ methodList(class.methods) $}
15-
</div>
15+
{$ propertyList(class.properties) $}
16+
17+
{$ methodList(class.methods) $}

tools/dgeni/templates/method.template.html

Lines changed: 7 additions & 2 deletions
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

Lines changed: 4 additions & 1 deletion
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)