Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

help: Add a dedicated page on how to format spoiler blocks.

David Rosa95d34540a317
diff --git a/help/format-your-message-using-markdown.md b/help/format-your-message-using-markdown.md
index 156929acec5..0f577769a9c 100644
--- a/help/format-your-message-using-markdown.md
+++ b/help/format-your-message-using-markdown.md
@@ -76,25 +76,9 @@ whenever you need a reminder of the formatting syntax below.
## Spoilers
-You can use spoilers to hide content that you do not want to be visible until
-the user interacts with it.
+{!spoilers-intro.md!}
-
-~~~
-Normal content in message
-
-```spoiler Spoiler header
-Spoiler content. These lines won't be visible until the user expands the spoiler.
-```
-~~~
-
-The spoiler will initially display in a collapsed form:
-
-![Spoiler collapsed](/static/images/help/spoiler-collapsed.png)
-
-Clicking the arrow will expand the spoiler content:
-
-![Spoiler expanded](/static/images/help/spoiler-expanded.png)
+{!spoilers-examples.md!}
## Emoji and emoticons
diff --git a/help/include/sidebar_index.md b/help/include/sidebar_index.md
index f1e0c3493a9..8d291ad7b80 100644
--- a/help/include/sidebar_index.md
+++ b/help/include/sidebar_index.md
@@ -68,6 +68,7 @@
* [Bulleted and numbered lists](/help/bulleted-and-numbered-lists)
* [Code blocks](/help/code-blocks)
* [LaTeX](/help/latex)
+* [Spoilers](/help/spoilers)
* [Create a poll](/help/create-a-poll)
* [Start a video call](/help/start-a-call)
diff --git a/help/include/spoilers-examples.md b/help/include/spoilers-examples.md
new file mode 100644
index 00000000000..1092df792d8
--- /dev/null
+++ b/help/include/spoilers-examples.md
@@ -0,0 +1,28 @@
+### What you type
+
+~~~
+
+```spoiler The spoiler heading might summarize what's inside
+This content is initially hidden.
+
+> You can combine spoilers with other formatting.
+
+```
+
+A message can contain both spoilers and other content.
+
+```spoiler
+Leave the heading blank if you like.
+```
+
+~~~
+
+### What it looks like
+
+Collapsed spoilers:
+
+![Spoiler collapsed](/static/images/help/spoiler-collapsed.png)
+
+Expanded spoilers:
+
+![Spoiler expanded](/static/images/help/spoiler-expanded.png)
diff --git a/help/include/spoilers-intro.md b/help/include/spoilers-intro.md
new file mode 100644
index 00000000000..348edfa0cc1
--- /dev/null
+++ b/help/include/spoilers-intro.md
@@ -0,0 +1,3 @@
+Zulip lets you temporarily hide content in a collapsible **spoiler** section,
+with only the header initially shown. Clicking on the header reveals the hidden
+content.
diff --git a/help/spoilers.md b/help/spoilers.md
new file mode 100644
index 00000000000..916de32cd4a
--- /dev/null
+++ b/help/spoilers.md
@@ -0,0 +1,13 @@
+# Spoilers
+
+{!spoilers-intro.md!}
+
+## Examples
+
+{!spoilers-examples.md!}
+
+## Related articles
+
+* [Message formatting](/help/format-your-message-using-markdown)
+* [Preview messages before sending](/help/preview-your-message-before-sending)
+* [Resize the compose box](/help/resize-the-compose-box)
diff --git a/static/images/help/spoiler-collapsed.png b/static/images/help/spoiler-collapsed.png
index 0de87b1b6da..a1ff5e5e394 100644
Binary files a/static/images/help/spoiler-collapsed.png and b/static/images/help/spoiler-collapsed.png differ
diff --git a/static/images/help/spoiler-expanded.png b/static/images/help/spoiler-expanded.png
index 91c446a4870..0e9f72b9db5 100644
Binary files a/static/images/help/spoiler-expanded.png and b/static/images/help/spoiler-expanded.png differ