Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

setting: Rename bot-list-admin to bots.

Maneesh Shukla42ec0a7c089d
diff --git a/starlight_help/src/components/NavigationSteps.astro b/starlight_help/src/components/NavigationSteps.astro
index 86c6e11a3e0..ca6d2269ae6 100644
--- a/starlight_help/src/components/NavigationSteps.astro
+++ b/starlight_help/src/components/NavigationSteps.astro
@@ -129,10 +129,10 @@ const setting_link_mapping: Record<
setting_name: "Users",
setting_link: "/#organization/users/invitations",
},
- "bot-list-admin": {
+ bots: {
setting_type: ORGANIZATION_SETTINGS_TYPE,
setting_name: "Bots",
- setting_link: "/#organization/bot-list-admin",
+ setting_link: "/#organization/bots",
},
"default-channels-list": {
setting_type: ORGANIZATION_SETTINGS_TYPE,
diff --git a/starlight_help/src/content/docs/add-a-bot-or-integration.mdx b/starlight_help/src/content/docs/add-a-bot-or-integration.mdx
index c203d1958db..2bc2a7d5cfd 100644
--- a/starlight_help/src/content/docs/add-a-bot-or-integration.mdx
+++ b/starlight_help/src/content/docs/add-a-bot-or-integration.mdx
@@ -32,7 +32,7 @@ is visible and available for anyone to use.
<TabItem label="Via organization settings">
<FlattenedSteps>
- <NavigationSteps target="settings/bot-list-admin" />
+ <NavigationSteps target="settings/bots" />
1. Click **Add a new bot**.
1. Fill out the fields, and click **Add**.
diff --git a/starlight_help/src/content/docs/deactivate-or-reactivate-a-bot.mdx b/starlight_help/src/content/docs/deactivate-or-reactivate-a-bot.mdx
index b1a288e4070..931fc6b5cdb 100644
--- a/starlight_help/src/content/docs/deactivate-or-reactivate-a-bot.mdx
+++ b/starlight_help/src/content/docs/deactivate-or-reactivate-a-bot.mdx
@@ -42,7 +42,7 @@ bot, regardless of who owns them.
<AdminOnly />
<FlattenedSteps>
- <NavigationSteps target="settings/bot-list-admin" />
+ <NavigationSteps target="settings/bots" />
1. In the **Actions** column, click the **deactivate bot** (<UserXIcon />) icon for the bot you want to deactivate.
1. Approve by clicking **Deactivate**.
@@ -72,7 +72,7 @@ bot, regardless of who owns them.
<AdminOnly />
<FlattenedSteps>
- <NavigationSteps target="settings/bot-list-admin" />
+ <NavigationSteps target="settings/bots" />
1. In the **Actions** column, click the **reactivate bot** (<UserPlusIcon />) icon for the bot you want to reactivate.
1. Approve by clicking **Confirm**.
diff --git a/starlight_help/src/content/docs/generate-integration-url.mdx b/starlight_help/src/content/docs/generate-integration-url.mdx
index 8894e5aa11c..da81f9e61a5 100644
--- a/starlight_help/src/content/docs/generate-integration-url.mdx
+++ b/starlight_help/src/content/docs/generate-integration-url.mdx
@@ -46,7 +46,7 @@ integration URL.
<AdminOnly />
<FlattenedSteps>
- <NavigationSteps target="settings/bot-list-admin" />
+ <NavigationSteps target="settings/bots" />
1. In the **Actions** column, click the **manage bot** (<UserCogIcon />) icon for an **Incoming webhook** bot.
1. Scroll down to the bottom, and click **Generate URL for an integration**.
diff --git a/starlight_help/src/content/docs/manage-a-bot.mdx b/starlight_help/src/content/docs/manage-a-bot.mdx
index 8b0317a5131..e4a6ed65cc3 100644
--- a/starlight_help/src/content/docs/manage-a-bot.mdx
+++ b/starlight_help/src/content/docs/manage-a-bot.mdx
@@ -27,7 +27,7 @@ active bot in the organization.
<AdminOnly />
<FlattenedSteps>
- <NavigationSteps target="settings/bot-list-admin" />
+ <NavigationSteps target="settings/bots" />
1. In the **Actions** column, click the **manage bot** (<UserCogIcon />) icon for the bot you want to manage.
1. Update bot information as desired, and click **Save changes**.
diff --git a/starlight_help/src/content/docs/user-cards.mdx b/starlight_help/src/content/docs/user-cards.mdx
index fce934bf88c..0bef888c5f7 100644
--- a/starlight_help/src/content/docs/user-cards.mdx
+++ b/starlight_help/src/content/docs/user-cards.mdx
@@ -62,7 +62,7 @@ sent](/help/view-messages-sent-by-a-user).
<TabItem label="Bot">
<FlattenedSteps>
- <NavigationSteps target="settings/bot-list-admin" />
+ <NavigationSteps target="settings/bots" />
1. Click on the name of a bot in the **Name** column to open its **user card**.
</FlattenedSteps>
diff --git a/starlight_help/src/content/docs/view-all-bots-in-your-organization.mdx b/starlight_help/src/content/docs/view-all-bots-in-your-organization.mdx
index 25133c355c9..f0820cf33ed 100644
--- a/starlight_help/src/content/docs/view-all-bots-in-your-organization.mdx
+++ b/starlight_help/src/content/docs/view-all-bots-in-your-organization.mdx
@@ -13,7 +13,7 @@ Organization [administrators](/help/user-roles) can also
[manage](/help/manage-a-bot#manage-a-bot-in-your-organization) any bot on the list.
<FlattenedSteps>
- <NavigationSteps target="settings/bot-list-admin" />
+ <NavigationSteps target="settings/bots" />
</FlattenedSteps>
## Related articles
diff --git a/web/e2e-tests/user-deactivation.test.ts b/web/e2e-tests/user-deactivation.test.ts
index 4b55b82812e..ec931ae3d65 100644
--- a/web/e2e-tests/user-deactivation.test.ts
+++ b/web/e2e-tests/user-deactivation.test.ts
@@ -105,7 +105,7 @@ async function test_deactivated_users_section(page: Page): Promise<void> {
}
async function test_bot_deactivation_and_reactivation(page: Page): Promise<void> {
- await page.click("li[data-section='bot-list-admin']");
+ await page.click("li[data-section='bots']");
const default_bot_user_row = await user_row(page, "Zulip Default Bot");
diff --git a/web/src/hashchange.ts b/web/src/hashchange.ts
index 072ea83198f..d0eba236dda 100644
--- a/web/src/hashchange.ts
+++ b/web/src/hashchange.ts
@@ -293,6 +293,11 @@ function do_hashchange_overlay(old_hash: string | undefined): void {
// #settings/display-settings is being redirected to #settings/preferences.
section = "preferences";
}
+ if (section === "bot-list-admin") {
+ // #organization/bot-list-admin is being redirected to #organization/bots.
+ section = "bots";
+ base = "organization";
+ }
if (section === "user-list-admin") {
// #settings/user-list-admin is being redirected to #settings/users after it was renamed.
section = "users";
diff --git a/web/src/settings.ts b/web/src/settings.ts
index f3c37f4c1e8..37f094b3671 100644
--- a/web/src/settings.ts
+++ b/web/src/settings.ts
@@ -53,7 +53,7 @@ export function update_lock_icon_in_sidebar(): void {
$(".org-settings-list .locked").show();
if (settings_bots.can_create_incoming_webhooks()) {
- $(".org-settings-list li[data-section='bot-list-admin'] .locked").hide();
+ $(".org-settings-list li[data-section='bots'] .locked").hide();
}
if (settings_data.user_can_add_custom_emoji()) {
diff --git a/web/src/settings_bots.ts b/web/src/settings_bots.ts
index 30cd209d5a0..e321d3852ca 100644
--- a/web/src/settings_bots.ts
+++ b/web/src/settings_bots.ts
@@ -199,11 +199,11 @@ function update_add_bot_button(): void {
if (can_create_incoming_webhooks()) {
$("#bot-settings .add-a-new-bot").show();
$("#admin-bot-list .add-a-new-bot").show();
- $(".org-settings-list li[data-section='bot-list-admin'] .locked").hide();
+ $(".org-settings-list li[data-section='bots'] .locked").hide();
} else {
$("#bot-settings .add-a-new-bot").hide();
$("#admin-bot-list .add-a-new-bot").hide();
- $(".org-settings-list li[data-section='bot-list-admin'] .locked").show();
+ $(".org-settings-list li[data-section='bots'] .locked").show();
}
}
diff --git a/web/src/settings_sections.ts b/web/src/settings_sections.ts
index a631eb29679..bb03b33811e 100644
--- a/web/src/settings_sections.ts
+++ b/web/src/settings_sections.ts
@@ -34,7 +34,7 @@ export function get_group(section: string): string {
case "auth-methods":
return "org_misc";
- case "bot-list-admin":
+ case "bots":
return "org_bots";
case "users":
diff --git a/web/templates/popovers/user_group_info_popover.hbs b/web/templates/popovers/user_group_info_popover.hbs
index cc80177d97f..ed185258221 100644
--- a/web/templates/popovers/user_group_info_popover.hbs
+++ b/web/templates/popovers/user_group_info_popover.hbs
@@ -51,7 +51,7 @@
{{#tr class="popover-group-menu-member"}}
View all <z-link-users>users</z-link-users> and <z-link-bots>bots</z-link-bots>
{{#*inline "z-link-users"}}<a href="#organization/users">{{> @partial-block}}</a>{{/inline}}
- {{#*inline "z-link-bots"}}<a href="#organization/bot-list-admin">{{> @partial-block}}</a>{{/inline}}
+ {{#*inline "z-link-bots"}}<a href="#organization/bots">{{> @partial-block}}</a>{{/inline}}
{{/tr}}
{{else}}
<a href="#organization/users" role="menuitem">
diff --git a/web/templates/settings/bot_list_admin.hbs b/web/templates/settings/bot_list_admin.hbs
index 4b3c807e2f6..8f9fd1efd0a 100644
--- a/web/templates/settings/bot_list_admin.hbs
+++ b/web/templates/settings/bot_list_admin.hbs
@@ -1,4 +1,4 @@
-<div id="admin-bot-list" class="settings-section user-or-bot-settings-section" data-name="bot-list-admin">
+<div id="admin-bot-list" class="settings-section user-or-bot-settings-section" data-name="bots">
<div class="bot-settings-tip banner-wrapper" id="admin-bot-settings-tip">
</div>
<div class="clear-float"></div>
diff --git a/web/templates/settings_overlay.hbs b/web/templates/settings_overlay.hbs
index 24d11e58057..91759707024 100644
--- a/web/templates/settings_overlay.hbs
+++ b/web/templates/settings_overlay.hbs
@@ -92,7 +92,7 @@
</li>
{{/unless}}
{{#unless is_guest}}
- <li class="sidebar-item" tabindex="0" data-section="bot-list-admin">
+ <li class="sidebar-item" tabindex="0" data-section="bots">
<i class="sidebar-item-icon zulip-icon zulip-icon-bot" aria-hidden="true"></i>
<div class="text">{{t "Bots" }}</div>
<i class="locked fa fa-lock tippy-zulip-tooltip" {{#if can_create_new_bots}}style="display: none;"{{/if}} data-tippy-content="{{t 'Only organization administrators can edit these settings.' }}"></i>
diff --git a/web/tests/people.test.cjs b/web/tests/people.test.cjs
index eb4b24a15aa..57e37c46a6f 100644
--- a/web/tests/people.test.cjs
+++ b/web/tests/people.test.cjs
@@ -669,7 +669,7 @@ run_test("get_custom_fields_by_type", ({override}) => {
run_test("bot_custom_profile_data", () => {
initialize();
// If this test fails, then try opening organization settings > bots
- // http://localhost:9991/#organization/bot-list-admin
+ // http://localhost:9991/#organization/bots
// and then try to edit any of the bots.
people.add_active_user(bot_botson);
assert.equal(people.get_custom_profile_data(bot_botson.user_id, 3), undefined);
diff --git a/zerver/lib/markdown/help_settings_links.py b/zerver/lib/markdown/help_settings_links.py
index 57ab51d0c2c..a97478143f3 100644
--- a/zerver/lib/markdown/help_settings_links.py
+++ b/zerver/lib/markdown/help_settings_links.py
@@ -75,10 +75,10 @@ link_mapping = {
"Users",
"/#organization/users/invitations",
],
- "bot-list-admin": [
+ "bots": [
"Organization settings",
"Bots",
- "/#organization/bot-list-admin",
+ "/#organization/bots",
],
"default-channels-list": [
"Organization settings",