mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
help: Document new help menu.
Updates help center docs to reflect the new dedicated help menu. - Adds `keyboard_tip` to document the `?` keyboard shortcut. Fixes #27384.
This commit is contained in:
@@ -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 ""
|
||||
|
||||
|
||||
@@ -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}
|
||||
|
||||
|
||||
@@ -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}
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user