Commit Graph

63140 Commits

Author SHA1 Message Date
Mateusz Mandera
ceca2d1e26 migrations: Add migration fixing realm of Attachments.
Old messages with attachments, sent by cross-realm bots, didn't have
the realm set correctly to the target realm, this migration fixes it
by looking at the messages linking to the attachment and setting the realm
based on the recipient.

This is the migration follow-up to
4102816240
2025-02-18 14:46:30 -08:00
evykassirer
65e77d8fd4 typeahead: Use em for image placement.
This is a quicker fix before we convert these styles to grid.
2025-02-18 14:04:01 -08:00
Apoorva Pendse
dece35d066 search: Fix Ctrl+Backspace whitespace removal on typing.
Fixes: #33443.
Co-authored-by: Harsh Bansal <harshbansal8705@gmail.com>
2025-02-18 13:31:17 -08:00
Shubham Padia
89ea21f7f0 stream_data: Use user_has_permission_for_group_setting.
Before this, we were using `is_user_in_setting_group` which does not do
the extra checks around a guest user's permissions (and in future, some
other checks).
We introduced `initialize_and_override_current_user` in stream_data test
to make it easier to set current_user.user_id.
2025-02-18 12:49:05 -08:00
Alex Vandiver
a20f2a9735 import_realm: Skip lock=true when enqueuing thumbnailing.
The `lock=true` parameter fails, since it is not being run inside of a
transaction.  We swap to not using locking, since there is no
correctness requirement for a lock here.
2025-02-18 12:18:23 -08:00
Alex Vandiver
654acaa6cf cache_helpers: Stop pre-filling the non-narrow user cache.
This is simply too time-intensive, at scale, to perform during the
critical period of an upgrade.  The most performance-critical
codepaths (Tornado and presence) have moved to the narrow user cache,
which we continue to pre-fill.
2025-02-18 12:17:54 -08:00
evykassirer
c76a246a8a compose: Use em for sizing and position of stream typeahead icon. 2025-02-18 12:13:24 -08:00
Sahil Batra
cf3315bd18 settings: Correctly handle passing empty anonymous group.
If empty anonymous group is passed for a setting value in
an API request, the setting is set to "Nobody" group.
2025-02-18 10:40:28 -08:00
Anders Kaseorg
dd99ed019a requirements: Upgrade Django from 5.0.10 to 5.1.6.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-18 09:50:34 -08:00
Prakhar Pratyush
22efac5a77 empty_feed_notice: Add support for empty string topic.
Earlier, we were not showing `realm_empty_topic_display_name`
value in the empty_feed_notice.
2025-02-18 09:47:13 -08:00
Prakhar Pratyush
82646c4d96 message_edit: Fix 'stream_and_topic_exist_in_edit_history' for topic="".
This commit fixes the 'stream_and_topic_exist_in_edit_history'
function for empty string topic.

Earlier, `if` statements were not checking toipc===undefined explicitly
resulting in buggy behaviour when topic="".
2025-02-18 09:47:13 -08:00
Prakhar Pratyush
08b1ec7b55 unmute_topic_banner: Fix 'unmute topic' button for empty string topic.
When message is sent in a muted topic (with automatically follow
or unmute topic setting turned off), unmute topic banner is shown.

Earlier, using unmute topic button was resulting in server error
for empty string topic.

This commit fixes the bug.
2025-02-18 09:47:13 -08:00
Prakhar Pratyush
3d2fa9f788 inbox_ui: Fix buggy mark as read for empty string topic.
Earlier, marking empty string topic as read via Inbox UI
resulted in marking the stream as read.

This commit fixes the bug.
2025-02-18 09:47:13 -08:00
Maneesh Shukla
dc95699862 code_playground: Add custom playground options in the default_options list.
Some checks failed
Code scanning / CodeQL (push) Has been cancelled
Zulip production suite / Ubuntu 22.04 production build (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:bookworm, true, false, Debian 12 (Python 3.11, backend + documentation), bookworm) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:jammy, false, true, Ubuntu 22.04 (Python 3.10, backend + frontend), jammy) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:noble, false, false, Ubuntu 24.04 (Python 3.12, backend), noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm, --test-custom-db, Debian 12 production install with custom db name and user, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy, , Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble, , Ubuntu 24.04 production install, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-7.0, 7.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-8.0, 8.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy-6.0, 6.0 Version Upgrade, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-9.0, 9.0 Version Upgrade, noble) (push) Has been cancelled
We can configure a custom playground for any language, including ones
which we don't have in our typeahead suggestions. One might then want to
make that language the default for code blocks, which is now possible
with this commit.

Fixes: #33282.
2025-02-16 17:22:47 -08:00
Shubham Padia
190f59d28e test_message_flags: Refactor assert_bulk_access to be more readable.
Making the query counts keyword arguments makes it more readable
wherever the function is used.
2025-02-16 17:12:30 -08:00
Shubham Padia
dcaf0dd103 stream: Function to check if user is in groups granting content access.
We're going to be adding a new setting called `can_join_group` soon and
it would be good to have this wrapper function ready for it to be used
in.
2025-02-16 17:12:30 -08:00
Alya Abbott
658fb21fc1 updates: Add update message (level=12). 2025-02-16 17:09:04 -08:00
Anders Kaseorg
b50ac9d8df test_tornado: Add nocoverage for task cleanup.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-14 17:04:51 -08:00
kash2104
12f95a81a9 aria-label: Add aria label for vdots in collapsed navigation menu. 2025-02-14 16:41:00 -08:00
kash2104
9c33c00828 aria-labels: Add aria labels for left sidebar 3 dots menu.
Fixes #20284
2025-02-14 16:41:00 -08:00
evykassirer
fc3c755e1d compose: Scale close button with font size. 2025-02-14 16:39:48 -08:00
Maneesh Shukla
2a91ed8631 compose_reply: Add error handling when trying to fetch a message. 2025-02-14 15:54:56 -08:00
Alya Abbott
34f9e8e259 help: Document topic permalinks and group-based permissions. 2025-02-14 15:46:25 -08:00
Alya Abbott
bef2c015ee help: Language tweak for group-based permissions. 2025-02-14 15:46:25 -08:00
Alya Abbott
5ee97a48a6 help: Document permanent topic links.
Also note that channel links are permanent.
2025-02-14 15:46:25 -08:00
Anders Kaseorg
ba43cd1514 requirements: Upgrade asgiref.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-14 15:27:51 -08:00
Anders Kaseorg
3867d29ac8 test_tornado: Remove in_django_thread.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-14 15:27:51 -08:00
Anders Kaseorg
722c1e8999 test_tornado: Remove async_to_sync_decorator.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-14 15:27:51 -08:00
Anders Kaseorg
e769e546b6 tornado: Use Signal.asend.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-14 15:27:51 -08:00
opmkumar
1e99745023 todo_list: Add option for modal to create todo-lists.
A button has been introduced to launch a modal
for creating todo-lists directly from the compose box.

The modal features a form that, upon submission,
generates a message using the `/todo` syntax and the data
inputted in the form. Subsequently, the content of the compose box
is set to this message, which the user can then send.

This modal closely parallels the UI for adding a poll; therefore,
the poll and todo code has been shifted to a newly created
file named `widget_modal.ts`, and `poll_modal.ts` is now deprecated.

Co-authored-by: Sujal Shah <sujalshah28092004@gmail.com>

Fixes #29779.
2025-02-14 14:57:24 -08:00
Tim Abbott
83078aea16 poll_modal: Disable browser autocomplete on question field.
We disable this on most similar inputs, and it is likely more
distracting than helpful.
2025-02-14 14:57:24 -08:00
opmkumar
84fe692370 poll_modal: Set cursor on question field. 2025-02-14 14:32:35 -08:00
opmkumar
bda8c0a45e templates: Change poll icon location to just before ?.
This commit change the location of poll icon into their own
section in the right just before `?`.
2025-02-14 14:32:35 -08:00
Alex Vandiver
72f667fb31 upgrade-zulip: Prevent restarting only Django into inconsistent caching. 2025-02-14 12:03:13 -08:00
Sahil Batra
a1ac49582b streams: Optimize computing users with metadata access.
This commit updates code to optimize computing users who have
metadata access via permission groups so that we do not have
to do DB query for each stream to get recursive members for
the groups having permissions.
2025-02-14 12:00:37 -08:00
Sahil Batra
0d1d805ee5 settings_data: Check server setting in user_can_summarize_topics. 2025-02-14 11:52:28 -08:00
Sahil Batra
956f1742f7 settings: Show different banner for summarization not enabled on cloud. 2025-02-14 11:52:28 -08:00
Vector73
7440444a90 saved_snippets: Move initialization directly to ui_init.ts.
Defer saved snippets dropdown creation until the compose box
is opened for better performance.

Fixes #31831.
2025-02-14 11:51:40 -08:00
Vector73
41430661ee saved_snippets: Fix dropdown state sync across browser tabs.
Currently, when the saved snippets are added or removed the changes
are not properly shown across different browser tabs if the dropdown is
open. This commit fixes this.
2025-02-14 11:51:40 -08:00
Alya Abbott
18a1a1e8e3 docs: Tweak descriptions of Zoom app options. 2025-02-14 10:17:52 -08:00
Shubham Padia
1583e2ed9f settings: Scale filter/button height in settings panel header. 2025-02-14 09:40:57 -08:00
Shubham Padia
2972d97a92 settings: Use only Filter as the placeholder text.
There are cases where the placeholder text overflows outside of the
input box. In the settings panels, all these filter boxes are on the
same row as a subheading on the left side. So the x in `Filter x` is
usually the subheading title, making it redundant to mention the x part.
We have not modified the aria-labels since it might still be helpful for
assistive technologies to have the whole `Filter x` part.
https://chat.zulip.org/#narrow/channel/101-design/topic/setting.20filter.20width
2025-02-14 09:40:57 -08:00
Prakhar Pratyush
9a72a4df03 topic_edit: Show "general chat" placeholder when mandatory_topics=false.
This commit updates the inline topic edit form to always show
the empty string topic placeholder when `mandatory_topics = false`.

It also improves the styling to make it italics.
2025-02-14 09:20:41 -08:00
Prakhar Pratyush
2416fec468 move_topic: Show "general chat" placeholder when mandatory_topics=false.
This commit updates the move topic modal to always show the empty
string topic placeholder when `mandatory_topics = false`.

It also improves the styling to make it italics.
2025-02-14 09:20:41 -08:00
Prakhar Pratyush
86527f2a98 message_edit_history: Fix bugs when empty string topic involved.
Earlier, the message edit history rendered was buggy when
empty string topic was involved.

Example bug:
* Simple topic rename was shown as "Edited" instead of "Moved".

This commit fixes the bugs.
2025-02-14 09:15:07 -08:00
Prakhar Pratyush
dddcd0824e edited_notice: Fix missing "Moved" notice.
When a message was moved from an empty string topic to another
topic, the "Moved" notice beside sender name in the message body
was missing.

This commit fixes the bug.
2025-02-14 09:15:07 -08:00
Lauryn Menard
8561800676 video-calls: Add Zoom Serverto Server OAuth integration.
Some checks failed
Code scanning / CodeQL (push) Has been cancelled
Zulip production suite / Ubuntu 22.04 production build (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:bookworm, true, false, Debian 12 (Python 3.11, backend + documentation), bookworm) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:jammy, false, true, Ubuntu 22.04 (Python 3.10, backend + frontend), jammy) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:noble, false, false, Ubuntu 24.04 (Python 3.12, backend), noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm, --test-custom-db, Debian 12 production install with custom db name and user, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy, , Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble, , Ubuntu 24.04 production install, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-7.0, 7.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-8.0, 8.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy-6.0, 6.0 Version Upgrade, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-9.0, 9.0 Version Upgrade, noble) (push) Has been cancelled
Adds a second Zoom integration that uses the Zoom Server to Server
OAuth app process. Only one of the two Zoom integrations can be
configured on a Zulip server.

Adds a cache for the access token from the Zoom server so that it
can be used by the server to create meetings for the approximate
duration of the access token

In the web-app compose box, if the user's delivery email does not
match a user on the configured Zoom account for the server to server
integration, then a compose box error banner will be shown when the
error response is received after clicking/selecting the video or
audio call button.

Also updates the production documentation for the both types of Zoom
integration apps (Server to Server and General). The General app
process for Zoom now requires unlisted apps to go through their
review process, which we now have documented.

Fixes #33117.
2025-02-13 16:35:43 -08:00
Alya Abbott
e22c786d4b portico: Make community norms section easier to follow.
- More clear subsection structure and headings.
- Bold to highlight key points.
- Tighten wording of individual points.
- Link to more resources.
2025-02-13 16:12:50 -08:00
evykassirer
6905180976 settings: Standardize height of dropdown menu. 2025-02-13 16:09:04 -08:00
evykassirer
d6256017e2 modal: Use consistent padding around select instead of fixed height.
This vertical padding matches other input and dropdowns in
modals, and scales better than just "30px" as we add support
for more font sizes.
2025-02-13 16:09:04 -08:00