Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

[NEW] Ability to show Spoiler inline texts

Open Dnouv opened this issue 3 years ago • 5 comments

Proposed changes (including videos or screenshots)

Adds a markdown template to make the text hidden behind a spoiler layer. Often users prefer to hide some of the words in their message supposedly to hide unnecessary details or to give surprises (personal use case).

Here is a demo video with the steps,

https://user-images.githubusercontent.com/61188295/168266160-038ea140-63bf-4e2d-affc-4bd4603355a7.mp4

Issue(s)

Related #2248

Steps to test or reproduce

  1. Write some words as we normally do in the textbox.
  2. To make a work spoiler wrap it around |.
  3. E.g, |Light| travels faster than sound. In this sentence, the Light word will be hidden as a spoiler.
  4. Now send the message, and to view the Spoiler text, click on the hidden (greyish-black stroke) word. It will make the word visible.
  5. To again hide the word, to surprise your friend sitting beside you, click once more on the spoiler text, and it will once again be hidden.

Further comments

Dnouv avatar May 13 '22 10:05 Dnouv

I'm afraid the way we are handling markdown is going to be removed until 5.0 please check https://github.com/RocketChat/Rocket.Chat.Fuselage/tree/develop/packages/message-parser

ggazzo avatar May 13 '22 14:05 ggazzo

Thanks a lot for the heads-up @ggazzo, would you please let me know what would be the ideal plans

  1. we move forward with the current code implementation and make the feature available (as in minor release 4.7.1), and in the meanwhile, until the 5.0 is released we make the changes to the message-parser package, to make this spoiler feature in there.

  2. We will keep this PR on hold, and in the meanwhile, I will make the changes to the message-parser component, and we will release the spoiler feature in 5.0 only.

Thank you!

Dnouv avatar May 13 '22 14:05 Dnouv

Could we please use double vertical beams as spoiler tags?

||spoiler text|| instead of |spoiler text|.

This would align with what Discord is using, and would benefit communities bridging between Rocket.Chat and Discord like the one I'm running at https://chat.unfa.xyz

unfa avatar May 26 '22 12:05 unfa

Sorry, but GitHub is only for issues/bugs related to the repository project.

How funny a misuse of a git repository is turned into a policy!

Or how to alienate contributors helping you making a better product.

leagris avatar Apr 21 '23 10:04 leagris

Missing this feature for a long time! Any plans to implement something like this in the coming releases?

iamashwin99 avatar Jun 03 '25 13:06 iamashwin99