Commit Graph

165 Commits

Author SHA1 Message Date
Anders Kaseorg
b3e0253eec eslint: Unify JavaScript and TypeScript configs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-27 13:29:41 -08:00
Prakhar Pratyush
29fb5ff934 compose: Update textarea placeholder with general chat. 2025-02-26 13:59:02 -08:00
Karl Stolley
cae48d3faa compose: Rename placeholder update function for clarity. 2025-02-26 13:59:02 -08: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
Vector73
2ef9695ef0 settings: Migrate wildcard_mention_policy to group-based permission.
Added new group-based permission setting
`can_mention_many_users_group` to replace `wildcard_mention_policy`.
2025-02-12 23:21:33 -08:00
opmkumar
2a15da47d9 message_edit: Show typing indicator for message editing.
This commit adds typing indicators for message editing in stream
as well as in dm, if the send typing notification
for corresponding is enabled.

Based on earlier work in #28585.

Co-authored-by: Rohan Gudimetla <rohan.gudimetla07@gmail.com>

Fixes #25719.
2025-02-12 15:08:56 -08:00
Sahil Batra
7eeb8a2c26 settings: Add personal setting to show or hide AI features.
Fixes #33231.
2025-02-12 12:05:04 -08:00
Sahil Batra
4ca28bb850 settings: Add setting to control permission for topic summarization. 2025-02-12 12:05:04 -08:00
Vector73
cb6f0fd63c realm: Add setting to notify user on DMing guest.
Added `enable_guest_user_dm_warning` setting to decide whether
clients should show a warning when a user is composing to a guest
user in the organization.

Fixes #30078.

Co-authored-by: adnan-td <generaladnan139@gmail.com>
2025-02-06 12:15:41 -08:00
Sahil Batra
fbbd36b306 group-settings: Live update permissions panel.
This commit adds code to live update permissions panel when
a group gains permission.
2025-02-04 16:08:58 -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
Sayam Samal
4bece9189b banners: Redesign organization profile incomplete navbar banner.
As part of the banner redesign project, this commit applies the new
banner styles to the organization profile incomplete navbar banner.
2025-01-30 10:17:39 -08:00
Sayam Samal
bf7d5637eb banners: Redesign profile missing required fields banner.
As part of the banner redesign project, this commit applies the new
banner styles to the profile missing required fields banner.
2025-01-30 10:17:39 -08:00
Sahil Batra
893cdc8069 settings: Show realm permissions that group has in permissions panel. 2025-01-27 15:32:15 -08:00
bedo
21199beb73 stream_delete_event: Include only stream IDs in the event.
Fixes #32369

Migrate stream delete event to include only stream ids in the form of
"stream_ids": [1,...], because clients only need the ids.

While keep sending ids in the form of "streams": [{stream_id: 1},...]
for compatibility with all clients other than web.
2025-01-24 17:58:32 -08:00
bedo
7c8a3618bf message_view_header: Change maybe_rerender_title_area_for_stream type.
prep-commit

changed argument "modified_sub: StreamSubscription" to
"modified_stream_id: number", as only ID is used and not the whole object.
2025-01-24 17:58:32 -08:00
Sahil Batra
255eee255b events: Pass group in functions called for updating the group.
We now pass group in functions called while handling group update
events, instead of fetching the groups in those function as we
will need the old setting value in future commits.
2025-01-24 14:51:51 -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
Shubham Padia
34ade0d9a2 realm: Add ability to set can_add_subscribers_group in frontend.
The setting is not used anywhere yet either on the frontend or the
backend, we are just adding the ability to change the value of the realm
setting. We have also removed the ability to set
`invite_to_stream_policy` in this commit while it continues being used
to check permissions.
We have changed the label of the setting from `Who can add users to
channels` to `Who can subcribe users to channels` and label_parens_text
as `in addition to organization administrators` as discussed in
https://chat.zulip.org/#narrow/channel/101-design/topic/Can.20subscribe.20other.20users.20on.20user.20profile/near/2039825
2025-01-22 12:33:58 -08:00
Prakhar Pratyush
469cc53187 export: Add banner if admin's private data export setting is disabled.
This commit introduces a banner on the "Start Export" modal
to notify the admin that their personal setting to export
private data is not toggled ON.

The banner is shown when the 'Export type' is 'Standard' and
admin's personal setting to export private data is not toggled ON.

The banner ensures admins are aware their private data will
not be exported unless they enable the respective setting.
2025-01-02 16:40:33 -08:00
Anders Kaseorg
b19a556982 stream_types: Remove email_address from ApiStreamSubscription.
Commit 432001656e removed this from the
backend.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-30 09:42:26 -08:00
Kislay Verma
a817671809 settings_ui: Add checkbox for toggling field.
Added a checkbox to toggle the option to automatically offer
to update the time zone with the browser time zone,
which is handled by the user profile field
"web_suggest_update_timezone".

A tooltip is also attached explaining the feature.

Fixes part of #16957
2024-12-13 12:58:09 -08:00
Anders Kaseorg
77f97762c6 eslint: Fix unicorn/explicit-length-check. (#32666)
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-11 09:19:46 -08:00
Anders Kaseorg
d446b0d672 user_events: Convert module to TypeScript (#32658) 2024-12-11 09:18:52 -08:00
Varun Singh
010e2b9867 user_group_edit: Convert module to TypeScript. 2024-12-10 12:07:46 -08:00
evykassirer
7bd4016254 message_events: Convert module to typescript. 2024-12-10 10:52:01 -08:00
Aman Agrawal
276e547824 user_topics_ui: Rerender combined feed to make unmuted topics visible.
Since combined feed no longer contains a continuous history of
muted messages, we need to rerender it display the newly visible
messages.
2024-12-08 18:34:28 -08:00
Shubham Padia
cbcd631afe user_group: Live update on subgroup edit.
Also adds a condition to handle_member_edit_event to only update the
group checkmark when the current user id is part of the member ids
affected by the event.
2024-12-04 16:02:20 -08:00
Anders Kaseorg
bb174e9b64 gear_menu: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 09:34:49 -08:00
evykassirer
64c8884487 stream_events: Convert module to typescript. 2024-11-26 09:18:12 -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
evykassirer
60763763b2 stream_settings_ui: Convert module to typescript. 2024-11-19 14:01:10 -08:00
Anders Kaseorg
e82b7641c6 giphy: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 11:56:57 -08:00
Anders Kaseorg
ec3177c834 web: Add explicit extensions to imports.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Aman Agrawal
e6113b0dd4 message_events: Discard message list that cannot be live updated.
Since we cannot cheaply live update `is-followed` narrow, we
discard any message list or data with that narrow if we
received a message event that changes topic visibility
from or to `FOLLOWED`.
2024-11-05 12:25:28 -08:00
Sahil Batra
dce229ba17 settings: Use new pills UI for DM permission settings.
We now use pills UI for direct_message_initiator_group
and direct_message_permission_group setting.
2024-10-30 12:03:36 -07:00
Sahil Batra
891e58bb1a settings: Fix live-update of setting elements.
Some of the group setting elements were not live-updated
correctly since they were not present in realm_settings
dict and sync_realm_settings is only called for settings
present in that dict.
2024-10-30 12:03:36 -07:00
Vector73
ed5638ec3c settings: Add can_move_messages_between_topics_group realm setting.
Added `can_move_messages_between_topics_group` realm setting to replace
`edit_topic_policy`.
2024-10-29 16:27:04 -07:00
evykassirer
35424adcc3 settings_account: Convert module to typescript. 2024-10-29 14:50:25 -07:00
sanchi-t
a29b6485d6 delete_sub: Do not remove archived stream when deactivated.
Stream is simply marked as `archived: true` instead of removing
the stream from `sub_store` and `stream_info`.

A check in `subscribe_myself` is added before subscribing to a
stream.
2024-10-25 16:06:42 -07:00
sanchi-t
fa268877d3 stream: Show (archived) at the end of deactivated stream names.
When a stream is deactivated the title area and messages are
re-rendered to update the stream name with `(archived)` suffix.
2024-10-25 16:06:42 -07:00
Aman Agrawal
eab9a3e552 message_events: Refresh is-followed narrow on topic visibility update.
This adds live update support for `is-followed` narrow. We need
to render the narrow again instead of just adding the relevant
messages from the updated topic since it not easy to determine
which message we need to add based on the selected message of the
user and which messages to ask from the server.
2024-10-23 11:50:25 -07:00
Sahil Batra
89d0ad1d60 user_group_edit: Add support to update subgroups of existing groups. 2024-10-22 10:23:36 -07:00
Prakhar Pratyush
b8e0e08f01 realm_export: Add 'Export permissions' table.
This commit adds a "Export permissions" table
in the 'Data exports' setting panel.

The table lists the active human users and their
configuration of 'allow_private_data_export' setting.

Fixes part of #31201.
2024-10-21 17:42:52 -07:00
Vector73
1be0cb1b75 settings: Add can_move_messages_between_channels_group realm setting.
Added `can_move_messages_between_channels_group` realm setting to replace
`move_messages_between_streams_policy`.
2024-10-16 14:26:18 -07:00
Vector73
f733ab112c settings: Add can_add_custom_emoji_group realm setting.
Added `can_add_custom_emoji_group` setting to replace `add_custom_emoji_policy`.
2024-10-13 16:09:04 -07:00
Prakhar Pratyush
3314c89288 realm: Add maximum file size upload restriction.
This commit adds a restriction to the maximum file size
that can be uploaded to a realm based on its plan_type.
2024-10-11 17:16:48 -07:00
Prakhar Pratyush
808acc9e47 events: Migrate plan_type & upload_quota to update_dict event format.
'realm_upload_quota_mib` is updated when `plan_type` changes.

Earlier, we were including 'upload_quota' to update
`realm_upload_quota_mib` in extra_data field of 'realm op: update'
event format when property='plan_type'.

This commit migrate those two parameters to `realm op: update_dict`
event format.

* None of the clients processes these fields, so no compatibility
  code required.
* Renamed `upload_quota` to `upload_quota_mib` as it better aligns
  with our goal to encode units in the client-facing API names.
  Also, it helps to avoid extra code to update 'realm_upload_quota_mib`
  in web client, web client simply aligns with
  'realm["realm_" + key] = value'.
2024-10-11 17:16:48 -07:00
Shubham Padia
b7764eb6f0 settings: Remove user_group_edit_policy from the frontend. 2024-10-01 17:35:14 -07:00
Vector73
66113365a5 saved_snippets: Add new feature for saved snippets.
Fixes #31227.
2024-10-01 11:48:15 -07:00