Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(aio): render subclasses + see-also block in the main flow #22445

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 0 additions & 31 deletions aio/src/styles/2-modules/_api-pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,6 @@
}
}

.sidebar {
box-shadow: 0 2px 2px rgba(10, 16, 20, 0.24), 0 0 2px rgba(10, 16, 20, 0.12);
border-radius: 2px;
background: #FAFAFA;
float: right;
margin: 20px;
padding: 0 24px 14px;

h2 {
margin: 18px 0 4px;
}

ul {
margin: 0;
padding-left: 14px;
}
}
.inline-sidebar {
display: none;
}

@media (max-width: 1200px) {
.sidebar {
display: none;
}
.inline-sidebar {
display: block;
}
}


.method-table {
h3 {
margin: 6px 0;
Expand Down
2 changes: 1 addition & 1 deletion aio/tests/e2e/api.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class ApiPage extends SitePage {
//
// and we want to be able to pull out the code elements from only the first level
// if `onlyDirect` is set to `true`.
const selector = `.inline-sidebar .descendants.${docType} ${onlyDirect ? '>' : ''} ul > li > code`;
const selector = `.descendants.${docType} ${onlyDirect ? '>' : ''} ul > li > code`;
return element.all(by.css(selector)).map<string>(item => item && item.getText());
}

Expand Down
File renamed without changes.
12 changes: 2 additions & 10 deletions aio/tools/transforms/templates/api/includes/class-overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

<section class="{$ doc.docType $}-overview">
<h2>Overview</h2>
{% if (doc.descendants | filterByPropertyValue('docType', 'class')).length or doc.see.length %}
<div class="sidebar">
{$ descendants.renderDescendants(doc, 'class', 'Subclasses') $}
{% include "includes/see-also.html" %}
</div>
{% endif %}
<code-example language="ts" hideCopy="true">
{$ doc.docType $} {$ doc.name $}{$ doc.typeParams | escape $}{$ memberHelper.renderHeritage(doc) $} {
{%- if doc.constructorDoc %}{% if not doc.constructorDoc.internal %}
Expand All @@ -17,8 +11,6 @@ <h2>Overview</h2>
{$ memberHelper.renderMembers(doc) $}
}
</code-example>
<div class="inline-sidebar">
{$ descendants.renderDescendants(doc, 'class', 'Subclasses') $}
{% include "includes/see-also.html" %}
</div>
{$ descendants.renderDescendants(doc, 'class', 'Subclasses') $}
{% include "includes/see-also.html" %}
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

<section class="interface-overview">
<h2>Interface Overview</h2>
<div class="sidebar">
{$ descendants.renderDescendants(doc, 'interface', 'Child Interfaces') $}
{$ descendants.renderDescendants(doc, 'class', 'Class Implementations') $}
{% include "includes/see-also.html" %}
</div>
<code-example language="ts" hideCopy="true">
interface {$ doc.name $}{$ doc.typeParams | escape $}{$ memberHelper.renderHeritage(doc) $} { {% if doc.members.length %}{% for member in doc.members %}{% if not member.internal %}
<a class="code-anchor" href="#{$ member.anchor | urlencode $}">{$ memberHelper.renderMemberSyntax(member, 1) $}</a>{% endif %}{% endfor %}{% endif %}
}
</code-example>
{$ descendants.renderDescendants(doc, 'interface', 'Child Interfaces') $}
{$ descendants.renderDescendants(doc, 'class', 'Class Implementations') $}
{% include "includes/see-also.html" %}
</section>
5 changes: 0 additions & 5 deletions aio/tools/transforms/templates/api/interface.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
{% block overview %}{% include "includes/interface-overview.html" %}{% endblock %}
{% block details %}
{% include "includes/description.html" %}
<div class="inline-sidebar">
{$ descendants.renderDescendants(doc, 'interface', 'Child Interfaces') $}
{$ descendants.renderDescendants(doc, 'class', 'Class Implementations') $}
{% include "includes/see-also.html" %}
</div>
{$ memberHelper.renderProperties(doc.properties, 'instance-properties', 'instance-property', 'Properties') $}
{$ memberHelper.renderMethodDetails(doc.methods, 'instance-methods', 'instance-method', 'Methods') $}
{% endblock %}