From cd517753906ffd3ad7f894aa076643c98fb0effb Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Fri, 11 Jan 2019 11:16:27 +0000 Subject: [PATCH] build(docs-infra): render `@see` information in members (#28069) 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 --- aio/src/styles/0-base/_typography.scss | 17 +++++++++++++++-- .../templates/api/lib/memberHelpers.html | 18 ++++++++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/aio/src/styles/0-base/_typography.scss b/aio/src/styles/0-base/_typography.scss index 336dd029f0..a3b6610127 100755 --- a/aio/src/styles/0-base/_typography.scss +++ b/aio/src/styles/0-base/_typography.scss @@ -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; @@ -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; + } } } diff --git a/aio/tools/transforms/templates/api/lib/memberHelpers.html b/aio/tools/transforms/templates/api/lib/memberHelpers.html index ff7bf68b40..18196caf49 100644 --- a/aio/tools/transforms/templates/api/lib/memberHelpers.html +++ b/aio/tools/transforms/templates/api/lib/memberHelpers.html @@ -95,6 +95,13 @@ {% if method.shortDescription %} {$ method.shortDescription | marked $} + {%- if method.see.length %} +

See also:

+ + {% endif %} {% endif %} {% if method.overloads.length == 0 %} @@ -203,10 +210,17 @@ {%- if (property.isGetAccessor or property.isReadonly) and not property.isSetAccessor %}Read-only.{% endif %} {%- if property.isSetAccessor and not property.isGetAccessor %}Write-only.{% endif %} + {% if property.constructorParamDoc %} Declared in constructor.{% endif %} {% if property.shortDescription %}{$ property.shortDescription | marked $}{% endif %} {$ (property.description or property.constructorParamDoc.description) | marked $} - {% if property.constructorParamDoc %} Declared in constructor.{% endif %} - + {%- if property.see.length %} +

See also:

+ + {% endif %} + {% endfor %}