Commit Graph

63435 Commits

Author SHA1 Message Date
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
Prakhar Pratyush
ebf1438640 message_edit: Update check_message_update to use queue_event_on_commit.
Earlier, we were using 'queue_json_publish' in 'check_message_update'
which can lead to a situation where we enqueue event but the
transaction fails at a later stage.

Events should not be sent until we know we're not rolling back.
2024-12-04 12:14:23 -08:00
Sahil Batra
74f7488009 user_groups: Refactor code creating group objects for creation events.
This commit refactors code to use a loop over GROUP_PERMISSION_SETTINGS
for adding setting values to the group objects sent in group creation
events.
2024-12-04 12:11:52 -08:00
opmkumar
5eb51e2df6 message_edit: Add message length limit indicator in edit message UI.
Adds a message length limit indicator similar to the one in the compose box.
The tooltip message for the disabled save button now appears dynamically
based on whether the message exceeds the length limit or the editing time
has expired.

Fixes #25271.
2024-12-04 11:44:51 -08:00
opmkumar
88727862b4 compose: Refactor functions for handling max length limits.
Refactors `check_overflow_text` and `validate_message_length` functions.
This commit ensures that there won't be any change in the existing UI
of the compose box with the refactoring of the above functions.
2024-12-04 11:44:51 -08:00
opmkumar
7c53e8c90b compose: Replace $("textarea#compose-textarea") with $textarea.
Replaces the $("textarea#compose-textarea") selector with $textarea in
the `check_overflow_text` and `validate_message_length` functions. This
change allows $textarea to be modified in future commits to also support
the edit-message UI.
2024-12-04 11:44:51 -08:00
opmkumar
aac07e913b compose: Rename function set_message_too_long.
Renames function `set_message_too_long` to
`set_message_too_long_for_compose` in `compose_validate.ts`.
2024-12-04 11:44:51 -08:00
opmkumar
0055633002 css: Add general class names for improved extensibility.
Adds general class names in `compose.hbs` so that these elements can be
more easily expanded for use in the edit message UI as well. These
classes will be used in the `check_overflow_text` function of
`compose_validate.ts`, allowing this function to handle both the edit
message UI and compose box UI.
2024-12-04 11:44:51 -08:00
opmkumar
f2e30f4354 css: Refactor border colors for .new_message_textarea.over_limit.
This change moves the border color for `.new_message_textarea.over_limit`
to CSS variables.
2024-12-04 11:44:51 -08:00
Alya Abbott
5d710ec4c5 portico and help: Link to guide to choosing a team chat app.
Also reorder other links, and adds Why Zulip to help center nav.
2024-12-04 11:39:12 -08:00
Anders Kaseorg
7143e6910d test_classes: Refine assert_json_success output with exception chaining.
Now a failure from assert_json_success and friends shows the full
server-side traceback from the JsonableError that caused the failure,
not just the test-side traceback for `AssertionError: 400 != 200 :
{message}`.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-04 11:38:45 -08:00
Sahil Batra
3319a192d4 realm: Allow various settings to be set to "Nobody" group.
We now allow setting following settings to "Nobody" group -
- can_add_custom_emoji_group
- can_create_groups
- can_create_public_channel_group
- can_create_private_channel_group
- can_delete_any_message_group
- can_delete_own_message_group

We are fine with nobody having these permissions as there
will be no major challenges for working of the organization
with these settings and admins anyways will always have
permission to change these settings.

Fixes #32401.
2024-12-04 11:15:18 -08:00
Sahil Batra
b675e95695 stream-settings: Allow nobody group for can_remove_subscribers_group.
We can allow nobody group since admins always have permission to
remove subscribers.
2024-12-04 11:15:18 -08:00
Sahil Batra
367a0bdbff groups: Remove id_field_name field from GroupPermissionSetting.
id_field_name was being used only to set the initial dummy
values for realm settings. We can directly add "_id" to the
setting name instead of having an extra id_field_name field.
2024-12-04 11:15:17 -08:00