From 48459dee9b949be023cffe65c280ef172cc54868 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 30 May 2023 13:22:30 +0100 Subject: [PATCH] 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 `` 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 --- changelogs/internal/newsfragments/1549.clarification | 1 + layouts/partials/events/render-event.html | 4 ++-- layouts/shortcodes/definition.html | 3 ++- layouts/shortcodes/event-fields.html | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 changelogs/internal/newsfragments/1549.clarification diff --git a/changelogs/internal/newsfragments/1549.clarification b/changelogs/internal/newsfragments/1549.clarification new file mode 100644 index 00000000..67dbd67e --- /dev/null +++ b/changelogs/internal/newsfragments/1549.clarification @@ -0,0 +1 @@ +Disclosure sections now only display their title when collapsed. diff --git a/layouts/partials/events/render-event.html b/layouts/partials/events/render-event.html index 369a80db..0f4d543d 100644 --- a/layouts/partials/events/render-event.html +++ b/layouts/partials/events/render-event.html @@ -25,6 +25,8 @@ {{ with .title }}{{ . | markdownify }}{{ else }}{{ $event_name }}{{ end }} + +
{{ if (index $event_data "x-addedInMatrixVersion") }} @@ -36,8 +38,6 @@ {{ $event_data.description | markdownify }} - - {{ $state_key := index $event_data.properties "state_key" }} diff --git a/layouts/shortcodes/definition.html b/layouts/shortcodes/definition.html index 2d03179e..67cd63c0 100644 --- a/layouts/shortcodes/definition.html +++ b/layouts/shortcodes/definition.html @@ -39,6 +39,8 @@ {{ $definition.title }} + +
{{ if (index $definition "x-addedInMatrixVersion") }} @@ -47,7 +49,6 @@ {{ $definition.description | markdownify }} - {{ $additional_types := partial "json-schema/resolve-additional-types" (dict "schema" $definition "name" (printf "\"%s\"" $path)) }} {{ $additional_types = uniq $additional_types }} diff --git a/layouts/shortcodes/event-fields.html b/layouts/shortcodes/event-fields.html index 7120f87f..91e2faf2 100644 --- a/layouts/shortcodes/event-fields.html +++ b/layouts/shortcodes/event-fields.html @@ -26,12 +26,12 @@

{{ humanize $event.title }}

+
{{ $event.description | markdownify }} - {{ $event = merge $event (dict "title" "") }}