settings: Change "Display settings" to "Preferences".

This includes changing the URL to #settings/preferences, with a
transparent redirect so that existing links, like the one from Welcome
Bot, continue to work.
This commit is contained in:
nimish 2023-06-29 18:58:38 +05:30 committed by Tim Abbott
parent a18b1662cb
commit c238327899
33 changed files with 55 additions and 53 deletions

View File

@ -55,7 +55,7 @@ There are over 100 feature articles and longer guides in the
the current documentation as a resource and guide as you begin. the current documentation as a resource and guide as you begin.
- Use the list on [Zulip help center home](https://zulip.com/help/) - Use the list on [Zulip help center home](https://zulip.com/help/)
to find the section of the docs (e.g. Display settings, Sending to find the section of the docs (e.g. Preferences, Sending
messages, Reading messages, etc.) that relates to the new feature messages, Reading messages, etc.) that relates to the new feature
you're documenting. you're documenting.

View File

@ -483,7 +483,7 @@ Do these tasks as Cordelia.
- Change full name (Hamlet should see the name change) - Change full name (Hamlet should see the name change)
- Customize profile picture - Customize profile picture
- Deactivate account (and then log in as Iago to re-activate Cordelia) - Deactivate account (and then log in as Iago to re-activate Cordelia)
- Display settings - Preferences
- Right now, these unfortunately require reloads to take effect. - Right now, these unfortunately require reloads to take effect.
- Default language (change to Spanish) - Default language (change to Spanish)
- 24-hour time (and then test going back to AM/PM) - 24-hour time (and then test going back to AM/PM)

View File

@ -7,7 +7,7 @@ format (e.g. 5:00 PM) or a 24-hour format (e.g. 17:00).
{start_tabs} {start_tabs}
{settings_tab|display-settings} {settings_tab|preferences}
1. Under **General**, select your preferred option from the 1. Under **General**, select your preferred option from the
**Time format** dropdown. **Time format** dropdown.

View File

@ -11,7 +11,7 @@ messages you receive.
{tab|desktop-web} {tab|desktop-web}
{settings_tab|display-settings} {settings_tab|preferences}
1. Under **General**, click the button under **Language**. 1. Under **General**, click the button under **Language**.

View File

@ -15,7 +15,7 @@ preference settings, including the following:
* Privacy settings, including: * Privacy settings, including:
* [Displaying availability to other users](/help/status-and-availability) * [Displaying availability to other users](/help/status-and-availability)
* [Allowing others to see when the user has read messages](/help/read-receipts) * [Allowing others to see when the user has read messages](/help/read-receipts)
* Display settings, including: * Preferences, including:
* Default view ([Recent conversations](/help/recent-conversations) vs. * Default view ([Recent conversations](/help/recent-conversations) vs.
[All messages](/help/reading-strategies#all-messages)) [All messages](/help/reading-strategies#all-messages))
* [Light theme vs. dark theme](/help/dark-theme) * [Light theme vs. dark theme](/help/dark-theme)

View File

@ -29,7 +29,7 @@ organization settings:
{start_tabs} {start_tabs}
{settings_tab|display-settings} {settings_tab|preferences}
1. Under **Advanced**, click on the **Default view** dropdown 1. Under **Advanced**, click on the **Default view** dropdown
and select a view. and select a view.
@ -57,7 +57,7 @@ shortcut.
{start_tabs} {start_tabs}
{settings_tab|display-settings} {settings_tab|preferences}
1. Under **Advanced**, toggle **Escape key navigates to 1. Under **Advanced**, toggle **Escape key navigates to
default view**, as desired. default view**, as desired.

View File

@ -19,7 +19,7 @@ by Zulip.
{start_tabs} {start_tabs}
{settings_tab|display-settings} {settings_tab|preferences}
1. Under **Emoji**, toggle **Convert emoticons before sending**. 1. Under **Emoji**, toggle **Convert emoticons before sending**.

View File

@ -9,7 +9,7 @@ for working in a dark space.
{tab|desktop-web} {tab|desktop-web}
{settings_tab|display-settings} {settings_tab|preferences}
1. Under **General**, select the desired color scheme from the **Theme** dropdown. 1. Under **General**, select the desired color scheme from the **Theme** dropdown.

View File

@ -55,7 +55,7 @@ will be displayed as
{start_tabs} {start_tabs}
{settings_tab|display-settings} {settings_tab|preferences}
1. Under **Emoji settings**, select **Convert emoticons before sending**. 1. Under **Emoji settings**, select **Convert emoticons before sending**.
@ -80,7 +80,7 @@ you send. Zulip emoji are compatible with screen readers and other accessibility
{start_tabs} {start_tabs}
{settings_tab|display-settings} {settings_tab|preferences}
1. Under **Emoji**, select **Google**, 1. Under **Emoji**, select **Google**,
**Twitter**, **Plain text**, or **Google blobs** for the emoji theme. **Twitter**, **Plain text**, or **Google blobs** for the emoji theme.

View File

@ -97,7 +97,7 @@ so](#toggle-whether-names-of-reacting-users-are-displayed) is enabled.
{start_tabs} {start_tabs}
{settings_tab|display-settings} {settings_tab|preferences}
1. Under **Emoji**, toggle **Display names of reacting users when few users have 1. Under **Emoji**, toggle **Display names of reacting users when few users have
reacted to a message**. reacted to a message**.

View File

@ -11,7 +11,7 @@ You can instead configure Zulip to use the full width of wide screens.
{start_tabs} {start_tabs}
{settings_tab|display-settings} {settings_tab|preferences}
1. Under **Advanced**, select **Use full width on wide screens**. 1. Under **Advanced**, select **Use full width on wide screens**.

View File

@ -5,9 +5,9 @@ buttons, links and unread counts) are intentionally light. **High contrast mode*
increases the contrast of these elements to meet the AA level of the increases the contrast of these elements to meet the AA level of the
W3C's Web Content Accessibility Guidelines. W3C's Web Content Accessibility Guidelines.
{settings_tab|display-settings} {settings_tab|preferences}
2. Under **Display settings**, select **High contrast mode**. 2. Under **Preferences**, select **High contrast mode**.
## Related articles ## Related articles

View File

@ -14,7 +14,7 @@ The import will include your:
- [Name and avatar](/#settings/profile) - [Name and avatar](/#settings/profile)
- [Privacy settings](/#settings/account-and-privacy) - [Privacy settings](/#settings/account-and-privacy)
- [Display settings](/#settings/display-settings) - [Preferences](/#settings/preferences)
- [Notification settings](/#settings/notifications) - [Notification settings](/#settings/notifications)
- Tutorial completion status. - Tutorial completion status.

View File

@ -10,7 +10,7 @@
[edit your profile information](/help/edit-your-profile) to tell others [edit your profile information](/help/edit-your-profile) to tell others
about yourself. about yourself.
- [Review your display settings](/help/review-your-settings#review-your-display-settings). - [Review your Preferences](/help/review-your-settings#review-your-preferences).
You can [switch between light and dark theme](/help/dark-theme), You can [switch between light and dark theme](/help/dark-theme),
[pick your favorite emoji theme](/help/emoji-and-emoticons#change-your-emoji-set), [pick your favorite emoji theme](/help/emoji-and-emoticons#change-your-emoji-set),
[change your language](/help/change-your-language), and make other tweaks to your Zulip experience. [change your language](/help/change-your-language), and make other tweaks to your Zulip experience.

View File

@ -45,7 +45,7 @@
* [Review your settings](/help/review-your-settings) * [Review your settings](/help/review-your-settings)
* [Deactivate your account](/help/deactivate-your-account) * [Deactivate your account](/help/deactivate-your-account)
## Display settings ## Preferences
* [Dark theme](/help/dark-theme) * [Dark theme](/help/dark-theme)
* [Change your language](/help/change-your-language) * [Change your language](/help/change-your-language)
* [Change your time zone](/help/change-your-timezone) * [Change your time zone](/help/change-your-timezone)

View File

@ -13,7 +13,7 @@ is your first time using Zulip.
{start_tabs} {start_tabs}
{settings_tab|display-settings} {settings_tab|preferences}
2. Under **Advanced**, configure **Demote inactive streams**. 2. Under **Advanced**, configure **Demote inactive streams**.

View File

@ -19,7 +19,7 @@ are at your computer. You will still be able to
{tab|desktop-web} {tab|desktop-web}
{settings_tab|display-settings} {settings_tab|preferences}
1. Under **Advanced**, click on the **Automatically mark messages as 1. Under **Advanced**, click on the **Automatically mark messages as
read** dropdown, and select **Always**, **Never** or **Only in read** dropdown, and select **Always**, **Never** or **Only in

View File

@ -14,13 +14,13 @@ you use Zulip.
{end_tabs} {end_tabs}
## Review your display settings ## Review your preferences
{start_tabs} {start_tabs}
{relative|gear|settings} {relative|gear|settings}
1. Click on the **Display settings** tab on the left. 1. Click on the **Preferences** tab on the left.
{end_tabs} {end_tabs}

View File

@ -37,7 +37,7 @@ can disable that feature.
{start_tabs} {start_tabs}
{settings_tab|display-settings} {settings_tab|preferences}
1. Under **Advanced**, toggle **Show counts for starred messages**. 1. Under **Advanced**, toggle **Show counts for starred messages**.

View File

@ -85,7 +85,7 @@ With the compact option, only status emoji are shown.
{tab|desktop-web} {tab|desktop-web}
{settings_tab|display-settings} {settings_tab|preferences}
1. Under **Advanced**, select **Compact** or **Show status and text** for the 1. Under **Advanced**, select **Compact** or **Show status and text** for the
user list style. user list style.

View File

@ -347,28 +347,28 @@ async function test_alert_words_section(page: Page): Promise<void> {
} }
async function change_language(page: Page, language_data_code: string): Promise<void> { async function change_language(page: Page, language_data_code: string): Promise<void> {
await page.waitForSelector("#user-display-settings .language_selection_button", { await page.waitForSelector("#user-preferences .language_selection_button", {
visible: true, visible: true,
}); });
await page.click("#user-display-settings .language_selection_button"); await page.click("#user-preferences .language_selection_button");
await common.wait_for_micromodal_to_open(page); await common.wait_for_micromodal_to_open(page);
const language_selector = `a[data-code="${CSS.escape(language_data_code)}"]`; const language_selector = `a[data-code="${CSS.escape(language_data_code)}"]`;
await page.click(language_selector); await page.click(language_selector);
} }
async function check_language_setting_status(page: Page): Promise<void> { async function check_language_setting_status(page: Page): Promise<void> {
await page.waitForSelector("#user-display-settings .general-settings-status .reload_link", { await page.waitForSelector("#user-preferences .general-settings-status .reload_link", {
visible: true, visible: true,
}); });
} }
async function assert_language_changed_to_chinese(page: Page): Promise<void> { async function assert_language_changed_to_chinese(page: Page): Promise<void> {
await page.waitForSelector("#user-display-settings .language_selection_button", { await page.waitForSelector("#user-preferences .language_selection_button", {
visible: true, visible: true,
}); });
const default_language = await common.get_text_from_selector( const default_language = await common.get_text_from_selector(
page, page,
"#user-display-settings .language_selection_button", "#user-preferences .language_selection_button",
); );
assert.strictEqual( assert.strictEqual(
default_language, default_language,
@ -386,7 +386,7 @@ async function test_i18n_language_precedence(page: Page): Promise<void> {
} }
async function test_default_language_setting(page: Page): Promise<void> { async function test_default_language_setting(page: Page): Promise<void> {
const display_settings_section = '[data-section="display-settings"]'; const display_settings_section = '[data-section="preferences"]';
await page.click(display_settings_section); await page.click(display_settings_section);
const chinese_language_data_code = "zh-hans"; const chinese_language_data_code = "zh-hans";
@ -394,7 +394,7 @@ async function test_default_language_setting(page: Page): Promise<void> {
// Check that the saved indicator appears // Check that the saved indicator appears
await check_language_setting_status(page); await check_language_setting_status(page);
await page.click(".reload_link"); await page.click(".reload_link");
await page.waitForSelector("#user-display-settings .language_selection_button", { await page.waitForSelector("#user-preferences .language_selection_button", {
visible: true, visible: true,
}); });
await assert_language_changed_to_chinese(page); await assert_language_changed_to_chinese(page);
@ -410,10 +410,10 @@ async function test_default_language_setting(page: Page): Promise<void> {
await page.goto("http://zulip.zulipdev.com:9981/#settings"); // get back to normal language. await page.goto("http://zulip.zulipdev.com:9981/#settings"); // get back to normal language.
await page.waitForSelector(display_settings_section, {visible: true}); await page.waitForSelector(display_settings_section, {visible: true});
await page.click(display_settings_section); await page.click(display_settings_section);
await page.waitForSelector("#user-display-settings .general-settings-status", { await page.waitForSelector("#user-preferences .general-settings-status", {
visible: true, visible: true,
}); });
await page.waitForSelector("#user-display-settings .language_selection_button", { await page.waitForSelector("#user-preferences .language_selection_button", {
visible: true, visible: true,
}); });
} }

View File

@ -251,7 +251,7 @@ function do_hashchange_overlay(old_hash) {
} }
const base = hash_util.get_current_hash_category(); const base = hash_util.get_current_hash_category();
const old_base = hash_util.get_hash_category(old_hash); const old_base = hash_util.get_hash_category(old_hash);
const section = hash_util.get_current_hash_section(); let section = hash_util.get_current_hash_section();
if (base === "groups" && (!page_params.development_environment || page_params.is_guest)) { if (base === "groups" && (!page_params.development_environment || page_params.is_guest)) {
// The #groups settings page is unfinished, and disabled in production. // The #groups settings page is unfinished, and disabled in production.
@ -260,7 +260,11 @@ function do_hashchange_overlay(old_hash) {
} }
const coming_from_overlay = hash_util.is_overlay_hash(old_hash); const coming_from_overlay = hash_util.is_overlay_hash(old_hash);
if (section === "display-settings") {
// Since display-settings was deprecated and replaced with preferences
// #settings/display-settings is being redirected to #settings/preferences.
section = "preferences";
}
if ((base === "settings" || base === "organization") && !section) { if ((base === "settings" || base === "organization") && !section) {
let settings_panel_object = settings_panel_menu.normal_settings; let settings_panel_object = settings_panel_menu.normal_settings;
if (base === "organization") { if (base === "organization") {

View File

@ -92,9 +92,9 @@ function user_default_language_modal_post_render() {
const data = {default_language: setting_value}; const data = {default_language: setting_value};
const new_language = $link.attr("data-name"); const new_language = $link.attr("data-name");
$( $("#user-preferences .language_selection_widget .language_selection_button span").text(
"#user-display-settings .language_selection_widget .language_selection_button span", new_language,
).text(new_language); );
change_display_setting( change_display_setting(
data, data,
@ -320,7 +320,7 @@ export function initialize() {
const user_language_name = get_language_name(user_settings.default_language); const user_language_name = get_language_name(user_settings.default_language);
set_default_language_name(user_language_name); set_default_language_name(user_language_name);
user_settings_panel.container = "#user-display-settings"; user_settings_panel.container = "#user-preferences";
user_settings_panel.settings_object = user_settings; user_settings_panel.settings_object = user_settings;
user_settings_panel.for_realm_settings = false; user_settings_panel.for_realm_settings = false;
} }

View File

@ -51,7 +51,7 @@ export function get_group(section) {
export function initialize() { export function initialize() {
// personal // personal
load_func_dict.set("your-account", settings_account.set_up); load_func_dict.set("your-account", settings_account.set_up);
load_func_dict.set("display-settings", () => { load_func_dict.set("preferences", () => {
settings_display.set_up(settings_display.user_settings_panel); settings_display.set_up(settings_display.user_settings_panel);
}); });
load_func_dict.set("notifications", () => { load_func_dict.set("notifications", () => {

View File

@ -1,3 +1,3 @@
<div id="user-display-settings" class="settings-section" data-name="display-settings"> <div id="user-preferences" class="settings-section" data-name="preferences">
{{> display_settings prefix="user_" for_realm_settings=false}} {{> display_settings prefix="user_" for_realm_settings=false}}
</div> </div>

View File

@ -20,9 +20,9 @@
<i class="icon fa fa-lock" aria-hidden="true"></i> <i class="icon fa fa-lock" aria-hidden="true"></i>
<div class="text">{{t "Account & privacy" }}</div> <div class="text">{{t "Account & privacy" }}</div>
</li> </li>
<li tabindex="0" data-section="display-settings"> <li tabindex="0" data-section="preferences">
<i class="icon fa fa-clock-o" aria-hidden="true"></i> <i class="icon fa fa-clock-o" aria-hidden="true"></i>
<div class="text">{{t "Display settings" }}</div> <div class="text">{{t "Preferences" }}</div>
</li> </li>
<li tabindex="0" data-section="notifications"> <li tabindex="0" data-section="notifications">
<i class="icon fa fa-exclamation-triangle" aria-hidden="true"></i> <i class="icon fa fa-exclamation-triangle" aria-hidden="true"></i>

View File

@ -2,7 +2,7 @@
<p id="mark_as_read_turned_off_content" class="banner_content"> <p id="mark_as_read_turned_off_content" class="banner_content">
{{#tr}} {{#tr}}
Messages will not be automatically marked as read. <z-link>Change setting</z-link> Messages will not be automatically marked as read. <z-link>Change setting</z-link>
{{#*inline "z-link"}}<a href='/#settings/display-settings'>{{> @partial-block}}</a>{{/inline}} {{#*inline "z-link"}}<a href='/#settings/preferences'>{{> @partial-block}}</a>{{/inline}}
{{/tr}} {{/tr}}
</p> </p>
<button id="mark_view_read" class="main-view-banner-action-button"> <button id="mark_view_read" class="main-view-banner-action-button">

View File

@ -2,7 +2,7 @@
<p id="mark_as_read_turned_off_content" class="banner_content"> <p id="mark_as_read_turned_off_content" class="banner_content">
{{#tr}} {{#tr}}
Messages will not be automatically marked as read because this is not a conversation view. <z-link>Change setting</z-link> Messages will not be automatically marked as read because this is not a conversation view. <z-link>Change setting</z-link>
{{#*inline "z-link"}}<a href='/#settings/display-settings'>{{> @partial-block}}</a>{{/inline}} {{#*inline "z-link"}}<a href='/#settings/preferences'>{{> @partial-block}}</a>{{/inline}}
{{/tr}} {{/tr}}
</p> </p>
<button id="mark_view_read" class="main-view-banner-action-button"> <button id="mark_view_read" class="main-view-banner-action-button">

View File

@ -52,7 +52,7 @@ run_test("hash_util", () => {
run_test("test_get_hash_category", () => { run_test("test_get_hash_category", () => {
assert.deepEqual(hash_util.get_hash_category("streams/subscribed"), "streams"); assert.deepEqual(hash_util.get_hash_category("streams/subscribed"), "streams");
assert.deepEqual(hash_util.get_hash_category("#settings/display-settings"), "settings"); assert.deepEqual(hash_util.get_hash_category("#settings/preferences"), "settings");
assert.deepEqual(hash_util.get_hash_category("#drafts"), "drafts"); assert.deepEqual(hash_util.get_hash_category("#drafts"), "drafts");
assert.deepEqual(hash_util.get_hash_category("invites"), "invites"); assert.deepEqual(hash_util.get_hash_category("invites"), "invites");

View File

@ -24,7 +24,7 @@ link_mapping = {
"Account & privacy", "Account & privacy",
"/#settings/account-and-privacy", "/#settings/account-and-privacy",
], ],
"display-settings": ["Personal settings", "Display settings", "/#settings/display-settings"], "preferences": ["Personal settings", "Preferences", "/#settings/preferences"],
"notifications": ["Personal settings", "Notifications", "/#settings/notifications"], "notifications": ["Personal settings", "Notifications", "/#settings/notifications"],
"your-bots": ["Personal settings", "Bots", "/#settings/your-bots"], "your-bots": ["Personal settings", "Bots", "/#settings/your-bots"],
"alert-words": ["Personal settings", "Alert words", "/#settings/alert-words"], "alert-words": ["Personal settings", "Alert words", "/#settings/alert-words"],

View File

@ -164,7 +164,7 @@ def select_welcome_bot_response(human_response_lower: str) -> str:
) )
elif human_response_lower == "theme": elif human_response_lower == "theme":
return _( return _(
"Go to [Display settings](#settings/display-settings) " "Go to [Preferences](#settings/preferences) "
"to [switch between the light and dark themes](/help/dark-theme), " "to [switch between the light and dark themes](/help/dark-theme), "
"[pick your favorite emoji theme](/help/emoji-and-emoticons#change-your-emoji-set), " "[pick your favorite emoji theme](/help/emoji-and-emoticons#change-your-emoji-set), "
"[change your language](/help/change-your-language), " "[change your language](/help/change-your-language), "

View File

@ -376,16 +376,14 @@ class HelpTest(ZulipTestCase):
def test_help_settings_links(self) -> None: def test_help_settings_links(self) -> None:
result = self.client_get("/help/change-the-time-format") result = self.client_get("/help/change-the-time-format")
self.assertEqual(result.status_code, 200) self.assertEqual(result.status_code, 200)
self.assertIn( self.assertIn('Go to <a href="/#settings/preferences">Preferences</a>', str(result.content))
'Go to <a href="/#settings/display-settings">Display settings</a>', str(result.content)
)
# Check that the sidebar was rendered properly. # Check that the sidebar was rendered properly.
self.assertIn("Getting started with Zulip", str(result.content)) self.assertIn("Getting started with Zulip", str(result.content))
with self.settings(ROOT_DOMAIN_LANDING_PAGE=True): with self.settings(ROOT_DOMAIN_LANDING_PAGE=True):
result = self.client_get("/help/change-the-time-format", subdomain="") result = self.client_get("/help/change-the-time-format", subdomain="")
self.assertEqual(result.status_code, 200) self.assertEqual(result.status_code, 200)
self.assertIn("<strong>Display settings</strong>", str(result.content)) self.assertIn("<strong>Preferences</strong>", str(result.content))
self.assertNotIn("/#settings", str(result.content)) self.assertNotIn("/#settings", str(result.content))
def test_help_relative_links_for_gear(self) -> None: def test_help_relative_links_for_gear(self) -> None:

View File

@ -75,7 +75,7 @@ class TutorialTests(ZulipTestCase):
for content in messages: for content in messages:
self.send_personal_message(user, bot, content) self.send_personal_message(user, bot, content)
expected_response = ( expected_response = (
"Go to [Display settings](#settings/display-settings) " "Go to [Preferences](#settings/preferences) "
"to [switch between the light and dark themes](/help/dark-theme), " "to [switch between the light and dark themes](/help/dark-theme), "
"[pick your favorite emoji theme](/help/emoji-and-emoticons#change-your-emoji-set), " "[pick your favorite emoji theme](/help/emoji-and-emoticons#change-your-emoji-set), "
"[change your language](/help/change-your-language), and make other tweaks to your Zulip experience." "[change your language](/help/change-your-language), and make other tweaks to your Zulip experience."