Commit Graph

62373 Commits

Author SHA1 Message Date
evykassirer
9fcc41d85c compose: Scale compose banner close button with info density setting. 2025-01-07 12:52:12 -08:00
Tim Abbott
dfad896f6b api docs: Fix a broken link anchor. 2025-01-07 12:28:12 -08:00
Sahil Batra
08809ec756 api-docs: Extract component for old/new block in group setting update. 2025-01-07 12:17:37 -08:00
Sahil Batra
a5e5a010fe stream-events: Handle update events for deprecated properties.
We just do nothing and avoid any warnings for update events
received for "stream_post_policy" and "is_announcement_only"
properties.
2025-01-07 12:17:37 -08:00
Sahil Batra
1175467d45 stream-settings: Remove code related to stream post policy. 2025-01-07 12:17:37 -08:00
Sahil Batra
b4b571d60c streams: Remove stream_post_policy field from Stream. 2025-01-07 12:17:37 -08:00
Sahil Batra
8d6a8f8833 streams: Remove API support for changing stream_post_policy. 2025-01-07 12:17:36 -08:00
Sahil Batra
bbf43a2866 stream-settings: Use new "can_send_message_group" setting. 2025-01-07 12:17:36 -08:00
Sahil Batra
82781d3281 streams: Send message on changing stream posting permission. 2025-01-07 12:17:35 -08:00
Sahil Batra
1d7a77b9a8 streams: Pass stream_post_policy value according to the group setting.
The stream and subscription objects now have stream_post_policy value
set according to the can_send_message_group setting representing the
superset of users who have permission to post in the channel.
2025-01-07 12:17:09 -08:00
Sahil Batra
33d9536440 import: Set can_send_message_groups on import.
For import from Rocket.Chat, we set the channel
posting policy to "Admins and moderators" only
for Rocket.Chat channels that are read-only.

This commit adds the code to set the new group
setting accordingly.
2025-01-07 12:17:09 -08:00
Sahil Batra
2d09cd899e message: Use new setting for checking stream posting permissions. 2025-01-07 12:17:09 -08:00
Sahil Batra
101e94b052 streams: Add group based setting to control posting permissions. 2025-01-07 12:17:07 -08:00
Tim Abbott
3aa2671679 api docs: Document mentions more completely. 2025-01-07 12:14:01 -08:00
Sahil Batra
fa099f7ce7 mention: Allow silent mentioning system user groups.
Previously, we do not allow mentioning system user groups
at all. Now we want to use silent mention syntax for system
groups in the message sent when updating the posting permission
for a stream, so it is important to allowing silent mentioning
system groups at least. And there is no problem in allowing
silent mentions of system groups for all users.

We do not allow mentioning system groups as can_mention_group
for them is set to "Nobody" group.
2025-01-07 11:28:44 -08:00
Saubhagya Patel
aa8f47774f settings: Validate the Name input field while editing a user or a bot.
This commit adds a validation step that disables the Submit
button in the Manage user tab and the Manage bot tab
when the Name input field is empty.

Fixes #22904.
Co-authored-by: Alessandro Campagna <alecostacamp@gmail.com>
2025-01-07 09:52:48 -08:00
Sahil Batra
fc92365968 stream-settings: Fix FORMAT_ERROR during stream creation.
We were not passing the required variables in
render_stream_settings in add_sub_to_table and that
resulted in FORMAT_ERROR.

We actually do not need to append the html from
render_stream_settings here as we already handle
opening the stream settings using open_edit_panel_for_row,
so we remove that code.
2025-01-07 09:48:25 -08:00
Aman Agrawal
3d513720cb recipient_row: Add icon to open topic popover. 2025-01-07 09:47:25 -08:00
Aman Agrawal
c2df278f6d recent_view: Fix Load more not working after fetching 50k messages.
We do another fetch for `recent_view_fetch_more_batch_size` after
reaching 50k limit each time `Load more` is pressed.
2025-01-07 09:46:58 -08:00
Aman Agrawal
b2151a333d recent_view: Fix UI fails to update when marking messages read.
When bulk marking messages as read, it can happen that the
there are less number of rows visible than the current `row_focus`.
This can lead to an error in the updated code here which results
in the bulk mark as read operation from successfully updating
the UI.
2025-01-07 09:46:58 -08:00
Steve Howell
f9b7def098 custom lint checks: Avoid direct calls to rewire setters. 2025-01-07 09:43:33 -08:00
Steve Howell
d0a2320edd stream_search test: Avoid leaky mocking. 2025-01-07 09:43:33 -08:00
Steve Howell
b1a883ecf9 search test: Use override_rewire for is_using_input_method. 2025-01-07 09:43:33 -08:00
Steve Howell
008f529555 narrow_local test: Introduce test_fixture helper.
We also use override_rewire in a couple places.
2025-01-07 09:43:33 -08:00
Steve Howell
9f952563e3 message_events tests: Avoid top-level override. 2025-01-07 09:43:33 -08:00
Steve Howell
3895e91b23 hotkey tests: Make processing_text mocks more granular. 2025-01-07 09:43:33 -08:00
Steve Howell
6a4102f9fa lint: Add cjs suffixes to JS checks. 2025-01-07 09:43:33 -08:00
Steve Howell
8583e64037 util node tests: Prevent Intl.ListFormat leaks.
These never happen in practice since util is near the
end of the alphabet, but if you had run the tests in
reverse order, you would have seen this leak.

This leak was introduced in the efb2a5a38d commit.
2025-01-07 09:43:33 -08:00
Steve Howell
b87d64cd8a node test runner: Prevent Handlebars quirks.
We re-require templates.ts before testing each
new test module during the node tests.

This makes it so that if we make mocks in two
different tests, where such mocks influence
how the Handlebars helpers work, then both
tests will have registered their own copies
of the Handlebars helpers.
2025-01-07 09:43:33 -08:00
Steve Howell
09716c624f settings_user_topics test: Use explicit override for sorting.
In general we want to mimimize the amount of setup at the top
of a test module and just let individual tests explicitly
mock what they need to mock.

The `override` helper has the advantage that it avoids dead
code.  For example, if the way we invoked the list widget
here no longer required sorting, the unit tests would complain
about the crufty override, whereas the previous code doesn't
really have that kind of future-proofing.
2025-01-07 09:32:52 -08:00
Steve Howell
9a7efc88f2 settings_profile_fields test: Add mocking helper.
We now only explicitly mock the list_widget in a single test,
and we don't need to stub out the sorting functions.
2025-01-07 09:32:52 -08:00
Steve Howell
43207d37af alert_words_ui test: Excercise the template. 2025-01-07 09:32:52 -08:00
Steve Howell
47b4b4a506 alert_words_ui test: Avoid bizarre idioms.
We now just do the following in the mocking:

    - capture which items are passed into the list
      widget

    - simulate the call to modifier_html to exercise
      the template rendering
2025-01-07 09:32:52 -08:00
Alya Abbott
fd802e74ce help and api docs: Modernize and expand introduction to integrations. 2025-01-07 09:30:56 -08:00
evykassirer
9a4c5bc1a0 recent: Use em for recent view filter widget width. 2025-01-07 09:29:17 -08:00
evykassirer
2c351d8a23 inbox/recent: Use em for dropdown menu. 2025-01-07 09:29:17 -08:00
evykassirer
a8d0d462fb inbox: Use em for filter and search boxes. 2025-01-07 09:29:17 -08:00
evykassirer
0df487c4f3 inbox: Remove unused button-inbox-filter selector.
Removed in f191efce1b
2025-01-07 09:29:17 -08:00
evykassirer
f0e06f08ec inbox: Remove extra width on inbox table.
This was causing the table to be 2px wider than the filter box,
at all font sizes.
2025-01-07 09:29:17 -08:00
evykassirer
3ce65a3e52 inbox: Use base font size for inbox view. 2025-01-07 09:29:17 -08:00
Shubham Padia
0b4fe15c8a mention: Mentions via subgroup should be highlighted.
This commit does not add highlighting to any pre-existing group mentions
for which a user was part of the mentioned group via a subgroup. This
only fixes it for mentions moving forward.
Fixes https://chat.zulip.org/#narrow/channel/9-issues/topic/group.20mention.20not.20highlighted/near/2008541
2025-01-06 16:53:21 -08:00
opmkumar
3b3ab05f67 cron: Add cron job logic to delete fully deactivated realms.
Fixes #32763.
2025-01-06 16:10:14 -08:00
Alex Vandiver
ac7bdc73bb upload: Use the returned JSON from the server for filename and URL. 2025-01-06 15:25:32 -08:00
Alex Vandiver
b61b9876fa dependencies: Update @uppy/core and @uppy/tus. 2025-01-06 15:25:32 -08:00
Alex Vandiver
3f00d3d493 upload: Use Uppy's "onBeforeFileAdded" to allow duplicate file uploads.
Using `uppy.removeFile` is incompatible with where the upload-success
callback is moved to in @uppy/tus 4.1.4.
2025-01-06 15:25:32 -08:00
Alex Vandiver
2d758951b4 upload: Immediately re-enable send after upload completes.
Do not make the user wait for the animation + 100ms to click "send."
2025-01-06 15:25:32 -08:00
Saubhagya Patel
2991ed03e0 user_profile: Hide error when receiving a successful response.
When editing a user or bot profile via the Manage User or Manage
Bot overlay, an error was not hidden after receiving a successful
response from the server. This commit ensures the error is hidden
upon a successful response.
2025-01-06 15:04:49 -08:00
evykassirer
c4542df0d7 compose: Set a min-height before showing preview area.
Changes in #32695 wrongly assumed the preview box can only
expand from the composebox, but for some situations like links
it can also have a preview block that is less high than the raw text.

Reported on CZO:
https://chat.zulip.org/#narrow/channel/9-issues/topic/Preview.20breaks.20when.20the.20compose.20box.20is.20expanded.20by.20itself.2E/near/2029447
2025-01-06 14:59:51 -08:00
evykassirer
d4a130d88d buddy_list: Use 0.75 opacity for the user counts.
Discussed here:
https://chat.zulip.org/#narrow/channel/101-design/topic/right.20sidebar.20heading.20dot/near/2013034
2025-01-06 12:30:46 -08:00
evykassirer
ae805763bc compose: Use an icon for the mac command hotkey hint. 2025-01-06 11:29:38 -08:00