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.
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.
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.
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>
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.
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.