Skip to content

Commit

Permalink
build(docs-infra): render @see information in members (#28069)
Browse files Browse the repository at this point in the history
Previously `@see` tags were only rendered for top level class-like
docs. Now these tags are rendered for methods and properties too.

PR Close #28069
  • Loading branch information
petebacondarwin authored and AndrewKushnir committed Jan 11, 2019
1 parent 0465dc6 commit b102835
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
17 changes: 15 additions & 2 deletions aio/src/styles/0-base/_typography.scss
Expand Up @@ -78,6 +78,14 @@ p, ol, ul, ol, li, input, a {
}
}

p {
margin: 14px 0 0;
}

p + ul {
margin-top: 4px;
}

ol {
li, p {
margin: 4px 0;
Expand Down Expand Up @@ -123,8 +131,13 @@ td {
padding: 8px 30px;
letter-spacing: 0.30px;

p:first-child, p:last-child {
margin: 0;
> p, ul {
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
}

Expand Down
18 changes: 16 additions & 2 deletions aio/tools/transforms/templates/api/lib/memberHelpers.html
Expand Up @@ -95,6 +95,13 @@ <h3>
{% if method.shortDescription %}<tr>
<td class="short-description">
{$ method.shortDescription | marked $}
{%- if method.see.length %}
<p>See also:</p>
<ul>
{% for see in method.see %}
<li>{$ see | marked $}</li>{% endfor %}
</ul>
{% endif %}
</td>
</tr>{% endif %}
{% if method.overloads.length == 0 %}
Expand Down Expand Up @@ -203,10 +210,17 @@ <h2>{$ headingText $}</h2>
<td>
{%- if (property.isGetAccessor or property.isReadonly) and not property.isSetAccessor %}<span class='read-only-property'>Read-only.</span>{% endif %}
{%- if property.isSetAccessor and not property.isGetAccessor %}<span class='write-only-property'>Write-only.</span>{% endif %}
{% if property.constructorParamDoc %} <span class='from-constructor'>Declared in constructor.</span>{% endif %}
{% if property.shortDescription %}{$ property.shortDescription | marked $}{% endif %}
{$ (property.description or property.constructorParamDoc.description) | marked $}
{% if property.constructorParamDoc %} <span class='from-constructor'>Declared in constructor.</span>{% endif %}
</td>
{%- if property.see.length %}
<p>See also:</p>
<ul>
{% for see in property.see %}
<li>{$ see | marked $}</li>{% endfor %}
</ul>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
Expand Down

0 comments on commit b102835

Please sign in to comment.