Commit Graph

65243 Commits

Author SHA1 Message Date
Niloth P
ae98bfe73e docs: Update the example Zulip URL to use "your-org.zulipchat.com".
The context property is not applicable for the developer docs, they
need to be manually updated to match the convention.
2025-06-20 16:04:26 -07:00
Niloth P
aa117366ef help-docs: Update the subdomain manually for Zulip Cloud examples.
Update to maintain consistency with the value of the context property
used in the other docs.

We avoid using the context property for these instances because we
always want them to show "your-org.zulipchat.com" irrespective of the
domain the docs are hosted in. Hence, the manual replacements.
2025-06-20 16:04:26 -07:00
Niloth P
dab97304f6 documentation: Add context properties for subdomain and host segments.
The subdomain and host parts are already used within zulip_url, api_url,
this commit adds them as context properties themselves, so that they
can be used in email addresses and URLs without the URI scheme,
increasing uniformity.

The new context properties `display_host` and `display_subdomain` are
usable in the Help, API docs and Policies.

Occurrences of `*.zulipchat.com` have been updated to use them.
2025-06-20 16:04:26 -07:00
Niloth P
c690177481 documentation: Update the subdomain value used in URL context variables.
From "yourZulipDomain" to "your-org".
2025-06-20 16:04:26 -07:00
Aman Agrawal
623fa98976 narrow_history: Remove invalid assertion.
Since non message views list channel topic list can have a defined
filter, we cannot assume that having `narrow_state.filter` set
implies `message_list.current` is defined.
2025-06-20 15:56:19 -07:00
Aman Agrawal
93c4dcbdc9 hotkey: Merge uses of M hotkey.
It was not a good idea to have the hotkey
fallthrough the `case` for user not being in message list.

We merge both the cases and also remove `M` from
`message_view_only_keys`.
2025-06-20 15:56:19 -07:00
Karl Stolley
062b83bfec compose: Rename classes, CSS vars to reflect attention level. 2025-06-20 15:54:59 -07:00
Karl Stolley
e19b815eaf compose: Rename functions to reflect attention level. 2025-06-20 15:54:59 -07:00
Swastik
ac509eaa66 css: Match arrow color with GIF popover.
Fixes #34772
Matched the color of the triangular tip with the GIPHY logo bar.
2025-06-19 17:52:11 -07:00
Aman Agrawal
b894daaa85 popovers: Remove horizontal scrollbar in GIPHY popover.
Also, center align it using margin instead of `position:relative`.
2025-06-19 17:52:11 -07:00
Karl Stolley
e0860a7635 compose: Experiment with adjusted privacy icon colors. 2025-06-19 17:21:20 -07:00
Karl Stolley
723db3d9a1 compose: Account for textarea focus in mute logic. 2025-06-19 17:21:20 -07:00
Karl Stolley
0c7e445649 compose: Highlight topic box on new-topic hover. 2025-06-19 17:21:20 -07:00
Karl Stolley
0d357d3ecc compse: Reduce transition timing, delay. 2025-06-19 17:21:20 -07:00
Karl Stolley
f1cde90a87 compose: Allow DMs to take muted-recipient logic. 2025-06-19 17:21:20 -07:00
Karl Stolley
d772623d04 compose: Add muted, hover styles for recipient row. 2025-06-19 17:21:20 -07:00
Karl Stolley
06696bc206 compose: Audition new-topic button in topic box. 2025-06-19 17:21:20 -07:00
Karl Stolley
966c8451df compose: Add functions to mute/unmute recipient row. 2025-06-19 17:21:20 -07:00
Karl Stolley
1ed8f577ed compose: Add temporary hover color on recipient borders. 2025-06-19 17:21:20 -07:00
Karl Stolley
a237f3284f compose: Add on show callback for recipient widget. 2025-06-19 17:21:20 -07:00
Karl Stolley
f5a661a462 compose: Rewrite picker as grid and adjust presentation. 2025-06-19 17:21:20 -07:00
Karl Stolley
5ca0c39125 compose: Reduce negative space in compose box. 2025-06-19 17:21:20 -07:00
Karl Stolley
11de082def compose: Reduce recipient-row height to 32px at 16px/1em. 2025-06-19 17:21:20 -07:00
Karl Stolley
00a2e13e07 compose: Suppress chevron on channel/DM picker. 2025-06-19 17:21:20 -07:00
Tim Abbott
ea68b7320a api docs: Clarify how the various presence APIs relate.
Co-authored-by: Greg Price <greg@zulip.com>
2025-06-19 15:20:15 -07:00
Tim Abbott
8179a31dc7 docs: Delete legacy presence subsystem page.
Everything on this page is now better explained in the API
documentation for presence.
2025-06-19 15:20:15 -07:00
whilstsomebody
01935c5be2 message_delete: Fix flaky 'do_delete_messages' function.
This commit fixes a flake in `do_delete_messages`, because of
which `test_do_delete_messages_grouping_logic` test occasionally
failed due to nondeterministic ordering of "delete_message" events.

The root cause was that the dictionaries used to group private
and stream messages for deletion (`private_messages_by_recipient`
and `stream_messages_by_topic`) were not sorted before generating
the events. While the `message_ids` within each event were already
sorted, the order of the events themselves could vary based on
the insertion order of the dictionaries, especially when running
tests in different sequences.

We now sort both `private_messages_by_recipient` and
`stream_messages_by_topic` before emitting events, ensuring
consistent ordering.
2025-06-19 15:03:59 -07:00
Evy Kassirer
1ebfa6bae3 stream_types: Sort stream_schema. 2025-06-19 14:25:41 -07:00
Evy Kassirer
4313648ca5 streams: Add subscriber_count to page load data. 2025-06-19 14:25:41 -07:00
Tim Abbott
e298eddefc inbox: Fix calls to is_complete_for_stream_id.
The call from the inbox code was asking the wrong question -- it wants
to know if we've fetched full topic data to know whether to ask for
it. The new name for the function moved in
7d55ad3c13 helped reveal it.

There also was a mention in a comment that was half-baked; wrote the
comment properly.
2025-06-19 13:05:15 -07:00
Lauryn Menard
2abe4ad18b help: Add edit message tip for mentions notifications.
Updates the "Mention a user or group" article to have a tip that
links to the section on how message notifications work for mentions
when editing a message's content.
2025-06-19 12:49:20 -07:00
Lauryn Menard
0fde715a24 devlogin: Filter placeholder realms from a subdomain change.
Showing these realms in the drop down list of realms is not helpful
for developers, so we filter them out of the list. Realms that are
deactivated without a redirect are still listed.
2025-06-19 12:49:03 -07:00
Prakhar Pratyush
7970e1fa45 streams: Fix error while sending notice in deactivated stream.
Sending messages to a deactivated stream is not allowed with
the exception of notices sent in "channel events" topic.

Earlier, notice sent to a deactivated stream when it is
deactivated was working correctly but it was resulting in
an error in the following cases:
* Renaming stream
* Changing stream description
* Changing message retention period
* Changing posting permission
* Changing access permission

This commit makes sure to send notice successfully in those cases.
2025-06-19 12:47:54 -07:00
Prakhar Pratyush
4515c29d44 topic_list: Fix missing 'show all topics' when messages not cached.
Earlier, when number of topics displayed in the topic list
widget was at max `topic_list_data.max_topics` and
first_message_id of stream >= first_cached_message_id.
There was a possibility of a few topics missing for messages
which were sent when the user wasn't subscribed.

We were neither displaying 'show more topics', nor fetching it
from server to update the list asyncronously.

This commit fixes that bug to display 'show all topics' in that
case and also initiates an API call in parallel to fetch all topics
for that stream and update the topic list asyncronously if topics
were actually missing.

Fixes #28949.
2025-06-19 12:43:02 -07:00
Prakhar Pratyush
7d55ad3c13 topic_list: Move and reorganize couple of functions to topic_list.ts.
A prep commit to move `is_complete_for_stream_id` and
`all_topics_in_cache` from `stream_topic_history` to `topic_list`
as it is specifically used while building topic list widget.

As it makes more sense to use `is_complete_for_stream_id` instead of
`all_topics_in_cache` directly, we reorganize to put it inside
`is_complete_for_stream_id`.

We rename `is_complete_for_stream_id` to
`is_full_topic_history_available` for clarity.

It'll also help to avoid tackling circular import issue
while resolving #28949.

No functional change in this commit.
2025-06-19 12:43:02 -07:00
Prakhar Pratyush
f94d3bd4a2 stream_topic_history: Use first_including_muted for the oldest message.
Earlier, we were using `all_messages_data.first()` for the oldest
message ID we have in cache, which is incorrect.

`all_messages_data.first_including_muted()` returns the oldest ID.

This commit fixes the bug.
2025-06-19 12:43:02 -07:00
Prakhar Pratyush
9bd55fcb8c get_server_history: Support multiple callbacks while request is pending.
Previously, if `get_server_history()` was called while a request
for the stream was already pending, the provided `on_success`
callback was ignored.

This commit fixes that by queuing all `on_success` callbacks per
stream_id when a request is already in flight. Once the request
completes, all queued callbacks are executed.
2025-06-19 12:43:02 -07:00
Tim Abbott
f5d0a3ee30 test_subs: Fix incorrect removed import.
Another use got added before the commit removing the import was merged.
2025-06-19 10:55:36 -07:00
Kislay Verma
2f696c5ec3 tests: Add library function to create message lists.
This function actually instantiates the
`MessageList` and `MessageListData` classes instead
of just mocking its structure as it is currently done.

It addresses https://github.com/zulip/zulip/pull/34645#discussion_r2099058418
2025-06-19 10:50:21 -07:00
Kislay Verma
5174dafb37 drafts: Use library functions in test.
In this commit we use functions from `example_stream`
and `example_user` modules in our test library.

Fixes part of 32326
2025-06-19 10:50:21 -07:00
Sahil Batra
b655bd14ea messages: Use "\x07" as topic for DMs and group DMs.
This commit updates code to use "\x07" as value for
"subject" field of Message objects for DMs and group
DMs, so that we have a unique value for DMs and group
DMs which cannot be used for channel messages.

This helps in avoiding having an empty string value as
topic for DMs, which is also used for "general chat"
channel messages, as large number of DMs in the realm
resulted in PostgreSQL query planner thinking that there
are too many "general chat" messages and thus generated
bad query plans for operations like fetching
"general chat" messages in a stream or moving messages
to and from "general chat" topic.

This change as done for ArchivedMessage and
ScheduledMessage objects as well.

Note that the clients still get "subject" value as
an empty string "".

This commit also adds tests for checking that "\x07"
cannot be used as topic for channel messages.

Fixes #34360.
2025-06-19 10:44:37 -07:00
Sahil Batra
5a45779634 test_message_dict: Add test for checking "subject" field value. 2025-06-19 10:44:37 -07:00
Sahil Batra
bdcdbc5565 tests: Add test to check edit history of a DM. 2025-06-19 10:44:37 -07:00
Sahil Batra
e06c181a95 tests: Move test to check permission to deactivate streams.
This commit moves test to check permission to deactivate
streams to test_channel_permissions.py.
2025-06-19 10:42:52 -07:00
Sahil Batra
3f8518f9d1 tests: Move channel administering permission tests.
This commit moves tests to check permission for administering
streams as per can_administer_channel_group setting to
test_channel_permissions.py.
2025-06-19 10:42:52 -07:00
bedo
7eadabe10a move_topic_modal: Only include messages senders in warning banner.
Only participants who sent the messages being moved
should appear in the warning banner.
2025-06-19 10:30:08 -07:00
bedo
26efeef3ee move_topic_modal: Fix "n_unsubscribed_participants" name.
Rename "n_unsubscribed_participants" to "unsubscribed_participants_count",
the former is the wrong template variable name.
2025-06-19 10:30:08 -07:00
Mateusz Mandera
0d17f34ff5 slack_import: Import Slackbot as a bot instead of a user.
Slackbot should be correctly marked as a bot rather than a regular user
- otherwise, it confusingly appears on the Users list and in the realm
creation from Slack import flow, in the dropdown for choosing the
organization owner account.

Closes #34649
2025-06-18 16:55:31 -07:00
Mateusz Mandera
75da563776 slack_import: Fix bug when need_select_realm_owner is not set.
When selecting the realm owner is not needed in the realm creation from
Slack flow, we don't set need_select_realm_owner value on the
preregistration_realm object. Thus, this codepath cannot expect to
always find the key - and instead should use .get(), defaulting to False.
2025-06-18 16:55:31 -07:00
Lauryn Menard
bbd0f6e11c support: Revise view for scrubbed realms.
When a realm is scrubbed, there should be no support actions to
take and all user information has been removed.
2025-06-18 16:51:25 -07:00