Commit Graph

64101 Commits

Author SHA1 Message Date
Prakhar Pratyush
b53327dabe inline_topic_edit: Fix inline topic edit input field width for topic="".
Earlier, for topic="" and mandatory_topics=False, the inline topic
edit input field width was not set correctly when the inline topic
edit was started for the first time.

This resulted in overflowing placeholder.

This commit fixes that bug.
2025-03-27 09:28:41 -07:00
whilstsomebody
eef44429e2 widgets: Remove white background from "Add task"/"Add option" button.
In dark theme, when clicking the "Add task" button of
todo and "Add option" button of poll, the background
color incorrectly turns white.

This commit removes the white background color of the
buttons and makes it consistent woth the other green
buttons.
2025-03-27 09:28:07 -07:00
Saubhagya Patel
939691dfed message_move: Show "general chat" in link of confirmation toast.
When a message is moved using the "Move only this message" option
a confirmation toast is shown. This commit adds support to show
"general chat" in link of the toast when a message is moved to it.
2025-03-27 09:27:49 -07:00
Anders Kaseorg
13bd8771f9 corporate: Parse Accept header instead of X-Requested-With.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-03-26 22:29:09 -07:00
Anders Kaseorg
721f804736 middleware: Parse Accept header properly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-03-26 22:29:09 -07:00
Prakhar Pratyush
8383b11526 recipient_row: Fix empty string topic display in keyword search view.
Searching for a word that appears in a message in a empty string
topic via the search box resulted in a message view where the
topic names in the recipient_row were empty string instead of
`realm_empty_topic_display_name`.

This commit fixes that bug.
2025-03-26 17:39:38 -07:00
Amaan-pathan
b0844109ca settings: Show UTC offsets in timezone dropdown.
This improves usability by helping users quickly recognize timezones
with their offsets.

Fixes #20988.
2025-03-26 16:52:32 -07:00
Shubham Padia
fd65bf3d42 user_group_edit: Update permissions panel on subgroup edit.
Fixes part of #33730.
2025-03-26 15:54:32 -07:00
Anders Kaseorg
7702f53d90 clean-venv-cache: Remove.
The current stable branch is on uv, so we no longer need to preserve
the old-style zulip-venv-cache directories from the last 14 days.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-03-26 15:51:48 -07:00
Lauryn Menard
e101f03b11 scheduled-message-tests: Use f-strings for setting message content. 2025-03-26 15:51:00 -07:00
Lauryn Menard
139fe3768b compose-closed-ui: Add assert for inbox or recent view.
Asserts that either the inbox or recent conversation view is
visible when a ReplyRecipientInformation object is passed as
a parameter to get_recipient_label.

Updates the related test to more clearly check the expected
reply button text for the inbox/recent conversations case.
2025-03-26 15:50:27 -07:00
Shubham Padia
559629345e test_subs: Test rendered content instead of just the content.
Without this test, a bug with the rendering logic that was fixed
by #34056 went unnoticed.
Fixes part of #34069.
2025-03-26 11:33:04 -07:00
neiljp (Neil Pilgrim)
719629e5e4 docs: [fixup?] Notes on projects. 2025-03-26 11:32:13 -07:00
neiljp (Neil Pilgrim)
3fd3392a8d docs: Clarify types of gsoc terminal projects. 2025-03-26 11:32:13 -07:00
neiljp (Neil Pilgrim)
ff0defd959 docs: Clarify skills required for gsoc terminal applicants. 2025-03-26 11:32:13 -07:00
neiljp (Neil Pilgrim)
b31e1d9a2e docs: Improve gsoc terminal project titling and layout.
- Improve 'Code:' description, including primary coding language
  (add comma to desktop description for similar consistency)
- Add bold section in bulleted text (describing ZT as a TUI, cf CLI/GUI),
  consistent with style in rest of document
- Split project details onto other lines to simplify later editing
2025-03-26 11:32:13 -07:00
Niloth P
610f8b42c3 docs: Reference the new templates directory for PythonAPIIntegrations.
Mention the new templates directory `static/generated/integrations`, and
the script that generates them, in the doc on documenting integrations.
2025-03-26 11:19:31 -07:00
Niloth P
b2910aa05c integration-docs: Migrate PythonAPIIntegration docs.
To zulip/python-zulip-api, to keep them closer to their source code.

- Renamed the generate_zulip_bots_static_files to
generate_bots_integrations_static_files to accomodate the new function.
- Added a new function to
tools/setup/generate_bots_integrations_static_files to copy the
integration docs into static/generated/integrations.
- Updated integrations.py and computed_settings.py to use the new doc
paths.
- Deleted the affected integration docs.
- Updated the dependency URL.
2025-03-26 11:19:31 -07:00
Niloth P
e76ace28d2 integration-docs: Rename Jira doc to avoid collision with Jira plugin.
The Jira plugin integration doc will be moved in the next commit, to
"static/generated/integrations/jira/doc.md", as the directory name of
the integration is "jira" in zulip/python-zulip-api.

- Jira integration doc (previously) - "zerver/webhooks/jira/doc.md"
- Jira plugin integration doc (next commit) -
"static/generated/integrations/jira/doc.md"

Both of these will use the same path "jira/doc.md" as their
integration.doc value, and the actual file is loaded based on the order
of template directories listed in computed_settings.py.

Hence, use a custom path for the Jira integration doc to avoid this
collision.
2025-03-26 11:19:31 -07:00
Niloth P
4b9317cee4 integrations: Add missing directory_name for Jira plugin integration. 2025-03-26 11:19:31 -07:00
Niloth P
4975f5b0fa integrations: Remove Jenkins from the Python API integrations' dict.
Jenkins is a plugin integration, that had been mistakenly marked as a
PythonAPIIntegration.
2025-03-26 11:19:31 -07:00
Tim Abbott
bc017d3394 event_queue: Remove pre-5.0 compatibility code.
Since we don't support 20.04 anymore, one has to upgrade through an
intermediate release to get to 11.0.
2025-03-26 10:54:38 -07:00
Tim Abbott
0fecb497a2 puppet: Remove legacy camo-purging logic.
This is no longer required, since servers must upgrade via 5.x or
higher in order to get to the current release.
2025-03-26 10:54:38 -07:00
Tim Abbott
f3a829ce71 notifications: Complete old compatibility TODO.
We no longer support upgrading from old enough versions that bots
should get here, which means we can move to the more compact assert
statement.
2025-03-26 10:54:38 -07:00
Karl Stolley
852b957da8 left_sidebar: Avoid misaligned unreads on Safari. 2025-03-26 10:53:44 -07:00
evykassirer
8a51fa4b83 drafts: Fix bug opening drafts in 'general chat'.
This was likely a longstanding issue that wasn't
caught because we required topics on CZO. The new
logic ensures topic match even for empty string
(general chat) topics.
2025-03-25 17:02:44 -07:00
Elsa Kihlberg Gawell
f6b3d59c35 migration: Fix topic name for imported DMs from third-party exports.
Currently, imported direct messages from third-party exports might have
a non-empty string as their topic name.

This migration updates the topic names for all imported third-party DMs
and GDMs to an empty string if they aren’t already.

Fixes #29466.

Co-authored-by: Pieter CK <pieterceka123@gmail.com>
2025-03-25 16:38:21 -07:00
PieterCK
d5e28bcd28 slack_import: Fix thread conversion condition.
Currently, threads in Slack direct messages will increment the
`thread_counter` variable inside the thread conversion logic. Since we
don't treat thread messages in Slack DMs differently than any other DM,
threads in DM will only falsely increment the thread topic names in
channels.

This adds a condition that checks if the Slack message is a DM or not
before executing the thread conversion logic.
2025-03-25 16:38:21 -07:00
Elsa Kihlberg Gawell
845f0d40e1 import_data: Make sure converted DMs don't have topic name.
Previously, `build_message` sets a message's topic name to the given
topic name, regardless of whether the message was a direct message (DM)
or a group direct message (GDM).

This change adds the `is_private` parameter to `build_message`. If
`is_private` is `True`, the `topic_name` will be overridden to an empty
string (""). Consequently, this also updates the third-party importers
to pass this parameter when calling `build_message`.

Co-authored-by: Pieter CK <pieterceka123@gmail.com>
2025-03-25 16:38:21 -07:00
Lauryn Menard
7d3b77e490 compose-closed-ui: Refactor get_recipient_label.
Refactors get_recipient_label so that it's a bit clearer what the
recipient_information parameter is for and what we do when that
parameter is undefined.

In doing so, we no longer treat the constructed objects, that are
passed as the recipient_information parameter, and actual Message
objects, that we get from the current message list view, as the
same thing.
2025-03-25 16:23:41 -07:00
Lauryn Menard
4f163e5ad2 compose-closed-ui: Fix inbox and recent views not updating button.
Both the inbox and recent conversation views pass information about
the reply recipient to this function's caller so that the button
text can be updated for the focused row.

Therefore, the check for an undefined current message list should
be inside the case where the recipient information parameter is
undefined.

This was changed in f630272b4c when non-message list views set
undefined for the current message list.
2025-03-25 16:23:41 -07:00
Lauryn Menard
b48134a03e compose-closed-ui: Clarify object and type for reply to button.
Renames ComposeClosedMessage to ReplyRecipientInformation, and
exports the type from compose_closed_ui.ts so that the functions
that construct these objects from the recent conversations and
inbox views have the type available.

Also, renames the variables for these objects to not be "message",
so that it's clear that these are not Message objects.
2025-03-25 16:23:41 -07:00
Lauryn Menard
94fe5fc173 compose-closed-ui: Rename update_reply_recipient_label.
Renames update_reply_recipient_label to
update_recipient_text_for_reply_button.

This better matches the function that sets the default text for
the closed compose box button: set_standard_text_for_reply_button.
2025-03-25 16:23:41 -07:00
userAdityaa
1b260c9fd7 search_pill: Aligned the user emoji with the search text.
This commit ensures that the user emoji in the search pill
is correctly aligned with the search text. The issue was
caused by improper line height, leading to the emoji being
slightly cut off at the top. Adjusting the `line-height`
of `.pill-value` resolves this, providing a consistent
and visually balanced appearance.
2025-03-25 16:06:04 -07:00
Jitendra Kumar
4696c8eb67 message_list: Update trailing bookend on empty channel or topic.
Show `You are not subscribed to  #xyz. Subscribe` bookend
on channel or topic which are not subscribed and have no messages.

Fixes: #33209
2025-03-25 16:04:55 -07:00
Aman Agrawal
afbc6f2510 message_list: Fix just_unsubscribed for empty views.
This fixes a bug where wrong bookend is shown in empty views in
the next commit.
2025-03-25 16:04:55 -07:00
ubaidrmn
a9fa5b66a2 ui_init: Hide sidebar when clicking a topic link on small devices.
Previously, clicking a topic link on small devices did not close
the left sidebar, and it had to be manually closed. This commit
fixes that by calling `sidebar_ui.hide_streamlist_sidebar()` when
a topic link is clicked and the left sidebar is displayed as an
overlay.
2025-03-25 16:03:16 -07:00
Aman Agrawal
5ad100afef channel_settings: Fix channel name incorrect hidden.
`max-width` was not working correctly here. Removing it gets
us in good state.
2025-03-25 13:26:16 -07:00
Shubham Padia
2e48293e4b streams: Use bulk function in can_access_stream_metadata_user_ids.
Performance remains the same whether we're using the bulk function
underneath the function in question or not, this helps us avoid
duplication.
2025-03-25 13:20:06 -07:00
Shubham Padia
0570bfa90c test_subs: Check query count for can_access_stream_metadata_user_ids.
We want this function to just use the bulk function instead underneath,
we add a query count check here so that when we do that replace in the
next commit, we can make sure that the query count has not increased.
2025-03-25 13:20:06 -07:00
Shubham Padia
6833ad8a21 user_groups: Send metadata access related events on remove subgroups.
Fixes #33420.
2025-03-25 13:20:06 -07:00
Shubham Padia
c06dae81fb user_groups: Send metadata access related events on add subgroups. 2025-03-25 13:20:06 -07:00
Shubham Padia
e089eb0fa1 user_groups: Send metadata access related events on remove members. 2025-03-25 13:20:06 -07:00
Shubham Padia
8c069674b0 user_groups: Send metadata access related events on add members. 2025-03-25 13:20:06 -07:00
Shubham Padia
b62d51f0ae streams: Add get_metadata_access_streams_via_group_ids. 2025-03-25 13:20:06 -07:00
Shubham Padia
139679cdb1 user_groups: Add get_recursive_supergroups_union_for_groups.
This function will be useful in finding out affected groups when
sending events for users gaining or losing metadata access when the
members of a user group change in any way.
2025-03-25 13:20:06 -07:00
Shubham Padia
208ee1b8d9 streams: Add bulk_access_stream_metadata_user_ids.
This function will be useful in sending events for users gaining or
losing metadata access when the members of a user group change in any
way.
2025-03-25 13:20:06 -07:00
Karl Stolley
55ea5be022 home_views: Let Recents/Inbox view filter fit content. 2025-03-25 12:48:50 -07:00
ubaidrmn
405827bb08 message_edit: Fix preview not being updated when textarea is updated.
In preview mode, background updates to the message
editing box don’t refresh the preview. For example,
canceling an ongoing file upload after activating
preview mode still displays "uploading".

This commit extracts the preview rendering logic
from the `show_preview_area` function into a new
function, `render_preview_area`, and calls it on
message edit text area's input event to ensure the
preview updates whenever the textarea is modified.

We recently fixed the same issue for the compose box
in commit 1a97fec.
2025-03-25 11:31:45 -07:00
ubaidrmn
382a828eec message_edit: Fix stale syntax upon cancelling upload in preview.
Previously, canceling an upload in preview mode &
returning to editing left the syntax unchanged
(e.g., still showing "Uploading"). This happened
because the `replaceFieldText` function does not
work when the text area's display is none.

To fix this, instead of hiding the textarea in
preview mode, we use a grid to overlap it with
the preview container. This is the same thing we
are doing in the compose box. We have also added
css to ensure the textarea remains hidden behind
the transparent preview container
in preview mode.
2025-03-25 11:31:45 -07:00