Prevent displaying the topic resolved banner when the channel
picker (compose_select_recipient_dropdown_widget) is opened in
the case of forwarding messages. This is done to prevent the
overlap of the channel picker and the banner, as it hides some
part of the banner text.
Fixes: #33449
In preview mode, background updates to the compose 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 the compose textarea’s change event to ensure the
preview updates whenever the textarea is modified.
However, this introduces a race condition where the latest request is
not always reflected in the preview. To resolve this, we introduce a
state variable, `preview_render_count`, which is used to ensure only
the latest preview update is applied.
Fixes#33589.
This commit also attempts to fix a bug, present in main, where a
draft restored directly to the compose box loses its original topic
upon switching to other topic narrows.
Co-authored-by: Prakhar Pratyush <prakhar@zulip.com>
Added `enable_guest_user_dm_warning` setting to decide whether
clients should show a warning when a user is composing to a guest
user in the organization.
Fixes#30078.
Co-authored-by: adnan-td <generaladnan139@gmail.com>
Forward message starts a new message with the quoted context
(message or selection).
The compose box opens with then channel picker open and no topic.
Also added documentation about this feature in the help center.
Fixes part 2 of #31953
This function was introduced in
99d1c5a1f3 and always has the opposite
value from what its name suggests. It worked OK because the caller
also expected it to have an incorrect value.
It's cleaner in this context to just use the `stream_id` helper, so
just delete the bad code and use that.
Fix the docstring comment having been incorrectly pushed down while
we're addressing this.
For compose state variables `last_focused_compose_type_input` and
`message_type` that are assigned non-boolean values on user interaction,
`undefined` is the semantically better choice than `false` for
initialisation, to avoid incorrect boolean implications.
This is a prep commit for the next commit, which will quote a message
into the last focused compose type textarea, which we track in a new
`compose_state` variable in this commit.