From 0c80d238574ab16d28afcb1719696c5548d3d4a9 Mon Sep 17 00:00:00 2001 From: sahil839 Date: Mon, 28 Jun 2021 22:53:45 +0530 Subject: [PATCH] help: Update help pages according to profile page redesign. This commit fixes the documentation of settings as we have replaced "Your account" section into two new sections - "Profile" and "Account & privacy". This commit also fixes a comment in the test for settings documentation in test_middleware.py. --- templates/zerver/api/api-keys.md | 2 +- templates/zerver/help/change-your-email-address.md | 2 +- templates/zerver/help/change-your-name.md | 8 +++----- templates/zerver/help/change-your-password.md | 2 +- templates/zerver/help/change-your-profile-picture.md | 4 ++-- templates/zerver/help/deactivate-your-account.md | 2 +- templates/zerver/help/edit-your-profile.md | 6 +----- zerver/lib/markdown/help_relative_links.py | 2 +- zerver/lib/markdown/help_settings_links.py | 3 ++- zerver/tests/test_middleware.py | 2 +- 10 files changed, 14 insertions(+), 19 deletions(-) diff --git a/templates/zerver/api/api-keys.md b/templates/zerver/api/api-keys.md index 41ff23cfad..2f986931ab 100644 --- a/templates/zerver/api/api-keys.md +++ b/templates/zerver/api/api-keys.md @@ -15,7 +15,7 @@ bot's API key can impersonate the bot, so be careful with it! Anyone with your API key can impersonate you, so be doubly careful with it. -{settings_tab|your-account} +{settings_tab|account-and-privacy} 1. Under **API key**, click **Show/change your API key**. diff --git a/templates/zerver/help/change-your-email-address.md b/templates/zerver/help/change-your-email-address.md index e6abf5113e..2408aaba4d 100644 --- a/templates/zerver/help/change-your-email-address.md +++ b/templates/zerver/help/change-your-email-address.md @@ -10,7 +10,7 @@ Organization administrators can {start_tabs} -{settings_tab|your-account} +{settings_tab|account-and-privacy} 2. Under **User settings**, click on the button with your email address. diff --git a/templates/zerver/help/change-your-name.md b/templates/zerver/help/change-your-name.md index 4ac01c722d..f1ae4f3864 100644 --- a/templates/zerver/help/change-your-name.md +++ b/templates/zerver/help/change-your-name.md @@ -11,16 +11,14 @@ is useful when users' names are managed via LDAP or another data source. {start_tabs} -{settings_tab|your-account} +{settings_tab|profile} -1. Under **User settings**, click on the button with your name in it. - -1. Change your name, and click **Change**. +1. Edit the **full name** field. {end_tabs} !!! warn "" - **Note:** If you are unable to click on the button with your name, check + **Note:** If you are unable to edit the full name field, check that your organization allows name changes. Follow the steps at [prevent users from changing their names](/help/restrict-name-and-email-changes) to view your organization's settings. diff --git a/templates/zerver/help/change-your-password.md b/templates/zerver/help/change-your-password.md index d515de551d..eace7af7c6 100644 --- a/templates/zerver/help/change-your-password.md +++ b/templates/zerver/help/change-your-password.md @@ -24,7 +24,7 @@ account. {start_tabs} -{settings_tab|your-account} +{settings_tab|account-and-privacy} 2. Under **User settings**, click on the password field (it should look like `********`). diff --git a/templates/zerver/help/change-your-profile-picture.md b/templates/zerver/help/change-your-profile-picture.md index e4ad6753b5..75db47a495 100644 --- a/templates/zerver/help/change-your-profile-picture.md +++ b/templates/zerver/help/change-your-profile-picture.md @@ -11,7 +11,7 @@ You can also upload a custom profile picture to Zulip. {start_tabs} -{settings_tab|your-account} +{settings_tab|profile} 2. Under **Profile picture**, click **Upload new profile picture** and choose an image to upload. @@ -21,7 +21,7 @@ You can also upload a custom profile picture to Zulip. {start_tabs} -{settings_tab|your-account} +{settings_tab|profile} 2. Under **Profile picture**, click on the **(X)** icon in the top right corner of the profile picture. diff --git a/templates/zerver/help/deactivate-your-account.md b/templates/zerver/help/deactivate-your-account.md index 96aae3875e..4bf2a5ef3e 100644 --- a/templates/zerver/help/deactivate-your-account.md +++ b/templates/zerver/help/deactivate-your-account.md @@ -2,7 +2,7 @@ {start_tabs} -{settings_tab|your-account} +{settings_tab|account-and-privacy} 1. Under **User Settings**, click **Deactivate account**. diff --git a/templates/zerver/help/edit-your-profile.md b/templates/zerver/help/edit-your-profile.md index fcf17257e1..482891589d 100644 --- a/templates/zerver/help/edit-your-profile.md +++ b/templates/zerver/help/edit-your-profile.md @@ -12,16 +12,12 @@ fill them out. {start_tabs} -{settings_tab|your-account} +{settings_tab|profile} 1. Edit the fields under **Profile**. {end_tabs} -!!! warn "" - Note: The **Profile** section will only appear if an organization - administrator has added custom profile fields. - ## Related articles * [Change your name](/help/change-your-name) diff --git a/zerver/lib/markdown/help_relative_links.py b/zerver/lib/markdown/help_relative_links.py index bcc16f2233..23488a2c2f 100644 --- a/zerver/lib/markdown/help_relative_links.py +++ b/zerver/lib/markdown/help_relative_links.py @@ -17,7 +17,7 @@ gear_info = { # name is what the item is called in the gear menu: `Select **name**.` # link is used for relative links: `Select [name](link).` "manage-streams": ["Manage streams", "/#streams/subscribed"], - "settings": ["Settings", "/#settings/your-account"], + "settings": ["Settings", "/#settings/profile"], "manage-organization": ["Manage organization", "/#organization/organization-profile"], "integrations": ["Integrations", "/integrations"], "stats": ["Usage statistics", "/stats"], diff --git a/zerver/lib/markdown/help_settings_links.py b/zerver/lib/markdown/help_settings_links.py index f2803cb9e8..41ddf1f9cc 100644 --- a/zerver/lib/markdown/help_settings_links.py +++ b/zerver/lib/markdown/help_settings_links.py @@ -16,7 +16,8 @@ link_mapping = { # breadcrumb to that setting to the name of its setting type, the setting # name as it appears in the user interface, and a relative link that can # be used to get to that setting - "your-account": ["Settings", "Your account", "/#settings/your-account"], + "profile": ["Settings", "Profile", "/#settings/profile"], + "account-and-privacy": ["Settings", "Account & privacy", "/#settings/account-and-privacy"], "display-settings": ["Settings", "Display settings", "/#settings/display-settings"], "notifications": ["Settings", "Notifications", "/#settings/notifications"], "your-bots": ["Settings", "Your bots", "/#settings/your-bots"], diff --git a/zerver/tests/test_middleware.py b/zerver/tests/test_middleware.py index 3ab2b073bf..531a954006 100644 --- a/zerver/tests/test_middleware.py +++ b/zerver/tests/test_middleware.py @@ -98,7 +98,7 @@ class OpenGraphTest(ZulipTestCase): ) def test_settings_tab(self) -> None: - # deactivate-your-account starts with {settings_tab|your-account} + # deactivate-your-account starts with {settings_tab|account-and-privacy} self.check_title_and_description( "/help/deactivate-your-account", "Deactivate your account (Zulip Help Center)",