Commit Graph

20 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
Sayam Samal
0d9e503add drafts: Add placeholder text for drafts with no channel selected.
This commit handles the empty channel placeholder for drafts saved
without a channel selected. When these drafts also do not have a topic,
we display "No topic selected" in tandem with "No channel selected",
since we are unable to access the channel configuration to determine
if we should display realm_empty_topic_display_name.
2025-09-30 11:37:16 -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
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
Vector73
62c67eae8e settings: Add a new topics_policy realm setting.
Added a new realm setting, `topics_policy` and deprecated
`mandatory_topics` setting as it now replaced by `topics_policy`.

Fixes part of #33549.
2025-06-17 17:05:58 -07:00
apoorvapendse
3cd0f87d47 draft_overlay: Clarify the editing UI for drafts.
Co-authored-by: Sayam Samal <sayam@zulip.com>
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-06-10 11:08:35 -07:00
Aditya Kumar Kasaudhan
a5632a9356 drafts: Refactor draft deletion to support bulk operations.
This commit updates the draft deletion functionality to handle
multiple draft IDs at once, reducing localStorage writes.
2025-06-05 15:34:11 -07:00
Aditya Kumar Kasaudhan
9a4de8d9b8 drafts: Enable dynamic re-rendering of draft list in overlay.
This commit laying the groundwork for dynamic re-rendering of
drafts.

Previously, the draft list was rendered once with the overlay,
and re-rendering wasn't needed. However, to support features like
"undo," we now need to re-render the draft list dynamically.
2025-06-05 15:34:11 -07:00
Kislay Verma
7f6e0aced1 drafts: Clean up unnecessary rewires in test.
This commit removes unnecessary use of override_rewire
in drafts.test.cjs, and creates data instead of mocking
functions returning that data.

It helped eliminate `stream_data.rewire_get_color` and
`sub_store.rewire_get`.

Fixes part of #32326.
2025-05-20 17:03:00 -07:00
Evy Kassirer
2cbf9e130e drafts: Store DM drafts with user ids instead of emails.
Fixes #34468.
2025-05-16 10:51:29 -07:00
Evy Kassirer
798f59a01b drafts: Remove noop setting of private_message_recipient in tests.
If we stub out `set_from_emails` as a noop, then setting the private
recipient is a noop and doesn't need to happen.
2025-05-08 09:36:36 -07:00
Harsh
c6dddfe580 drafts: Show "No DM recipients" when recipients aren't specified. 2025-05-01 16:38:09 -07:00
Harsh
57ce1371a8 drafts: Use specific text for DM conversation with self.
Adds "You" and "Drafts from conversations with yourself" as
labels in the drafts overlay for the DM conversation with
the current user.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-04-28 20:50:51 -07:00
Lauryn Menard
64cb3769ce drafts-test: Fix test data for direct message drafts.
The draft values for private_message_recipient and reply_to should
be set to the same string of comma separated email addresses.
2025-04-28 20:50:51 -07:00
Aman Agrawal
cd439c0232 message_overlay: Fix restore tooltips detached with message content.
To avoid restore tooltip of message from being displayed outside
the overlay, we define a boundary, outside which the tooltip
cannot exist. Popper library is smart enough to render the tooltip
correctly by respecting the provided boundary and flipping the
tooltip placement if required.
2025-04-11 10:40:35 -07:00
Maneesh Shukla
3db2104fe9 drafts: Add a copy draft button.
This adds a button to the draft overlay that allows the user to copy
the draft to the clipboard.
2025-02-23 15:54:07 -08:00
Prakhar Pratyush
8a14018442 drafts: Show empty string as topic when realm_mandatory_topics=true.
Earlier, we were displaying `realm_empty_topic_display_name` as the
topic name when topic="".

This was not the expected behavior when `realm_mandatory_topics=true`.

This commit updates the logic to show empty string in such cases.
2025-02-12 09:37:51 -08:00
Prakhar Pratyush
e3ce4c5766 drafts_table: Show realm_empty_topic_display_name for topic="".
This commit adds support to display `realm_empty_topic_display_name`
value in the drafts table for topics having the actual value of
empty string.
2025-01-10 14:32:55 -08:00
aditya.chaudhary1558@gmail.com
08c8e40afa drafts: Remove feature for discarding drafts after 30 days.
This commit helps in removal of all the code and documentation
related to 30-day auto removal of draft that are saved.

Fixes #32176.
2024-12-17 11:54:10 -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