Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 5f5acc4

Browse files
chore(docs): deprecation notices for methods and properties
Closes #15351
1 parent 5886d06 commit 5f5acc4

File tree

7 files changed

+46
-51
lines changed

7 files changed

+46
-51
lines changed

docs/config/templates/app/runnableExample.template.html

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
{# Be aware that we need these extra new lines here or marked will not realise that the <div>
1+
{# Be aware that we need these extra new lines here or marked will not realize that the <div>
22
is HTML and wrap each line in a <p> - thus breaking the HTML #}
33

4+
<div>
5+
<plnkr-opener example-path="{$ doc.path $}"></plnkr-opener>
46

5-
<div class="runnable-example"
6-
path="{$ doc.example.deployments.default.path $}"
7-
{%- for attrName, attrValue in doc.example.attributes %}
8-
{$ attrName $}="{$ attrValue $}"{% endfor %}>
7+
<div class="runnable-example"
8+
path="{$ doc.example.deployments.default.path $}"
9+
{%- for attrName, attrValue in doc.example.attributes %}
10+
{$ attrName $}="{$ attrValue $}"{% endfor %}>
911

10-
{% for fileName, file in doc.example.files %}
11-
<div class="runnable-example-file" {% for attrName, attrValue in file.attributes %}
12-
{$ attrName $}="{$ attrValue $}"{% endfor %}>
13-
{% code -%}
14-
{$ file.fileContents $}
15-
{%- endcode %}
16-
</div>
17-
{% endfor %}
12+
{% for fileName, file in doc.example.files %}
13+
<div class="runnable-example-file" {% for attrName, attrValue in file.attributes %}
14+
{$ attrName $}="{$ attrValue $}"{% endfor %}>
15+
{% code -%}
16+
{$ file.fileContents $}
17+
{%- endcode %}
18+
</div>
19+
{% endfor %}
1820

19-
<iframe class="runnable-example-frame" src="{$ doc.example.deployments.default.outputPath $}" name="{$ doc.example.id $}"></iframe>
21+
<iframe class="runnable-example-frame" src="{$ doc.example.deployments.default.outputPath $}" name="{$ doc.example.id $}"></iframe>
22+
</div>
2023
</div>
2124

22-
23-
{# Be aware that we need these extra new lines here or marked will not realise that the <div>
24-
above is HTML and wrap each line in a <p> - thus breaking the HTML #}
25+
{# Be aware that we need these extra new lines here or marked will not realize that the <div>
26+
above is HTML and wrap each line in a <p> - thus breaking the HTML #}

docs/config/templates/ngdoc/api/api.template.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
{% extends "base.template.html" %}
2+
{% import "lib/deprecated.html" as x -%}
3+
24

35
{% block content %}
46

7+
<a href='https://github.com/{$ git.info.owner $}/{$ git.info.repo $}/tree/{$ git.version.isSnapshot and 'master' or git.version.raw $}/{$ doc.fileInfo.projectRelativePath $}#L{$ doc.startingLine $}' class='view-source pull-right btn btn-primary'>
8+
<i class="glyphicon glyphicon-zoom-in">&nbsp;</i>View Source
9+
</a>
10+
511
{% block header %}
612
<header class="api-profile-header">
713
<h1 class="api-profile-header-heading">{$ doc.name $}</h1>
814
<ol class="api-profile-header-structure naked-list step-list">
915
{% block related_components %}{% endblock %}
1016
<li>
11-
- {$ doc.docType $} in module {$ doc.moduleDoc.id | link(doc.moduleDoc.name, doc.moduleDoc) $}
17+
- {$ doc.docType $} in module <a href="{$ doc.moduleDoc.path $}">{$ doc.moduleDoc.name $}</a>
1218
</li>
1319
</ol>
1420
</header>
@@ -24,17 +30,12 @@ <h1 class="api-profile-header-heading">{$ doc.name $}</h1>
2430
<h2 id="known-issues">Known Issues</h2>
2531
{% for issue in doc.knownIssues -%}
2632
<div class="known-issue">
27-
{$ issue | marked $}
33+
{$ issue | marked $} {% if not loop.last %}<hr>{% endif %}
2834
</div>
2935
{% endfor -%}
3036
{% endif %}
3137

32-
{% if doc.deprecated %}
33-
<fieldset class="deprecated">
34-
<legend>Deprecated API</legend>
35-
{$ doc.deprecated| marked $}
36-
</fieldset>
37-
{% endif %}
38+
{$ x.deprecatedBlock(doc) $}
3839

3940
<div>
4041
{% block dependencies %}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{% macro deprecatedBlock(doc) %}{% if doc.deprecated %}
2+
<div class="alert alert-warning">
3+
<div class="deprecated-title">Deprecated:</div>
4+
{$ doc.deprecated| marked $}
5+
</div>
6+
{% endif %}{% endmacro %}

docs/config/templates/ngdoc/lib/events.template.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
{% import "lib/macros.html" as lib -%}
2+
{% import "lib/deprecated.html" as x -%}
3+
24
{%- if doc.events %}
35
<h2>Events</h2>
46
<ul class="events">
57
{%- for event in doc.events %}
68
<li id="{$ event.name $}">
79
<h3>{$ event.name $}</h3>
810
<div>{$ event.description | marked $}</div>
11+
12+
{$ x.deprecatedBlock(event) $}
13+
914
{%- if event.eventType == 'listen' %}
1015
<div class="inline">
1116
<h4>Listen on: {$ event.eventTarget $}</h4>

docs/config/templates/ngdoc/lib/methods.template.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{% import "lib/macros.html" as lib -%}
2+
{% import "lib/deprecated.html" as x -%}
3+
24
{%- if doc.methods %}
35
<h2>Methods</h2>
46
<ul class="methods">
@@ -7,6 +9,8 @@ <h2>Methods</h2>
79
<h3>{$ lib.functionSyntax(method) $}</h3>
810
<div>{$ method.description | marked $}</div>
911

12+
{$ x.deprecatedBlock(method) $}
13+
1014
{% if method.params %}
1115
<h4>Parameters</h4>
1216
{$ lib.paramTable(method.params) $}

docs/config/templates/ngdoc/lib/properties.template.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
{% import "lib/macros.html" as lib -%}
2+
{% import "lib/deprecated.html" as x -%}
3+
24
{%- if doc.properties %}
35
<h2>Properties</h2>
46
<ul class="properties">
57
{%- for property in doc.properties %}
68
<li id="{$ property.name $}">
79
<h3>{$ property.name | code $}</h3>
810
{$ lib.typeInfo(property) $}
11+
{$ x.deprecatedBlock(property) $}
912
</li>
1013
{% endfor -%}
1114
</ul>

0 commit comments

Comments
 (0)