Only include titles in summaries (#1549)

I previously made this change for HTTP endpoints in #1446. It seems there are
other places where we have over-sized `<summary>` elements. I would like
to elimintate those too, as grumbled about in
https://github.com/matrix-org/matrix-spec/issues/1358#issuecomment-1325220859
and
https://github.com/matrix-org/matrix-spec/issues/1352#issuecomment-1439033334
pull/1551/head
David Robertson 2 years ago committed by GitHub
parent 48ee507489
commit 48459dee9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1 @@
Disclosure sections now only display their title when collapsed.

@ -25,6 +25,8 @@
{{ with .title }}{{ . | markdownify }}{{ else }}<code>{{ $event_name }}</code>{{ end }} {{ with .title }}{{ . | markdownify }}{{ else }}<code>{{ $event_name }}</code>{{ end }}
</h1> </h1>
</summary>
<hr/> <hr/>
{{ if (index $event_data "x-addedInMatrixVersion") }} {{ if (index $event_data "x-addedInMatrixVersion") }}
@ -36,8 +38,6 @@
{{ $event_data.description | markdownify }} {{ $event_data.description | markdownify }}
</summary>
{{ $state_key := index $event_data.properties "state_key" }} {{ $state_key := index $event_data.properties "state_key" }}
<table class="basic-info"> <table class="basic-info">

@ -39,6 +39,8 @@
<code>{{ $definition.title }}</code> <code>{{ $definition.title }}</code>
</h1> </h1>
</summary>
<hr/> <hr/>
{{ if (index $definition "x-addedInMatrixVersion") }} {{ if (index $definition "x-addedInMatrixVersion") }}
@ -47,7 +49,6 @@
{{ $definition.description | markdownify }} {{ $definition.description | markdownify }}
</summary>
{{ $additional_types := partial "json-schema/resolve-additional-types" (dict "schema" $definition "name" (printf "\"%s\"" $path)) }} {{ $additional_types := partial "json-schema/resolve-additional-types" (dict "schema" $definition "name" (printf "\"%s\"" $path)) }}
{{ $additional_types = uniq $additional_types }} {{ $additional_types = uniq $additional_types }}

@ -26,12 +26,12 @@
<h1> <h1>
<code>{{ humanize $event.title }}</code> <code>{{ humanize $event.title }}</code>
</h1> </h1>
</summary>
<hr/> <hr/>
{{ $event.description | markdownify }} {{ $event.description | markdownify }}
</summary>
{{ $event = merge $event (dict "title" "") }} {{ $event = merge $event (dict "title" "") }}

Loading…
Cancel
Save