Skip to content

Commit 42dea44

Browse files
committed
Show and Hide nested deprecations with a class rather than rendering, so
they are subject to SSR
1 parent cb5d34a commit 42dea44

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

app/styles/app.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ table {
127127
width: 1px;
128128
}
129129

130+
.hide {
131+
display: none !important;
132+
}
133+
130134
@media (max-width: 1007px) {
131135
body.no-scroll {
132136
overflow: hidden;

app/templates/components/deprecation-article.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
<span class="bold">included in: </span>
1212
<LinkTo @route="id" @model={{@model.parent.id}}>
1313
{{or @model.parent.displayId @model.parent.id}}
14-
</LinkTo>
14+
</LinkTo>
1515
</div>
1616
{{/if}}
1717
{{#if @model.children.length}}
1818
<div>
19-
<span class="bold">includes: </span> {{@model.children.length}} deprecations
19+
<span class="bold">includes: </span> {{@model.children.length}} deprecations
2020
<button type="button" {{on "click" this.toggleChildDeprecations}}>
2121
{{(if this.showChildDeprecations 'Collapse all' 'Expand all')}}
2222
</button>
@@ -25,7 +25,7 @@
2525
</div>
2626
<section>
2727
{{markdown-to-html @model.content}}
28-
{{#if this.showChildDeprecations}}
28+
<div class="{{unless this.showChildDeprecations 'hide'}}">
2929
{{#each @model.children as |child|}}
3030
<DeprecationArticle @model={{child}}>
3131
<hr>
@@ -38,6 +38,6 @@
3838
</h3>
3939
</DeprecationArticle>
4040
{{/each}}
41-
{{/if}}
41+
</div>
4242
</section>
4343
</div>

0 commit comments

Comments
 (0)