Previously, for spectators, when a negated search operator was
present, navigating forward or backward triggered the "signup/login"
modal.
This commit fixes this issue.
Passing the user group object in case of named user group is fine for
`do_change_stream_group_based_setting`. But for anonymous groups, if the
code path calling that function is not creating a new anonymous user
group, it has to modify the user group by itself before calling that
function. In that case, if `old_setting_api_value` is not provided,
`old_user_group` is calculated false, since the group id has not changed
for the stream, but the group membership has changed.
old_setting_api_value will be the same as new_setting_api_value in such
a case.
It is better to accept the new setting value as either an int or
UserGroupMembersDict, so that `do_change_stream_group_based_setting` can
decide what to do with that argument.
In the move topic modal, when the user would merge messages into an
existing conversation, then we display a warning banner in the modal.
This is similar to the confirmation modal that appears when a user
edits a topic via the message feed header.
We do not show the warning for the empty/general topic for realms
that do not require topics, even if there are messages in the
general topic.
Fixes#31151.
Co-authored-by: Yiming He <heyimingfrog@gmail.com>
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
Previously the count was sometimes incorrect because we were
subtracting unsubscribed participants from the subscriber count,
getting values that were too low (and sometimes negative!)
This count is displayed in the hover tooltip and section headers.
Fixes#33452
Earlier, the migration code was replacing the occurrence of "general
chat" as topic name in the database with `""`. This resulted in an
error which permanently broke `/near/` URL links to existing topics
named "general chat".
This commit updates the migration approach to instead move messages
from "general chat" to `""`. An edit history entry is added.
It results in the same expected behaviour and fixing that bug.
This commit improves the saved snippets UI through the following ways:
- Reduces the space between the saved snippet title and description for
a more interconnected feel.
- Changes the delete icon from the old font-awesome icons to using the
new icon button component.
- Adds line-clamping to the saved snippet description to display two
lines of text instead of one, presenting the user with more context.
Zulip has an invariant that all unread messages must be in channels the
user is subscribed to. Therefore, in this commit, we add a feedback
widget to notify users when a channel to which they are not subscribed is
skipped while marking messages as unread in an interleaved view.
Fixes#23470.
Co-authored-by: Hemant Umre <hemantumre12@gmail.com>.
If the user exits preview mode before the render response arrives, the
render is still applied to the hidden preview element, causing a stale
preview to appear when switching back to preview mode.
This commit adds a check to ensure the render is only applied if the
user is still in preview mode when the render response is received.
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 adds a new function to fetch presence data when the user
card is opened. This data is then used to display the user's presence
status in the card.
Fixes: #31037.
This is an attempt to fix somewhat #33685. More finesse can
probably be done in the area, but hiding descriptions on a title-
by-title basis will be non-trivial.