Commit Graph

21 Commits

Author SHA1 Message Date
Kislay Verma
67ca49488f tests: Use make_realm to create type-correct realm objects.
Another step in the direction of improving node tests
and using type-correct organic data as much as possible.
2025-08-28 11:35:07 -07:00
Saubhagya Patel
bb5c87e306 bots: Add a setting to customize the Welcome Bot message.
This commit includes the following changes:
- Add an administrator setting to customize the Welcome Bot
message when sending an invitation.
- Add an API endpoint to test the customized Welcome Bot message
by sending a copy of the message to the administrator.

Fixes #27663.

Co-authored-by: Akarsh Jain <akarsh.jain.790@gmail.com>
2025-08-08 18:59:37 -07:00
Maneesh Shukla
a93a015b21 banners: Redesign organization upgrade banners.
This commit redesigns the upgrade and sponsorship banners by adding
AVAILABLE_ON_STANDARD, UPGRADE_ACCESS_BANNER, and
UPGRADE_OR_SPONSORSHIP_BANNER.

Fixes part of #34252.
2025-08-01 09:08:30 -07:00
Vector73
a77fc6aa79 stream_settings: Add new disable_topics option to topics_policy.
Adds new configuration option `disable_topics` in `topics_policy`
channel setting to support disabling topics in the channel.

Fixes #34553.
2025-07-09 14:25:53 -07:00
Sahil Batra
e643d7e6fd dropdown-list-widget: Allow customization for "Disable" option.
We currently always show fa-ban icon and "Disable" text for
"Disabled" or "None selected" option in dropdown-list widget.

This commit adds code to provide an option for not showing the
fa-ban icon and having the option text be something other than
"Disable". This will be used in channel folder dropdown widget
where we want to have "None" text in the option without icon.
2025-06-10 11:51:58 -07:00
Sayam Samal
0914732387 settings: Improve enable_or_disable_save_button method code.
This commit reorganizes the code in enable_or_disable_save_button
method, and improves its readability. It also replaces the previous
tooltip logic for the disabled save button in the save/discard widget
with the more standardized methods to handle the same from ui_util.ts.
2025-05-15 11:16:59 -07:00
Sayam Samal
f496bd6350 settings: Remove unused "saved" state in save discard widget. 2025-04-07 18:22:16 -07:00
Sayam Samal
83c5733144 settings: Fix save discard widget closing before saved state.
Sometimes, in slower connections, Tornado long-polling callback can
reach the client at almost exactly the same time as the success
response, making the prediction of which arrives first
non-deterministic. Due to this, the server event call responsible for
syncing the realm settings across multiple users would sometimes take
over and hide and the save discard widget before the success callback
from `/json/realm` could show the "saved" state in the button.

This commit fixes this issue by blocking the "discarded" state from
hiding the save discard widget when the save button is already in the
"saving" or "succeeded" state, since in those conditions the visibility
of the save discard widget would anyways be handled by a "failed" or
"succeeded" state.
2025-04-07 18:22:16 -07:00
Sayam Samal
b115368a81 settings: Update save button style when "Saved" is shown.
This commit updates the save button style in the settings component to
ensure that the button appears as a borderless attention + success
intent action button alongside the "Saved" label, when an updated
setting is saved.
2025-04-07 18:22:16 -07:00
Sayam Samal
6bf2887991 settings: Update save and discard buttons to redesigned button styles.
This commit updates the save and discard buttons in the setting modals
to use redesigned button styles along with the new loading indicator.
2025-04-07 18:22:16 -07:00
Maneesh Shukla
e3a1ad7a3c settings: Prevent redundant requests by modifying event handler.
Previously, all buttons within .subsection-changes-save were targeted,
potentially leading to multiple requests while a request was in
progress. This change ensures that the triggering element is properly
handled by preventing the default form submission action.
2025-03-11 12:45:57 -07:00
Saubhagya Patel
f9825142c8 settings: Add frontend to change allow_edit_history to integer field.
This commit implements the frontend of migrating the
`allow_edit_history` setting to `message_edit_history_visibility`.
This allows organizations, to have an intermediate setting to
view only the "Moves" history of the messages.

Fixes #21398.

Co-authored-by: Shlok Patel <shlokcpatel2001@gmail.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>
2025-02-25 18:18:23 -08:00
Maneesh Shukla
dc95699862 code_playground: Add custom playground options in the default_options list.
We can configure a custom playground for any language, including ones
which we don't have in our typeahead suggestions. One might then want to
make that language the default for code blocks, which is now possible
with this commit.

Fixes: #33282.
2025-02-16 17:22:47 -08:00
Vector73
d48164ce1e settings: Add two new realm settings to restrict bot creation.
Added `can_create_bots_group` setting which controls who can
create any type of bots in the organization.

Added `can_create_write_only_bots_group` setting which controls
who can create incoming webhooks in the organization in additon
to those who are in `can_create_bots_group`.
2025-01-30 11:37:33 -08:00
Shubham Padia
3bf87228a2 settings: Use can_add_subscribers_group instead of realm policy.
We are using `can_add_subscribers_group` instead of
`invite_to_stream_policy` to check whether a user can subscribe other
users.
We've removed `invite_to_stream_policy` from the frontend wherever
applicable.
2025-01-22 12:33:58 -08:00
Saubhagya Patel
c44c153b9a settings: Improve UI for email changes.
This commit includes the following changes:
 - The email field is now a disabled text field.
 - An "Edit" (pencil) button is added next to the email
   field, which opens the change email modal.
 - The "Edit" button is not shown if the user doesn't
   have permission to edit their email.
 - When email changes are disabled, the "email changes are
   disabled" tooltip now appears over the email field, which
   previously appeared to the right of the email field.
 - Refactor `settings_org.test.cjs` to align with the changes
   of the added "Edit" button.

Fixes #31975.
2025-01-07 14:17:23 -08:00
Saubhagya Patel
b15fb45408 settings: Use text cursor for "Email" when email changes are disabled.
This commit includes the following changes:
 - Use a regular text cursor in place of a pointer cursor for the
   "Email" field label when the email changes are disabled.
 - Implement tests to verify the above changes made.
2025-01-07 13:44:53 -08:00
Saubhagya Patel
ad766c802e settings: Use text cursor for "Name" when name changes are disabled.
This commit includes the following changes:
 - Use a regular text cursor in place of a pointer cursor for the
   "Name" field label when the name changes are disabled.
 - Introduce a class named `cursor-text` that sets the property
   `cursor: text;`.
 - Implement tests to verify the above changes made.
2025-01-07 13:44:53 -08:00
Shubham Padia
7cfa110934 settings: Realms with limited plans cannot change can_create_groups.
We do not allow realms on a limited plan to create groups. This commit
adds a banner to upgrade to the can_create_groups org setting and
disables editing it on the backend.
This commit also adds a new method called
`disable_group_permission_setting` to easily disable similar settings.
2024-11-22 13:42:59 -08:00
Vector73
4e89b4a88c settings: Add can_invite_users_group realm setting.
Added `can_invite_users_group` realm setting to replace
`invite_to_realm_policy`.
2024-11-20 13:35:05 -08:00
Anders Kaseorg
687f1b1651 tests: Rename the Node tests to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00