From c23832789921a9de014ba72e72ed65c86c1ec839 Mon Sep 17 00:00:00 2001 From: nimish Date: Thu, 29 Jun 2023 18:58:38 +0530 Subject: [PATCH] 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. --- docs/documentation/helpcenter.md | 2 +- docs/testing/manual-testing.md | 2 +- help/change-the-time-format.md | 2 +- help/change-your-language.md | 2 +- help/configure-default-new-user-settings.md | 2 +- help/configure-default-view.md | 4 ++-- help/configure-emoticon-translations.md | 2 +- help/dark-theme.md | 2 +- help/emoji-and-emoticons.md | 4 ++-- help/emoji-reactions.md | 2 +- help/enable-full-width-display.md | 2 +- help/high-contrast-mode.md | 4 ++-- help/import-your-settings.md | 2 +- help/include/set-up-your-account.md | 2 +- help/include/sidebar_index.md | 2 +- help/manage-inactive-streams.md | 2 +- help/marking-messages-as-read.md | 2 +- help/review-your-settings.md | 4 ++-- help/star-a-message.md | 2 +- help/status-and-availability.md | 2 +- web/e2e-tests/settings.test.ts | 18 +++++++++--------- web/src/hashchange.js | 8 ++++++-- web/src/settings_display.js | 8 ++++---- web/src/settings_sections.js | 2 +- .../settings/user_display_settings.hbs | 2 +- web/templates/settings_overlay.hbs | 4 ++-- .../mark_as_read_disabled_banner.hbs | 2 +- .../mark_as_read_only_in_conversation_view.hbs | 2 +- web/tests/hash_util.test.js | 2 +- zerver/lib/markdown/help_settings_links.py | 2 +- zerver/lib/onboarding.py | 2 +- zerver/tests/test_docs.py | 6 ++---- zerver/tests/test_tutorial.py | 2 +- 33 files changed, 55 insertions(+), 53 deletions(-) diff --git a/docs/documentation/helpcenter.md b/docs/documentation/helpcenter.md index 1f36d5da76..a58192f0a8 100644 --- a/docs/documentation/helpcenter.md +++ b/docs/documentation/helpcenter.md @@ -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. - 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 you're documenting. diff --git a/docs/testing/manual-testing.md b/docs/testing/manual-testing.md index 903cec7d2e..03394e06b0 100644 --- a/docs/testing/manual-testing.md +++ b/docs/testing/manual-testing.md @@ -483,7 +483,7 @@ Do these tasks as Cordelia. - Change full name (Hamlet should see the name change) - Customize profile picture - Deactivate account (and then log in as Iago to re-activate Cordelia) -- Display settings +- Preferences - Right now, these unfortunately require reloads to take effect. - Default language (change to Spanish) - 24-hour time (and then test going back to AM/PM) diff --git a/help/change-the-time-format.md b/help/change-the-time-format.md index f5161e3282..069644d5d0 100644 --- a/help/change-the-time-format.md +++ b/help/change-the-time-format.md @@ -7,7 +7,7 @@ format (e.g. 5:00 PM) or a 24-hour format (e.g. 17:00). {start_tabs} -{settings_tab|display-settings} +{settings_tab|preferences} 1. Under **General**, select your preferred option from the **Time format** dropdown. diff --git a/help/change-your-language.md b/help/change-your-language.md index c3ec3d5749..c2cbb490d1 100644 --- a/help/change-your-language.md +++ b/help/change-your-language.md @@ -11,7 +11,7 @@ messages you receive. {tab|desktop-web} -{settings_tab|display-settings} +{settings_tab|preferences} 1. Under **General**, click the button under **Language**. diff --git a/help/configure-default-new-user-settings.md b/help/configure-default-new-user-settings.md index 0bd1687fff..07657d5e39 100644 --- a/help/configure-default-new-user-settings.md +++ b/help/configure-default-new-user-settings.md @@ -15,7 +15,7 @@ preference settings, including the following: * Privacy settings, including: * [Displaying availability to other users](/help/status-and-availability) * [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. [All messages](/help/reading-strategies#all-messages)) * [Light theme vs. dark theme](/help/dark-theme) diff --git a/help/configure-default-view.md b/help/configure-default-view.md index a528371483..0ffd074eb0 100644 --- a/help/configure-default-view.md +++ b/help/configure-default-view.md @@ -29,7 +29,7 @@ organization settings: {start_tabs} -{settings_tab|display-settings} +{settings_tab|preferences} 1. Under **Advanced**, click on the **Default view** dropdown and select a view. @@ -57,7 +57,7 @@ shortcut. {start_tabs} -{settings_tab|display-settings} +{settings_tab|preferences} 1. Under **Advanced**, toggle **Escape key navigates to default view**, as desired. diff --git a/help/configure-emoticon-translations.md b/help/configure-emoticon-translations.md index bb2559a125..a5f0054a77 100644 --- a/help/configure-emoticon-translations.md +++ b/help/configure-emoticon-translations.md @@ -19,7 +19,7 @@ by Zulip. {start_tabs} -{settings_tab|display-settings} +{settings_tab|preferences} 1. Under **Emoji**, toggle **Convert emoticons before sending**. diff --git a/help/dark-theme.md b/help/dark-theme.md index 31a911ff6b..f8ca058f59 100644 --- a/help/dark-theme.md +++ b/help/dark-theme.md @@ -9,7 +9,7 @@ for working in a dark space. {tab|desktop-web} -{settings_tab|display-settings} +{settings_tab|preferences} 1. Under **General**, select the desired color scheme from the **Theme** dropdown. diff --git a/help/emoji-and-emoticons.md b/help/emoji-and-emoticons.md index 5c645ab162..b307d6774b 100644 --- a/help/emoji-and-emoticons.md +++ b/help/emoji-and-emoticons.md @@ -55,7 +55,7 @@ will be displayed as {start_tabs} -{settings_tab|display-settings} +{settings_tab|preferences} 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} -{settings_tab|display-settings} +{settings_tab|preferences} 1. Under **Emoji**, select **Google**, **Twitter**, **Plain text**, or **Google blobs** for the emoji theme. diff --git a/help/emoji-reactions.md b/help/emoji-reactions.md index c017ef7ca9..db7fad35d6 100644 --- a/help/emoji-reactions.md +++ b/help/emoji-reactions.md @@ -97,7 +97,7 @@ so](#toggle-whether-names-of-reacting-users-are-displayed) is enabled. {start_tabs} -{settings_tab|display-settings} +{settings_tab|preferences} 1. Under **Emoji**, toggle **Display names of reacting users when few users have reacted to a message**. diff --git a/help/enable-full-width-display.md b/help/enable-full-width-display.md index 7673312e07..f13b57e08e 100644 --- a/help/enable-full-width-display.md +++ b/help/enable-full-width-display.md @@ -11,7 +11,7 @@ You can instead configure Zulip to use the full width of wide screens. {start_tabs} -{settings_tab|display-settings} +{settings_tab|preferences} 1. Under **Advanced**, select **Use full width on wide screens**. diff --git a/help/high-contrast-mode.md b/help/high-contrast-mode.md index 94bfde621d..0f85ec7794 100644 --- a/help/high-contrast-mode.md +++ b/help/high-contrast-mode.md @@ -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 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 diff --git a/help/import-your-settings.md b/help/import-your-settings.md index b7fc61dffa..28f5f10a24 100644 --- a/help/import-your-settings.md +++ b/help/import-your-settings.md @@ -14,7 +14,7 @@ The import will include your: - [Name and avatar](/#settings/profile) - [Privacy settings](/#settings/account-and-privacy) -- [Display settings](/#settings/display-settings) +- [Preferences](/#settings/preferences) - [Notification settings](/#settings/notifications) - Tutorial completion status. diff --git a/help/include/set-up-your-account.md b/help/include/set-up-your-account.md index 4c91bdd3bb..80cb5f174a 100644 --- a/help/include/set-up-your-account.md +++ b/help/include/set-up-your-account.md @@ -10,7 +10,7 @@ [edit your profile information](/help/edit-your-profile) to tell others 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), [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. diff --git a/help/include/sidebar_index.md b/help/include/sidebar_index.md index 1e4bf24219..f836f3a6ff 100644 --- a/help/include/sidebar_index.md +++ b/help/include/sidebar_index.md @@ -45,7 +45,7 @@ * [Review your settings](/help/review-your-settings) * [Deactivate your account](/help/deactivate-your-account) -## Display settings +## Preferences * [Dark theme](/help/dark-theme) * [Change your language](/help/change-your-language) * [Change your time zone](/help/change-your-timezone) diff --git a/help/manage-inactive-streams.md b/help/manage-inactive-streams.md index af0feff529..1e44c622db 100644 --- a/help/manage-inactive-streams.md +++ b/help/manage-inactive-streams.md @@ -13,7 +13,7 @@ is your first time using Zulip. {start_tabs} -{settings_tab|display-settings} +{settings_tab|preferences} 2. Under **Advanced**, configure **Demote inactive streams**. diff --git a/help/marking-messages-as-read.md b/help/marking-messages-as-read.md index f3064caf95..e5e8500e1b 100644 --- a/help/marking-messages-as-read.md +++ b/help/marking-messages-as-read.md @@ -19,7 +19,7 @@ are at your computer. You will still be able to {tab|desktop-web} -{settings_tab|display-settings} +{settings_tab|preferences} 1. Under **Advanced**, click on the **Automatically mark messages as read** dropdown, and select **Always**, **Never** or **Only in diff --git a/help/review-your-settings.md b/help/review-your-settings.md index 53349b2b9c..3c6e0b5963 100644 --- a/help/review-your-settings.md +++ b/help/review-your-settings.md @@ -14,13 +14,13 @@ you use Zulip. {end_tabs} -## Review your display settings +## Review your preferences {start_tabs} {relative|gear|settings} -1. Click on the **Display settings** tab on the left. +1. Click on the **Preferences** tab on the left. {end_tabs} diff --git a/help/star-a-message.md b/help/star-a-message.md index 8b9f79e7c0..9b883b5dd3 100644 --- a/help/star-a-message.md +++ b/help/star-a-message.md @@ -37,7 +37,7 @@ can disable that feature. {start_tabs} -{settings_tab|display-settings} +{settings_tab|preferences} 1. Under **Advanced**, toggle **Show counts for starred messages**. diff --git a/help/status-and-availability.md b/help/status-and-availability.md index 9fcab1e0b0..add6044e25 100644 --- a/help/status-and-availability.md +++ b/help/status-and-availability.md @@ -85,7 +85,7 @@ With the compact option, only status emoji are shown. {tab|desktop-web} -{settings_tab|display-settings} +{settings_tab|preferences} 1. Under **Advanced**, select **Compact** or **Show status and text** for the user list style. diff --git a/web/e2e-tests/settings.test.ts b/web/e2e-tests/settings.test.ts index a2aa4629e0..9d2f55c51d 100644 --- a/web/e2e-tests/settings.test.ts +++ b/web/e2e-tests/settings.test.ts @@ -347,28 +347,28 @@ async function test_alert_words_section(page: Page): Promise { } async function change_language(page: Page, language_data_code: string): Promise { - await page.waitForSelector("#user-display-settings .language_selection_button", { + await page.waitForSelector("#user-preferences .language_selection_button", { 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); const language_selector = `a[data-code="${CSS.escape(language_data_code)}"]`; await page.click(language_selector); } async function check_language_setting_status(page: Page): Promise { - await page.waitForSelector("#user-display-settings .general-settings-status .reload_link", { + await page.waitForSelector("#user-preferences .general-settings-status .reload_link", { visible: true, }); } async function assert_language_changed_to_chinese(page: Page): Promise { - await page.waitForSelector("#user-display-settings .language_selection_button", { + await page.waitForSelector("#user-preferences .language_selection_button", { visible: true, }); const default_language = await common.get_text_from_selector( page, - "#user-display-settings .language_selection_button", + "#user-preferences .language_selection_button", ); assert.strictEqual( default_language, @@ -386,7 +386,7 @@ async function test_i18n_language_precedence(page: Page): Promise { } async function test_default_language_setting(page: Page): Promise { - const display_settings_section = '[data-section="display-settings"]'; + const display_settings_section = '[data-section="preferences"]'; await page.click(display_settings_section); const chinese_language_data_code = "zh-hans"; @@ -394,7 +394,7 @@ async function test_default_language_setting(page: Page): Promise { // Check that the saved indicator appears await check_language_setting_status(page); await page.click(".reload_link"); - await page.waitForSelector("#user-display-settings .language_selection_button", { + await page.waitForSelector("#user-preferences .language_selection_button", { visible: true, }); await assert_language_changed_to_chinese(page); @@ -410,10 +410,10 @@ async function test_default_language_setting(page: Page): Promise { await page.goto("http://zulip.zulipdev.com:9981/#settings"); // get back to normal language. await page.waitForSelector(display_settings_section, {visible: true}); 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, }); - await page.waitForSelector("#user-display-settings .language_selection_button", { + await page.waitForSelector("#user-preferences .language_selection_button", { visible: true, }); } diff --git a/web/src/hashchange.js b/web/src/hashchange.js index 07c0a30ae2..d710114ce0 100644 --- a/web/src/hashchange.js +++ b/web/src/hashchange.js @@ -251,7 +251,7 @@ function do_hashchange_overlay(old_hash) { } const base = hash_util.get_current_hash_category(); 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)) { // 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); - + 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) { let settings_panel_object = settings_panel_menu.normal_settings; if (base === "organization") { diff --git a/web/src/settings_display.js b/web/src/settings_display.js index c93a611644..88390c9fdb 100644 --- a/web/src/settings_display.js +++ b/web/src/settings_display.js @@ -92,9 +92,9 @@ function user_default_language_modal_post_render() { const data = {default_language: setting_value}; const new_language = $link.attr("data-name"); - $( - "#user-display-settings .language_selection_widget .language_selection_button span", - ).text(new_language); + $("#user-preferences .language_selection_widget .language_selection_button span").text( + new_language, + ); change_display_setting( data, @@ -320,7 +320,7 @@ export function initialize() { const user_language_name = get_language_name(user_settings.default_language); 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.for_realm_settings = false; } diff --git a/web/src/settings_sections.js b/web/src/settings_sections.js index d21cf3dea1..a2db92ebd0 100644 --- a/web/src/settings_sections.js +++ b/web/src/settings_sections.js @@ -51,7 +51,7 @@ export function get_group(section) { export function initialize() { // personal 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); }); load_func_dict.set("notifications", () => { diff --git a/web/templates/settings/user_display_settings.hbs b/web/templates/settings/user_display_settings.hbs index b03f36c09b..f769c15af9 100644 --- a/web/templates/settings/user_display_settings.hbs +++ b/web/templates/settings/user_display_settings.hbs @@ -1,3 +1,3 @@ -
+
{{> display_settings prefix="user_" for_realm_settings=false}}
diff --git a/web/templates/settings_overlay.hbs b/web/templates/settings_overlay.hbs index 87ad5c6c83..c13c8544be 100644 --- a/web/templates/settings_overlay.hbs +++ b/web/templates/settings_overlay.hbs @@ -20,9 +20,9 @@
{{t "Account & privacy" }}
-
  • +
  • -
    {{t "Display settings" }}
    +
    {{t "Preferences" }}
  • diff --git a/web/templates/unread_banner/mark_as_read_disabled_banner.hbs b/web/templates/unread_banner/mark_as_read_disabled_banner.hbs index 0efc00b03e..849e60cba3 100644 --- a/web/templates/unread_banner/mark_as_read_disabled_banner.hbs +++ b/web/templates/unread_banner/mark_as_read_disabled_banner.hbs @@ -2,7 +2,7 @@