Commit Graph

61998 Commits

Author SHA1 Message Date
Saubhagya Patel
181f5121fb popovers: Hide left sidebar actions popover for empty topics.
This commit changes the behavior of the topic actions popover
(displayed from the left sidebar via the `...` menu) to no
longer appear for empty topics (topics with no messages).
Instead, a message is displayed: "There are no messages in
this topic.", along with the topic visibility options and
the name of the topic.

Fixes: #32098.
2024-12-06 13:09:12 -08:00
Emil Grehn
57c8120a09 message_forwarding: Fix bug with forward message in combined feed.
Forward message previously didn't open the recipient dropdown
when forwarding from the combined feed.

This commit will also make the messages keep their original
channel or pm-recipient when forwarding from combined feed, to
be consistent with the behavior in the rest of the app.
2024-12-06 11:59:44 -08:00
Emil Grehn
06aab30133 message_forwarding: Make forward message keep original topic by default. 2024-12-06 11:59:44 -08:00
evykassirer
3910211518 buddy_list: Add ellipses cutoff for headers that overflow.
This is mostly for translations.
2024-12-06 11:55:57 -08:00
Alya Abbott
253e7d5dff help: Add a page on managing a user's group membership. 2024-12-06 11:54:16 -08:00
Alya Abbott
cdf31ae5d5 help: Update permissions note for subscribing users to channels. 2024-12-06 11:54:16 -08:00
Maneesh Shukla
d3e74f62e7 presence_data: Add fallback logic for date_joined. 2024-12-06 11:50:31 -08:00
Sahil Batra
118e6c36f8 message_send: Fix checking permission to send DMs.
This commit fixes the code to add a check for whether the
setting is set to an anonymous group or not before checking
if the setting is set to "Nobody" group by checking the
group name.
2024-12-06 09:23:45 -08:00
Prakhar Pratyush
3bad36ef8c queue: Rename queue_json_publish to queue_json_publish_rollback_unsafe.
This commit renames the 'queue_json_publish' function to
'queue_json_publish_rollback_unsafe' to reflect the fact that it doesn't
wait for the db transaction (within which it gets called, if any)
to commit and sends event irrespective of commit or rollback.

In most of the cases we don't want to send event in the case of
rollbacks, so the caller should be aware that calling the function
directly is rollback unsafe.

Fixes part of #30489.
2024-12-06 09:23:02 -08:00
bedo
1847086044 subscription: Remove unnecessary select_related fields and clean up.
Removes the unnecessary fields from bulk_access_users_by_email and
bulk_access_users_id, while also removing duplication of these lists
of fields.

"base_bulk_get_user_queryset", used when fetching a user
other than the acting user.

"base_get_user_queryset", used when fetching the acting user,
prefetching more fields.

There remains some inconsistency in the models.py functions that may
merit further investigation.
2024-12-05 17:02:07 -08:00
Anders Kaseorg
7466ee977f empty_feed_notice: Update “stream” to “channel”.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-05 16:54:38 -08:00
evykassirer
e36971c7e1 sidebars: Use pixels for the sidebar spacing.
This, as well as increasing the spacing by 5px, ensures that the left
sidebar bottom elements aren't overlapped by URLs that the browser
shows in the corner when hovering links.
2024-12-05 16:42:54 -08:00
evykassirer
2fdb47ab4d right_sidebar: Shrink invite user icon to line up text. 2024-12-05 14:33:23 -08:00
evykassirer
6fdc316205 right_sidebar: Support multi-line text for view users and invite users.
This is important for translations.
2024-12-05 14:33:23 -08:00
evykassirer
114b4014f8 sidebars: Use smallcap font for more links. 2024-12-05 14:33:23 -08:00
evykassirer
5580560855 right_sidebar: Shorten invite copy.
We need it to be shorter to fit on one line after we switch
to small caps.
2024-12-05 14:33:23 -08:00
evykassirer
5d05aad8b5 right_sidebar: Create variable for header left spacing.
This is about to be used for another component as well.
2024-12-05 14:33:23 -08:00
evykassirer
e1fcbba124 right_sidebar: Remove right padding to give buddy list more space.
There is still some space from the browser scrollbar, and the
buddy list is no more to the right than the profile edit button
in the top right corner, so this shouldn't cause any issues.
2024-12-05 14:33:23 -08:00
evykassirer
d25a22802c right_sidebar: Line up header three-dot menu with row menus buttons.
As discussed here:
https://chat.zulip.org/#narrow/channel/101-design/topic/invite.20users.20link.20in.20right.20sidebar.20.20.2332332/near/1988651
2024-12-05 14:33:23 -08:00
Alex Vandiver
94afe1b6ff export_search: Allow filtering by channel. 2024-12-05 14:26:12 -08:00
Anders Kaseorg
e20e2f4883 outgoing_webhook: Optimize can_access_sender computation.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-05 14:25:16 -08:00
Anders Kaseorg
76df4b2574 message_cache: Require can_access_sender for finalize_payload.
An access control parameter should never be optional with a default of
open.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-05 12:07:22 -08:00
roanster007
8aad10b720 narrow: Update with operator behaviour when message not accessible.
Previously, when the message of the "with" operator can not be
accessed by the user, it used to return messages in combined feed
or stream feed.

This commit updates it to rather raise a BadNarrowOperatorError
if the message of "with" operand is not accessible to user, and the
narrow terms present can not define a conversation. However, if
the narrow terms can define a conversation, then the narrow falls
back to that of without the "with" operator.
2024-12-05 12:03:55 -08:00
Shubham Padia
0575db3ab6 css: Use --color-active-row-modal for settings overlay active rows.
This fixes a bug introduced in f40e1e9ad0
We changed the settings overlay container background color in that
commit, from hsl(0deg 0% 98%) to #ededed. #ededed is same as
hsl(0deg 0% 93%). The latter is the exact same color for stream and
group row active background. While we changed the settings overlay
background color, we did not change the active row color for stream and
group rows.
Fixes https://chat.zulip.org/#narrow/channel/9-issues/topic/Lack.20of.20highlighting.20of.20selected.20group.2E/near/1993630
2024-12-05 10:36:34 -08:00
Sahil Batra
9be0eee446 group-settings: Live update membership status text on subgroup update.
This commit adds code to live update the membership status text
if subgroups of a group, either the active group or one of the
subgroup of active group.

Fixes #32485.
2024-12-05 10:35:41 -08:00
Sahil Batra
cbada036a9 user-groups: Live update membership status text.
This commit adds code to live update the membership status text
when a user is added or removed from a group that is subgroup
of the group opened in the right panel of groups UI.
2024-12-05 10:35:41 -08:00
Sahil Batra
ded36004bb group-settings: Show membership details in right panel.
We now mention if user is member of the group in the "Members"
tab, also including the details about whether the user is direct
member or is member by being direct member of one of the subgroups.
2024-12-05 10:35:41 -08:00
Shubham Padia
0091add9c1 user_group_edit: Move tab key check to update groups list function. 2024-12-05 09:52:32 -08:00
Shubham Padia
3d1d9180c2 streams: Use can_manage_default_streams to check permissions.
Although, right now, the function only checks if a user is realm admin,
it will still be beneficial to use can_manage_default_streams for when we
might have granular permissions for that. I've used a decorator for
endpoints where this function was applicable, since that seemed nicer to
use compared to inserting a function in each of the endpoints.
The added test ensures that we get test coverage on the new decorator.
2024-12-05 09:51:46 -08:00
Anders Kaseorg
0686d462e0 webpack: Remove doubled slash from module path.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-05 00:20:54 -08:00
Tim Abbott
858b93f588 settings_config: Allow using new user list style in production.
We've fixed the various issues that made us leave this disabled by
default.
2024-12-04 23:10:33 -08:00
Emil Grehn
74f1b505ba message_quoting: Rename help page to "Quote or forward a message".
Move the page to /help/quote-or-forward-a-message and
add a url redirect from the old url.

Fixes #31953
2024-12-04 22:25:14 -08:00
Emil Grehn
f9b95bd4f3 message_quoting: Add a "Forward message" option below "Quote message".
Forward message starts a new message with the quoted context
(message or selection).
The compose box opens with then channel picker open and no topic.

Also added documentation about this feature in the help center.

Fixes part 2 of #31953
2024-12-04 22:25:14 -08:00
Emil Grehn
8e9d581746 message_quoting: Rename 'quote_and_reply' to 'quote_message'.
To be consistent with the new naming in the app
'quote_reply' was also renamed to 'quote_message'

Fixes part of #31953
2024-12-04 22:25:14 -08:00
Emil Grehn
58d91dacd5 message_quoting: Rename 'Quote and reply' to 'Quote message'.
'Quote message' is a more accurate decription, as this option inserts
the quoted text into whatever message you're composing or editing;
it does not necessarily start a new reply.

Fixes first part of #31953.
2024-12-04 22:25:14 -08:00
Sahil Batra
08c8bf376d version: Bump API_FEATURE_LEVEL.
This change was missed in 367a0bdbff (#32567).
2024-12-04 22:17:03 -08:00
Aman Agrawal
a6aef4f41b message_fetch: Check for empty narrow to show empty narrow banner. 2024-12-04 16:16:25 -08:00
Aman Agrawal
40eda337f9 message_fetch: Populate rendered message lists with all_messages_data.
This will help us provide more messages in the current narrow for the
user after a reload without any extra server queries.
2024-12-04 16:16:25 -08:00
Aman Agrawal
107559b1bb message_fetch: Fetch again if the view is not scrollable.
If the initial fetch for the narrow didn't return enough data for
the view to becomes scrollable, we should try to populate the narrow
with more messages.
2024-12-04 16:16:25 -08:00
Aman Agrawal
dc63415c9d message_fetch: Allow fetching more messages for combined feed.
Since `all_messages_data` is no longer the data for combined feed,
we need to treat combined feed like any other view and continue
fetching messages if required.
2024-12-04 16:16:25 -08:00
Aman Agrawal
a18b7f760d message_list: Avoid unnecessary rerenders on adding messages. 2024-12-04 16:16:25 -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
Shubham Padia
08e1a44ce6 user_group: Use Intl.listformat instead of manually inserting commas.
In some other languages, ", " isn't the best way to do a list and
Intl.listformat is a better choice in those cases.
2024-12-04 16:02:20 -08:00
Shubham Padia
3f5fe756bb test_events: Loop over stream permission group settings. 2024-12-04 12:26:17 -08:00
Shubham Padia
173c09e32b stream_events: Loop over stream group settings for update_property. 2024-12-04 12:26:16 -08:00
Shubham Padia
a5a56be15b settings_components: Loop over group permission settings. 2024-12-04 12:25:19 -08:00
Shubham Padia
d9c413d0ff stream: Loop over stream group settings for tracking changes. 2024-12-04 12:25:19 -08:00
Shubham Padia
0cc200e573 stream: Only realm admins can change default channels. 2024-12-04 12:25:19 -08:00
Prakhar Pratyush
4bef1a510c handle_missedmessage_emails: Update codepath to queue event on commit.
Earlier, in 'handle_missedmessage_emails' codepath we were using
'queue_json_publish' which can lead to a situation where we enqueue
events but the transaction fails at a later stage.

Events should not be published until we know we're not rolling back.
2024-12-04 12:14:23 -08:00
Prakhar Pratyush
f0cbce564d realm_export: Use queue_event_on_commit helper function.
This commit replaces
transaction.on_commit(lambda: queue_json_publish("deferred_work",event))
with
queue_event_on_commit("deferred_work", event)

This change utilizes the helper function queue_event_on_commit,
which abstracts the transaction.on_commit logic and improves
maintainability.
2024-12-04 12:14:23 -08:00