Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
help: Document new help menu.
David Rosa0c4ef58acdec
diff --git a/help/format-your-message-using-markdown.md b/help/format-your-message-using-markdown.mdindex ccdba978929..5304d87d963 100644--- a/help/format-your-message-using-markdown.md+++ b/help/format-your-message-using-markdown.md@@ -154,7 +154,9 @@ A summary of the formatting syntax above is available in the Zulip app.{start_tabs}-{relative|gear|message-formatting}+{tab|desktop-web}++{relative|help|message-formatting}!!! tip ""diff --git a/help/keyboard-shortcuts.md b/help/keyboard-shortcuts.mdindex eeb7d800424..a11608df3b2 100644--- a/help/keyboard-shortcuts.md+++ b/help/keyboard-shortcuts.md@@ -242,7 +242,13 @@ A summary of the keyboard shortcuts above is available in the Zulip app.{start_tabs}-{relative|gear|keyboard-shortcuts}+{tab|desktop-web}++{relative|help|keyboard-shortcuts}++!!! keyboard_tip ""++ You can also use <kbd>?</kbd> to open the keyboard shortcuts reference.{end_tabs}diff --git a/help/search-for-messages.md b/help/search-for-messages.mdindex 782ca8759c7..992652431a5 100644--- a/help/search-for-messages.md+++ b/help/search-for-messages.md@@ -154,7 +154,9 @@ A summary of the search filters above is available in the Zulip app.{start_tabs}-{relative|gear|search-filters}+{tab|desktop-web}++{relative|help|search-filters}{end_tabs}diff --git a/zerver/lib/markdown/help_relative_links.py b/zerver/lib/markdown/help_relative_links.pyindex b61cedbfbbe..22f03786da1 100644--- a/zerver/lib/markdown/help_relative_links.py+++ b/zerver/lib/markdown/help_relative_links.py@@ -29,15 +29,6 @@ gear_info = {"stats": ['<i class="fa fa-bar-chart"></i> Usage statistics', "/stats"],"plans": ['<i class="fa fa-rocket"></i> Plans and pricing', "/plans/"],"billing": ['<i class="fa fa-credit-card"></i> Billing', "/billing/"],- "keyboard-shortcuts": [- '<i class="fa fa-keyboard-o"></i> Keyboard shortcuts (?)',- "/#keyboard-shortcuts",- ],- "message-formatting": [- '<i class="fa fa-pencil"></i> Message formatting',- "/#message-formatting",- ],- "search-filters": ['<i class="fa fa-search"></i> Search filters', "/#search-operators"],"about-zulip": ["About Zulip", "/#about-zulip"],}@@ -57,6 +48,41 @@ def gear_handle_match(key: str) -> str:return gear_instructions.format(item=item)+help_info = {+ # The pattern is key: [name, link]+ # key is from REGEXP: `{relative|help|key}`+ # name is what the item is called in the help menu: `Select **name**.`+ # link is used for relative links: `Select [name](link).`+ "keyboard-shortcuts": [+ '<i class="zulip-icon zulip-icon-keyboard"></i> Keyboard shortcuts',+ "/#keyboard-shortcuts",+ ],+ "message-formatting": [+ '<i class="zulip-icon zulip-icon-edit"></i> Message formatting',+ "/#message-formatting",+ ],+ "search-filters": [+ '<i class="zulip-icon zulip-icon-manage-search"></i> Search filters',+ "/#search-operators",+ ],+}++help_instructions = """+1. Click on the **Help menu** (<i class="zulip-icon zulip-icon-help"></i>) icon+ in the upper right corner of the app.++1. Select {item}.+"""+++def help_handle_match(key: str) -> str:+ if relative_help_links:+ item = f"[{help_info[key][0]}]({help_info[key][1]})"+ else:+ item = f"**{help_info[key][0]}**"+ return help_instructions.format(item=item)++stream_info = {"all": ["All streams", "/#streams/all"],"subscribed": ["Subscribed streams", "/#streams/subscribed"],@@ -136,6 +162,7 @@ LINK_TYPE_HANDLERS = {"gear": gear_handle_match,"stream": stream_handle_match,"message": message_handle_match,+ "help": help_handle_match,}