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
This commit is contained in:
parent
48ee507489
commit
48459dee9b
4 changed files with 6 additions and 4 deletions
1
changelogs/internal/newsfragments/1549.clarification
Normal file
1
changelogs/internal/newsfragments/1549.clarification
Normal file
|
@ -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 }}
|
||||
</h1>
|
||||
|
||||
</summary>
|
||||
|
||||
<hr/>
|
||||
|
||||
{{ if (index $event_data "x-addedInMatrixVersion") }}
|
||||
|
@ -36,8 +38,6 @@
|
|||
|
||||
{{ $event_data.description | markdownify }}
|
||||
|
||||
</summary>
|
||||
|
||||
{{ $state_key := index $event_data.properties "state_key" }}
|
||||
|
||||
<table class="basic-info">
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
<code>{{ $definition.title }}</code>
|
||||
</h1>
|
||||
|
||||
</summary>
|
||||
|
||||
<hr/>
|
||||
|
||||
{{ if (index $definition "x-addedInMatrixVersion") }}
|
||||
|
@ -47,7 +49,6 @@
|
|||
|
||||
{{ $definition.description | markdownify }}
|
||||
|
||||
</summary>
|
||||
|
||||
{{ $additional_types := partial "json-schema/resolve-additional-types" (dict "schema" $definition "name" (printf "\"%s\"" $path)) }}
|
||||
{{ $additional_types = uniq $additional_types }}
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
<h1>
|
||||
<code>{{ humanize $event.title }}</code>
|
||||
</h1>
|
||||
</summary>
|
||||
|
||||
<hr/>
|
||||
|
||||
{{ $event.description | markdownify }}
|
||||
|
||||
</summary>
|
||||
|
||||
{{ $event = merge $event (dict "title" "") }}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue