mirror of https://github.com/zulip/zulip.git
help: Tweak stream/group settings instructions for logged in users.
Adds gear menu instructions for how to navigate to "All streams" and "All groups".
This commit is contained in:
parent
9bb90b7358
commit
91ddcd4e1d
|
@ -23,7 +23,7 @@ stream. Changing a stream's color does not change it for anyone else.
|
|||
|
||||
{start_tabs}
|
||||
|
||||
{relative|stream|subscribed}
|
||||
{relative|gear|stream-settings}
|
||||
|
||||
1. Select a stream.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{start_tabs}
|
||||
|
||||
{relative|group|all}
|
||||
{relative|gear|group-settings}
|
||||
|
||||
1. Click **Create user group** on the right, or click the **plus**
|
||||
(<i class="fa fa-plus"></i>) icon in the upper right.
|
||||
|
|
|
@ -24,7 +24,7 @@ API](/api/send-message).
|
|||
|
||||
{start_tabs}
|
||||
|
||||
{relative|stream|subscribed}
|
||||
{relative|gear|stream-settings}
|
||||
|
||||
1. Select a stream.
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
{tab|desktop-web}
|
||||
|
||||
{relative|stream|subscribed}
|
||||
{relative|gear|stream-settings}
|
||||
|
||||
1. Select a stream.
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ which is especially handy if you are subscribed to a large number of streams.
|
|||
|
||||
{tab|desktop-web}
|
||||
|
||||
{relative|stream|subscribed}
|
||||
{relative|gear|stream-settings}
|
||||
|
||||
1. Select a stream.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ You can always unsubscribe from any stream in Zulip.
|
|||
|
||||
{tab|desktop-web}
|
||||
|
||||
{relative|stream|subscribed}
|
||||
{relative|gear|stream-settings}
|
||||
|
||||
1. Click the **checkmark**
|
||||
(<img src="/static/images/help/desktop-web-check-icon.svg" alt="checkmark" class="help-center-icon"/>)
|
||||
|
|
|
@ -99,44 +99,46 @@ def help_handle_match(key: str) -> str:
|
|||
|
||||
stream_info = {
|
||||
"all": ["All streams", "/#streams/all"],
|
||||
"subscribed": ["Subscribed streams", "/#streams/subscribed"],
|
||||
}
|
||||
|
||||
stream_instructions_no_link = """
|
||||
stream_all_instructions = """
|
||||
1. Click on the **gear** (<i class="zulip-icon zulip-icon-gear"></i>) icon in
|
||||
the upper right corner of the web or desktop app.
|
||||
|
||||
1. Click <i class="zulip-icon zulip-icon-hash"></i> **Stream settings**.
|
||||
1. Select <i class="zulip-icon zulip-icon-hash"></i> **Stream settings**.
|
||||
|
||||
1. Click {item} in the upper left.
|
||||
"""
|
||||
|
||||
|
||||
def stream_handle_match(key: str) -> str:
|
||||
if relative_help_links:
|
||||
return f"1. Go to [{stream_info[key][0]}]({stream_info[key][1]})."
|
||||
if key == "all":
|
||||
return stream_instructions_no_link + "\n\n1. Click **All streams** in the upper left."
|
||||
return stream_instructions_no_link
|
||||
item = f"[{stream_info[key][0]}]({stream_info[key][1]})"
|
||||
else:
|
||||
item = f"**{stream_info[key][0]}**"
|
||||
return stream_all_instructions.format(item=item)
|
||||
|
||||
|
||||
group_info = {
|
||||
"all": ["All groups", "/#groups/all"],
|
||||
"subscribed": ["Your groups", "/#groups/your"],
|
||||
}
|
||||
|
||||
group_instructions_no_link = """
|
||||
group_all_instructions = """
|
||||
1. Click on the **gear** (<i class="zulip-icon zulip-icon-gear"></i>) icon in
|
||||
the upper right corner of the web or desktop app.
|
||||
|
||||
1. Click <i class="zulip-icon zulip-icon-user-cog"></i> **Group settings**.
|
||||
1. Select <i class="zulip-icon zulip-icon-user-cog"></i> **Group settings**.
|
||||
|
||||
1. Click {item} in the upper left.
|
||||
"""
|
||||
|
||||
|
||||
def group_handle_match(key: str) -> str:
|
||||
if relative_help_links:
|
||||
return f"1. Go to [{group_info[key][0]}]({group_info[key][1]})."
|
||||
if key == "all":
|
||||
return group_instructions_no_link + "\n\n1. Click **All groups** in the upper left."
|
||||
return group_instructions_no_link
|
||||
item = f"[{group_info[key][0]}]({group_info[key][1]})"
|
||||
else:
|
||||
item = f"**{group_info[key][0]}**"
|
||||
return group_all_instructions.format(item=item)
|
||||
|
||||
|
||||
draft_instructions = """
|
||||
|
|
|
@ -424,13 +424,19 @@ class HelpTest(ZulipTestCase):
|
|||
|
||||
def test_help_relative_links_for_stream(self) -> None:
|
||||
result = self.client_get("/help/message-a-stream-by-email")
|
||||
self.assertIn('<a href="/#streams/subscribed">Subscribed streams</a>', str(result.content))
|
||||
self.assertIn(
|
||||
'<a href="/#streams/subscribed"><i class="zulip-icon zulip-icon-hash"></i> Stream settings</a>',
|
||||
str(result.content),
|
||||
)
|
||||
self.assertEqual(result.status_code, 200)
|
||||
|
||||
with self.settings(ROOT_DOMAIN_LANDING_PAGE=True):
|
||||
result = self.client_get("/help/message-a-stream-by-email", subdomain="")
|
||||
self.assertEqual(result.status_code, 200)
|
||||
self.assertIn("<strong>Stream settings</strong>", str(result.content))
|
||||
self.assertIn(
|
||||
'<strong><i class="zulip-icon zulip-icon-hash"></i> Stream settings</strong>',
|
||||
str(result.content),
|
||||
)
|
||||
self.assertNotIn("/#streams", str(result.content))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue