From 6eecee7d3cdc6927427f140e9e866b68a6a57a00 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 19 May 2020 07:36:41 -0600 Subject: [PATCH 1/3] Proposal to clarify spoilers Original MSC: https://github.com/matrix-org/matrix-doc/pull/2010 *Per the proposal process, MSC2010 has been modified to match this MSC.* --- proposals/0000-spoiler-clarifications.md | 20 ++++++++++++++++++++ proposals/2010-spoilers.md | 9 ++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 proposals/0000-spoiler-clarifications.md diff --git a/proposals/0000-spoiler-clarifications.md b/proposals/0000-spoiler-clarifications.md new file mode 100644 index 00000000..5be0cdde --- /dev/null +++ b/proposals/0000-spoiler-clarifications.md @@ -0,0 +1,20 @@ +# MSC0000: Clarifications on spoilers + +Spoiler messages are described in [MSC2010](https://github.com/matrix-org/matrix-doc/pull/2010) +though the MSC is unclear if the fallback is required to be sent by clients. + +## Proposal + +The fallback for spoiler messages is optional, though recommended to be sent by clients. Clients +should make reasonable efforts to represent the spoiler in the `body` field of a message. + +The recommended fallback format is unchanged. + +Additionally, this proposal opens up spoilers to any HTML-supporting message types. Currently +this includes `m.text` (already included by MSC2010), `m.notice`, and `m.emote`. + +## Potential issues + +Clients could inadvertadly spoil parts of a message by not representing the spoiler correctly +in the `body` of the message. The author believes this would quickly show up as a bug report +on the client due to the nature of spoilers. diff --git a/proposals/2010-spoilers.md b/proposals/2010-spoilers.md index 1d9f4dc9..f327fbb5 100644 --- a/proposals/2010-spoilers.md +++ b/proposals/2010-spoilers.md @@ -3,10 +3,10 @@ Sometimes, while you want to put text into a spoiler to not have people accident For example, when discussing a new movie or a TV series, not everyone might have watched it yet. In such cases it would make sense to add a spoiler so that only those who have seen the movie or -don't mind spoilers read the content. +don't mind spoilers read the content. Another example would be e.g. in mental health communities where certain people have certain triggers. People could put talking about abuse or the like into a spoiler, to not accidentally -trigger anyone just reading along the conversation. +trigger anyone just reading along the conversation. Furthermore this is helpful for bridging to other networks that already have a spoiler feature. To render the spoiler the content is hidden and then revealed once interacted somehow @@ -14,7 +14,7 @@ To render the spoiler the content is hidden and then revealed once interacted so ## Proposal This proposal is about adding a new attribute to the `formatted_body` of messages with type -`m.room.message` and msgtype `m.text`. +`m.room.message` and message types which support the `org.matrix.custom.html` format. It adds a new attribute, `data-mx-spoiler`, to the `` tag. If the attribute is present the contents of the span tag should be rendered as a spoiler. Optionally, you can specify a reason for @@ -22,6 +22,9 @@ the spoiler by setting the attribute string. It could be rendered, for example, ![Spoiler rendering idea](images/2010-spoiler-example.gif) +The plaintext fallback supported by the `body` is optional. A recommendation for clients is included +below. + To preserve the semantics of a spoiler in the plaintext fallback it is recommended to upload the contents of the spoiler as a text file and then link this: `[Spoiler](mxc://someserver/somefile)` and `[Spoiler for reason](mxc://someserver/somefile)` respectively. From 249421fa62010d7bf9bb8a82333da41d2579aa8e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 19 May 2020 07:38:41 -0600 Subject: [PATCH 2/3] Assign MSC number --- ...spoiler-clarifications.md => 2557-spoiler-clarifications.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename proposals/{0000-spoiler-clarifications.md => 2557-spoiler-clarifications.md} (95%) diff --git a/proposals/0000-spoiler-clarifications.md b/proposals/2557-spoiler-clarifications.md similarity index 95% rename from proposals/0000-spoiler-clarifications.md rename to proposals/2557-spoiler-clarifications.md index 5be0cdde..a04278de 100644 --- a/proposals/0000-spoiler-clarifications.md +++ b/proposals/2557-spoiler-clarifications.md @@ -1,4 +1,4 @@ -# MSC0000: Clarifications on spoilers +# MSC2557: Clarifications on spoilers Spoiler messages are described in [MSC2010](https://github.com/matrix-org/matrix-doc/pull/2010) though the MSC is unclear if the fallback is required to be sent by clients. From df41947369e2d72fa91d0ffe1bbb9b8d8b97416d Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 19 May 2020 08:47:24 -0600 Subject: [PATCH 3/3] Spell words correctly Co-authored-by: Hubert Chathi --- proposals/2557-spoiler-clarifications.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/2557-spoiler-clarifications.md b/proposals/2557-spoiler-clarifications.md index a04278de..0391ee97 100644 --- a/proposals/2557-spoiler-clarifications.md +++ b/proposals/2557-spoiler-clarifications.md @@ -15,6 +15,6 @@ this includes `m.text` (already included by MSC2010), `m.notice`, and `m.emote`. ## Potential issues -Clients could inadvertadly spoil parts of a message by not representing the spoiler correctly +Clients could inadvertently spoil parts of a message by not representing the spoiler correctly in the `body` of the message. The author believes this would quickly show up as a bug report on the client due to the nature of spoilers.