Commit Graph

61540 Commits

Author SHA1 Message Date
evykassirer 8eb0ca3a7c settings_account: Move async call into ui_init. 2024-10-29 14:50:25 -07:00
evykassirer 7431d87d0c settings_account: Fix type for failure_msg_html (undefined). 2024-10-29 14:50:25 -07:00
evykassirer a6850410a8 settings_account: Use `this` instead of event target.
The first two are equivalent because they call `closest`
and the last one is directly equivalent. We're making these
changes to aid with the conversion to typescript.
2024-10-29 14:50:25 -07:00
evykassirer adf3280f1e settings_acount: Standardize type passed to update custom fields. 2024-10-29 14:50:25 -07:00
Sahil Batra caf919fca2 user_groups: Don't allow adding deactivated groups as subgroups in UI.
We already have the code to ignore the deactivated groups before
sending the request and show appropriate message. This commit
just adds code to not show them in the typeahead and also not
create its pill if user types the full group name.
2024-10-29 11:02:03 -07:00
Sahil Batra 69c0a772cc user_groups: Do not allow manually entering pills of invalid subgroups.
Even though we do not show groups that cannot be used as subgroups
in typeahead, user can still type the complete to get the pill
and make the request to the server which currently returns not so
good error message. This commit fixes it to not create the pill for
such cases and hence not making any request to server.
2024-10-29 11:02:03 -07:00
Sahil Batra 98ed8d8f49 add_subscribers_pill: Extract function for enabling/disabling the button.
This function will be used to handle the add button in group members
UI as well.
2024-10-29 11:02:03 -07:00
Sahil Batra 98255677d7 user_groups: Extract function to check if group can be used as subgroup.
We would use the same function in further commit to not add pills
for invalid subgroups by typing the full group name.
2024-10-29 11:02:03 -07:00
Aman Agrawal 5cdd17a7f1 unread_ops: Fix channel narrow not marked unread.
Mark as unread from here was not working in a channel feed when
we don't have all the messages fetched locally since the
channel ID was incorrectly passed as a string.

Copied the correction code from bulk_update_read_flags_for_narrow.
2024-10-29 10:48:48 -07:00
Aman Agrawal 4e00fb1d67 unread_ops: Remove unused parameters. 2024-10-29 10:48:48 -07:00
Mateusz Mandera d708a1bea5 tests: Fix order of mock.patch in use_s3_backend.
This is a somewhat hacky and fragile fix. Due to the order in which
imports seem to happen, the original ordering breaks
RealmImportExportTest: if one of the `use_s3_backend` tests runs before
test_import_realm, the latter will fail while processing thumbnailing,
as S3UploadBackend ends up leaking and
zerver.worker.thumbnail.upload_backend is still set to S3.

By making that mock.patch the first one that gets entered, and thus the
last one to get cleaned up, we fix the leak and upload_backend is set
back to LocalUploadBackend as it should.
2024-10-29 10:43:10 -07:00
Karl Stolley eb31fdbe3c buttons: Shore up styles on a.button instances. 2024-10-29 10:41:32 -07:00
Karl Stolley aaaa52c5c0 buttons: Ensure active buttons take .button:active background color. 2024-10-29 10:41:32 -07:00
Sahil Batra 6264d59ea7 help: Add tip mentioning who can join the group. 2024-10-29 10:38:52 -07:00
Alya Abbott de5a9d13c1 channel settings: Remove extraneous channel name from modal. 2024-10-27 22:03:30 -07:00
Alya Abbott 29b2eeb3b3 help: Improve documentation about starting a new conversation.
Document new ways to do it from the left sidebar.
2024-10-25 16:41:29 -07:00
Aman Agrawal 1de1570a0c narrow_state: Extract cannot compute response. 2024-10-25 16:33:00 -07:00
sanchi-t 88082bc25b help: Basic update to archiving channels. 2024-10-25 16:06:43 -07:00
sanchi-t 1577d45575 compose_validate: Show error banner for archived streams. 2024-10-25 16:06:43 -07:00
sanchi-t c73038edea streams: Restrict access to archived streams. 2024-10-25 16:06:43 -07:00
Sanchit Sharma 795b2ba14e do_deactivate_stream: Remove unnecessary mutations.
Streams should not be marked as private, and subscribers
of the deactivated stream should not be removed.

Update the confirmation message when archiving a stream.
2024-10-25 16:06:42 -07:00
sanchi-t f04fb937a3 narrow: Remove blueslip error code line.
When clicking on a message from an archived
stream, the `adjusted_terms` may be null since
archived streams are not sent back to the client.
This results in an error for the user.
2024-10-25 16:06:42 -07:00
sanchi-t e60711f871 stream_create: Add functionality to rename archived streams.
Users with appropriate permissions will now have the option
to rename archived streams.
2024-10-25 16:06:42 -07:00
sanchi-t 5dfa8ac9fe popover_menus_data: Hide actions user can't take for archived channels. 2024-10-25 16:06:42 -07:00
sanchi-t e8bb9e2de1 get_invite_stream_data: Do not display archived channels.
User should not be able to sent invite for archived channels.
2024-10-25 16:06:42 -07:00
sanchi-t dbc90ba2e5 stream_list: Prevent archived channels to show up in left sidebar. 2024-10-25 16:06:42 -07:00
sanchi-t 4b90741f91 can_post_messages_in_stream: Add condition check for archived streams.
Prevents users from sending any message in an archived stream.
2024-10-25 16:06:42 -07:00
sanchi-t 7e97358c35 home: Update `client_capabilities` for viewing of archived streams. 2024-10-25 16:06:42 -07:00
sanchi-t f257188ab5 sub_store: Remove unused function `delete_sub`.
Function `delete_sub` was exclusively called by `stream_data.delete_sub`.
With the change in the approach where we no longer remove subscriptions
from `stream_info` and `subs_by_stream_id`, the `delete_sub` function is no
longer needed.
2024-10-25 16:06:42 -07:00
sanchi-t 5ce2b307c4 stream_info: Remove now-unused function `delete`.
Previously, when archiving a stream `delete` function was used to
remove stream from `stream_info`. However, with the current
approach, we don't remove stream instead  we use the `set_false`
function to mark streams as false, making the `delete`
function unnecessary.
2024-10-25 16:06:42 -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
sanchi-t 616e39c290 stream_data: Make `Subscribe` button not visible for archived streams. 2024-10-25 16:06:42 -07:00
sanchi-t a917215292 get_subs_for_settings: Exclude archived streams from `All Streams` menu.
Don't display stream settings for archived channels.
2024-10-25 16:06:42 -07:00
sanchi-t ca9ac293f3 sub_store: Add `is_archived` field to `Stream` type. 2024-10-25 16:06:42 -07:00
sanchi-t af7ebde9e4 subscription: Include archived channels in streams list.
`is_archived` field is added to the stream and types.

Include a new `archived_channeels` client capability, to allow clients
to access data on archived channels, without breaking
backwards-compatibility for existing clients that don't know how to
handle these.

Also, included `exclude_archived` parameter to `/get-streams`,
which defaults to `true` as basic clients may not be interested
in archived streams.
2024-10-25 16:06:40 -07:00
sanchi-t c6fc25e5df do_deactivate_stream: Do not rename streams during archiving.
Functions related to archived streams are also updated.
2024-10-25 15:56:04 -07:00
sanchi-t e25bbe1005 migration: Rename previously archived streams to their original names.
As several archived streams may have the same new name,
it is essential to verify whether any stream, regardless
of its current status (active or archived), already has that name
before executing any renaming operation.
2024-10-25 15:56:04 -07:00
Karl Stolley 40da0e44fb squash: Experiment with less intense modal border colors. 2024-10-25 15:39:13 -07:00
Karl Stolley 2c78efc3c5 settings: Improve layout and appearance of Organization logo area. 2024-10-25 15:39:13 -07:00
Karl Stolley 8c90c9d68d modals: Set new background, border colors. 2024-10-25 15:39:13 -07:00
Karl Stolley cd1f58080b left_sidebar: Put the New DM button to the right of All DMs. 2024-10-25 15:24:20 -07:00
Karl Stolley 9e8d908a37 left_sidebar: Show Direct Messages controls on DM area hover. 2024-10-25 15:24:20 -07:00
Pratik Chanda 34ff1de338 left_sidebar: Hide new topic button on restricted compose permission.
Earlier, in left stream sidebar, new topic button was shown for all
stream rows irrespective of compose permission of the user for
individual streams.

This commit changes the behaviour by hiding the new topic button if
user doesn't have appropriate compose permission for individual
streams.

Fixes: zulip#31800.
2024-10-25 16:32:44 -05:00
Tim Abbott d8cf3ff2e9 ci: Run production suite when changing storage.py. 2024-10-25 10:59:57 -07:00
Tim Abbott 71d81484ad storage: Simplify system bot avatar logic. 2024-10-25 10:59:57 -07:00
PieterCK c3017e55d2 storage: Rework static avatar files hashing logic.
Previously, the hashing logic for static avatar files hashed the default
and medium files separately, which didn’t match how user-uploaded
avatars work—where you just add the "-medium.png" suffix to get the
medium version. Since we don’t have clear documentation for avatars yet,
this caused some issues for the mobile apps.

This commit makes sure the default and its medium variation share the
same hash.
2024-10-25 09:36:52 -07:00
Sahil Batra 2109d3d1ab user_group_popover: Remove period after members count. 2024-10-25 08:23:14 -07:00
Shubham Padia fe9952eab5 groups: Rename test to state that it checks allow_system_group.
We also remove the default group check which is already being checked in
do_set_realm_permission_group_setting_to_anonymous_groups_test.
2024-10-24 14:42:21 -07:00
Shubham Padia 1f0906aef7 groups: Remove list specifying group settings with new API format.
All the groups are now following the new API format, making the list
redundant.
2024-10-24 14:42:21 -07:00