From 1e47d7ec48142ae7192f9199bd9f359ef09d2b63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Commaille?=
<76261501+zecakeh@users.noreply.github.com>
Date: Mon, 14 Oct 2024 18:57:33 +0200
Subject: [PATCH] Remove `boxes/added-in-paragraph` shortcode (#1970)
---
assets/scss/_styles_project.scss | 23 -------------------
.../internal/newsfragments/1970.clarification | 1 +
.../client-server-api/modules/content_repo.md | 6 -----
content/server-server-api.md | 2 --
.../shortcodes/boxes/added-in-paragraph.html | 22 ------------------
5 files changed, 1 insertion(+), 53 deletions(-)
create mode 100644 changelogs/internal/newsfragments/1970.clarification
delete mode 100644 layouts/shortcodes/boxes/added-in-paragraph.html
diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss
index 639536974..2c31820b6 100644
--- a/assets/scss/_styles_project.scss
+++ b/assets/scss/_styles_project.scss
@@ -277,29 +277,6 @@ footer {
border-left-width: 5px;
background: $warning-background;
}
-
- // XXX: See the added-in-paragraph.html shortcode for more information on these styles.
- &.added-in-paragraph {
- // Remove the padding and margin to remove the box look
- margin: 0 !important; // !important on both to override table-related rules
- padding: 0 !important;
-
- // Make pairs of "added-in" and content inline to each other. We do pairs so authors can
- // describe two paragraphs with added-in prefixes within a single box, reducing DOM
- // complexity. Each paragraph is expected to be prefixed with an added-in, however.
- //
- // XXX: We assume the added-in and text will be rendered as paragraph elements.
- > p {
- display: inline;
- }
- > p:nth-child(2n) { // "even" rule to target just the content paragraphs
- // Force a paragraph break after the content (insert a couple
tags)
- &::after {
- content: '\A\A';
- white-space: pre;
- }
- }
- }
}
/* Styles for sections that are rendered from data, such as HTTP APIs and event schemas */
diff --git a/changelogs/internal/newsfragments/1970.clarification b/changelogs/internal/newsfragments/1970.clarification
new file mode 100644
index 000000000..5d20fcf97
--- /dev/null
+++ b/changelogs/internal/newsfragments/1970.clarification
@@ -0,0 +1 @@
+Remove `boxes/added-in-paragraph` shortcode.
diff --git a/content/client-server-api/modules/content_repo.md b/content/client-server-api/modules/content_repo.md
index 17715504e..1be6b071e 100644
--- a/content/client-server-api/modules/content_repo.md
+++ b/content/client-server-api/modules/content_repo.md
@@ -16,21 +16,17 @@ When serving content, the server SHOULD provide a
`Content-Security-Policy` header. The recommended policy is
`sandbox; default-src 'none'; script-src 'none'; plugin-types application/pdf; style-src 'unsafe-inline'; object-src 'self';`.
-{{% boxes/added-in-paragraph %}}
{{< added-in v="1.4" >}} The server SHOULD additionally provide
`Cross-Origin-Resource-Policy: cross-origin` when serving content to allow
(web) clients to access restricted APIs such as `SharedArrayBuffer` when
interacting with the media repository.
-{{% /boxes/added-in-paragraph %}}
-{{% boxes/added-in-paragraph %}}
{{< changed-in v="1.11" >}} The unauthenticated download endpoints have been
deprecated in favour of newer, authenticated, ones. This change includes updating
the paths of all media endpoints from `/_matrix/media/*` to `/_matrix/client/{version}/media/*`,
with the exception of the `/upload` and `/create` endpoints. The upload/create
endpoints are expected to undergo a similar transition in a later version of the
specification.
-{{% /boxes/added-in-paragraph %}}
#### Matrix Content (`mxc://`) URIs
@@ -48,11 +44,9 @@ mxc:///
Clients can access the content repository using the following endpoints.
-{{% boxes/added-in-paragraph %}}
{{< changed-in v="1.11" >}} A number of endpoints under the /_matrix/media hierarchy
have been deprecated and replaced with new endpoints which require authentication.
The deprecated endpoints are marked in the section below.
-{{% /boxes/added-in-paragraph %}}
{{% boxes/warning %}}
By Matrix 1.12, servers SHOULD "freeze" the deprecated, unauthenticated, endpoints
diff --git a/content/server-server-api.md b/content/server-server-api.md
index 5c9bd31e0..4e829bede 100644
--- a/content/server-server-api.md
+++ b/content/server-server-api.md
@@ -1204,7 +1204,6 @@ Servers MUST use the server described in the [Matrix Content URI](/client-server
Formatted as `mxc://{ServerName}/{MediaID}`, servers MUST download the media from
`ServerName` using the below endpoints.
-{{% boxes/added-in-paragraph %}}
{{< changed-in v="1.11" >}} Servers were previously advised to use the `/_matrix/media/*`
endpoints described by the [Content Repository module in the Client-Server API](/client-server-api/#content-repository),
however, those endpoints have been deprecated. New endpoints are introduced which
@@ -1213,7 +1212,6 @@ the required access token to those endpoints. Instead, servers MUST try the endp
described below before falling back to the deprecated `/_matrix/media/*` endpoints
when they receive a `404 M_UNRECOGNIZED` error. When falling back, servers MUST
be sure to set `allow_remote` to `false`.
-{{% /boxes/added-in-paragraph %}}
{{% http-api spec="server-server" api="content_repository" %}}
diff --git a/layouts/shortcodes/boxes/added-in-paragraph.html b/layouts/shortcodes/boxes/added-in-paragraph.html
deleted file mode 100644
index 20ca3932b..000000000
--- a/layouts/shortcodes/boxes/added-in-paragraph.html
+++ /dev/null
@@ -1,22 +0,0 @@
-{{/*
-
- "Temporary" shortcode for rendering paragraphs which want/need inline added-in tags. It is
- assumed that your content is described as follows:
-
- {{% boxes/added-in-paragraph %}}
- {{< added-in v="1.4" >}} Your text here
-
- {{< added-in v="1.4" >}} Your other text here
- {{% /boxes/added-in-paragraph %}}
-
- The assumption is that at a later date this added-in-paragraph shortcode can be removed, making
- the angle bracket-defined added-in shortcodes *just work*.
-
- It is important that each new "content" paragraph (the bit after added-in) is preceded with
- and added-in, otherwise you might find your text being weirdly merged.
-
- This exists while the added-in shortcode cannot be inline in the client-server spec.
- See https://github.com/matrix-org/matrix-spec/issues/1204
-
-*/}}
-{{ partial "alert" (dict "type" "added-in-paragraph" "content" .Inner) }}