Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
devversion committed Apr 13, 2017
1 parent 5b3f108 commit 378618f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 21 deletions.
9 changes: 3 additions & 6 deletions tools/dgeni/processors/categorizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};

Expand Down
26 changes: 14 additions & 12 deletions tools/dgeni/templates/class.template.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<div class="{$ class.docClasses $}">
<h4 class="docs-api-h4 docs-api-class-name">
<code>{$ class.name $}</code>
</h4>
<p class="docs-api-class-description">{$ class.description $}</p>
<h4 class="docs-api-h4 docs-api-class-name">
<code>{$ class.name $}</code>
</h4>
<p class="docs-api-class-description">{$ class.description $}</p>

{%- if class.directiveExportAs -%}
<span class="docs-api-h4 docs-api-class-export-label">Exported as:</span>
<span class="docs-api-class-export-name">{$ class.directiveExportAs $}</span>
{%- endif -%}
{%- if class.directiveExportAs -%}
<span class="docs-api-h4 docs-api-class-export-label">Exported as:</span>
<span class="docs-api-class-export-name">{$ class.directiveExportAs $}</span>
{%- endif -%}

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

{$ methodList(class.methods) $}
</div>
{$ propertyList(class.properties) $}

{$ methodList(class.methods) $}
9 changes: 7 additions & 2 deletions tools/dgeni/templates/method.template.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<table class="docs-api-method-table {$ method.docClasses $}">
<table class="docs-api-method-table">
<thead>
<tr class="docs-api-method-name-row">
<th colspan="2" class="docs-api-method-name-cell">{$ method.name $}</th>
<th colspan="2" class="docs-api-method-name-cell">
{%- if method.isDeprecated -%}
<div class="docs-api-deprecated-marker">Deprecated</div>
{%- endif -%}
{$ method.name $}
</th>
</tr>
</thead>
<tr class="docs-api-method-description-row">
Expand Down
5 changes: 4 additions & 1 deletion tools/dgeni/templates/property.template.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tr class="docs-api-properties-row {$ property.docClasses $}">
<tr class="docs-api-properties-row">
<td class="docs-api-properties-name-cell">
{%- if property.isDirectiveInput -%}
<div class="docs-api-input-marker">
Expand All @@ -18,6 +18,9 @@
{%- endif -%}
</div>
{%- endif -%}
{%- if property.isDeprecated -%}
<div class="docs-api-deprecated-marker">Deprecated</div>
{%- endif -%}

<p class="docs-api-property-name">
{$ property.name $}
Expand Down

0 comments on commit 378618f

Please sign in to comment.