Commit Graph

13 Commits

Author SHA1 Message Date
Evy Kassirer
10a815cae7 stream_data: Rename add_sub to add_sub_for_tests. 2025-09-30 12:52:47 -07:00
Alya Abbott
0ea04f31bc compose and feed: Improve label for DMs to yourself. 2025-09-26 11:07:48 -07:00
Kislay Verma
67ca49488f tests: Use make_realm to create type-correct realm objects.
Another step in the direction of improving node tests
and using type-correct organic data as much as possible.
2025-08-28 11:35:07 -07:00
Aman Agrawal
5cfe4829a9 compose_closed_ui: Fix incorrect tooltip for new conversation btn.
Fixed by removing the incorrect update for new conversation
button and correctly updating the reply button state.
2025-07-09 12:54:47 -07:00
Harsh
c8763f919f compose-closed-ui: Use specific button label when composing to self.
When the compose box is closed, if the selected message is for the
direct conversation with the current user, then we show "Message
yourself" as the compose reply button text.

Adds `decode_dm_recipients_user_ids_from_url` helper function to
hash_util, which parses a narrow URL for DM recipient user IDs.
Checks that "dm" operand, which should be a string of user emails,
also passes the check for all the email addresses being valid
compose recipients.

Co-Authored-By: Lauryn Menard <lauryn@zulip.com>
2025-04-28 20:50:51 -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
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
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
Prakhar Pratyush
3706940df6 compose_closed_ui: Unify translation strings for reply button label.
This commit unifies translation strings for reply button label
to reduce translation effort.

Both the `has_empty_string_topic` and other cases now use a single
"Message <z-recipient-label></z-recipient-label>"`, with dynamic
content passed appropriately.
2025-01-22 15:55:23 -08:00
Prakhar Pratyush
25941c1d19 compose_reply_label: Show realm_empty_topic_display_name for topic="".
This commit adds support to display `realm_empty_topic_display_name`
value as the compose reply button label for topics having the actual
value of empty string.
2025-01-14 13:52:55 -08:00
Aman Agrawal
525ae3aaff message_list: Fix message list missing messages.
Since we allow calling `add_messages` without checking fetch status,
it can lead to non-contiguous message history due to latest message
being added to a message list without previous messages being
fetched.

To fix it, we only allow adding new messages via message_fetch
which properly sets `anchor` to the last message in the list
before fetching and adding messages to the list.
2024-12-18 10:21:48 -08:00
Aman Agrawal
a97b3c7e41 conversation_participants: Track participants data in with message data.
This will help us accurately track participants in every narrow
to be used buddy list and other components.
2024-12-12 09:09:30 -08:00
Anders Kaseorg
687f1b1651 tests: Rename the Node tests to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00