This commit refactors the logic of message filtering for
'Recent conversations' narrow.
Previously, we used to filter the recent conversations messages
based on the state of the stream and topic. If the stream or topic
was muted, we would avoid displaying the message. However, with
the new changes, we check if the topic is unmuted before applying
the aforementioned condition. If the topic is unmuted, we add the
message to the all 'Recent conversations' narrow.
Fixes part of: #24243
208c0c3034 fixed this for new deleted users, but left existing users
with potentially invalid email addresses. This is problematic if the
realm is ever exported and re-imported, as the addresses will not
validate.
Add a migration which attempts to fix these invalid email addresses.
The existing `except subprocess.CalledProcessError` only catches if
there are syntax errors which prevent the `lastrun` file from being
written; it does not handle if there are properly-defined resources
which fail to evaluate (e.g. due to a missing dependency or file).
Check the `failed` resource count, and exit 2 if there are any such
resources. This will cause `zulip-puppet-apply --force --noop` (which
is used as a pre-flight check during upgrades) to properly detect and
signal on more types of invalid puppet configurations. In turn, this
will cause `upgrade-zulip` to not attempt to power through upgrades it
knows are destined to fail.
7c023042cf moved the logrotate configuration to being a templated
file, from a static file, but missed that the static file was still
referenced from `zulip_ops::app_frontend`; it only updated
`zulip::profile::app_frontend`. This caused errors in applying puppet
on any `zulip_ops::app_frontend` host.
Prior to 7c023042cf, the Puppet role was identical between those two
classes; deduplicate the rule by moving the updated template
definition into `zulip::app_frontend_base` which is common to those
two classes and not used in any other classes.
These changes introduces an new user option where it allows
users read messages and scroll through their feed without
marking those messages as read.
Fixes: #22804.
Previously, the naming of functions in unread_ui was targeted towards a
specific unread banner. This is terrible if we plan on having multiple
types of unread banners and this change aims to offer that level of clarity.
Following up to #24961, it was discovered that emojis looked worse with
the new changes as the spacings became uneven with each emojis.
Debugging determined that the root cause that the selectors used
applied to __every__ first child of its parent inside the
rendered_markdown area, not just the first child of the main
container.
Previously, when a user scrolls down a long text of message and presses
the hotkey for viewing the message actions, the popover menu would continue
to open where the message actions button. Thus, the popover menu would be
cut short and sometimes off the screen. These changes will scroll the
client to the top of the message and ensure that the popover menu is
always visible.
Fixes: #23774.
This fixes regression in 55bd3220b6,
Where notice gets rendered even when there are streams shown in panel.
Now the check var to render message conditionally checks for both
`subscribed` and `all streams` tabs. We are avoiding the fully use of DOM
in this context because if the filter results in no stream, then also
it will display a notice. Also this commits swaps order of calling
`stream_data.delete_sub()` and `stream_settings_ui.remove_stream()`
functions in server_events_dispatch because `update_empty_left_panel_message`
uses stream_data, which was giving outdated data.
This commit updates the logic for migrating user_topic rows
during the move-messages operation when the target topic
already has messages.
Previously, the target_topic's visibility_policy was simply
set to the original_topic's visibility_policy,
and the original_topic's visibility_policy was set to INHERIT.
This commit updates the move-messages code path to determine
the new visibility_policy depending on the visibility policies
of the original and target topics.
The target_topic's visibility_policy is then updated.
The number of db queries has increased by two:
One query corresponds to determining if 'target_topic_has_messages'.
Another query corresponds to 'get_users_with_user_topic_visibility_policy'
to determine 'target_topic_user_profile_to_visibility_policy'.
This prep commit updates the lib function
'topic_has_visibility_policy' to add support for the case
when visibility_policy=INHERIT.
Previously, it had support for all the visibility policies
except INHERIT.
This commit refactors the move user_topic records
code block in 'do_update_message', resulting in
clean code.
We directly iterate over the dictionary items
instead of looping over the keys and fetching
values if the key exists.
This commit changes the way compose box responds to a file drop or paste.
Currently, the compose box expands only after the file is uploaded to the
server, which can cause confusion if the upload fails and there is also no
progress bar. With the update, the compose box will expand immediately upon
drop or paste events showing the status of upload. Also it was opening
the stream compose box even if we are in a direct message, now it starts
a reply.
Fixes#24654.
Moves jwt_fetch_api_key endpoint to v1_api_mobile_patterns so
that tools/test-api detects it as an API endpoint that is pending
documentation.
Fixes#24982.
For endpoints with a `type` parameter to indicate whether the message
is a stream or direct message, `POST /typing` and `POST /messages`,
adds support for passing "direct" as the preferred value for direct
messages, group and 1-on-1.
Maintains support for "private" as a deprecated value to indicate
direct messages.
Fixes#24960.
Refactors instances of `message_type_name` and `message_type`
that are referring to API message type value ("stream" or
"private") to use `recipient_type_name` instead.
Prep commit for adding "direct" as a value for endpoints with a
`type` parameter to indicate whether the message is a stream or
direct message.
There are four icons in the recipient bar that have tooltips, and
each of them shows a second appearance if we click on a button of
the topic menu that is just over the area of the icon. To prevent
the second tooltip, we have used the
'hide_tooltip_if_reference_removed' function to observe changes in
the DOM and hide the tooltip if the reference is removed.
With the recent migration of the topic_menu popover to Tippy,
some tooltips have been impacted. If we click on a popover menu
and then click on any button where the area is above the tooltip
icon, two tooltips appear. The first one is expected to appear over
the reference element, but the second tooltip appears on the top
left corner of the screen because the associated reference element
is hidden.
This commit fixes this issue for the view_user_card tooltip with
the help of the 'hide_tooltip_if_reference_removed' function.
We have set the attributes config to be 'true', since when the
tooltip appears, the parent div with classname
'message_row include_sender' is added with the value
'sender_name_hovered' in its className. We just need to observe
this classname change to hide the tooltip.
So far, we've used the BitField .authentication_methods on Realm
for tracking which backends are enabled for an organization. This
however made it a pain to add new backends (requiring altering the
column and a migration - particularly troublesome if someone wanted to
create their own custom auth backend for their server).
Instead this will be tracked through the existence of the appropriate
rows in the RealmAuthenticationMethods table.
We previously showed "Mark as unresolved" or "Mark as resolved"
option in topic sidebar popover only is user was allowed to
move messages between streams. This commit fixes it to show
if user is allow to move within stream, or in other words edit
the topic, since resolving or unresolving topics is essentially
topic ediitng only.
Note that we still cannot show or hide the option as per the time
limit setting (since client may not have the first message of the
topic locally), so we just show or hide it as per
move_messages_within_stream_policy setting.
This commit adds "Rename topic" option in topic sidebar popover
which will be shown when user is only allowed to edit topics and
not streams.
Note that we still cannot show or hide the option as per the time
limit setting (since client may not have the first message of the
topic locally), so we just show or hide it as per
move_messages_within_stream_policy setting.
Fixes#19886.
This commit adds 5 seconds buffer when checking the permission to edit
stream and topic for disabling the inputs in "Move message" and
"Move topic" modal.
We already do this for the message content edit UI.
As part of #24678, this code was accidentally removed. We just
add it back to fix the broken user profile dropdown in the navbar
of non corporate pages.
This commit renames ID of the container element of group
settings overlay to group_overlay_container. We also
rename the variables used for this element. This makes
it consistent with the container element of settings overlay.
This commit renames ID of the container element of stream
settings overlay to streams_overlay_container. This makes
it consistent with the container element of settings overlay.
Previously, popovers scrolled oddly along with the content in the
Recent Conversations tab; copy our approach in the message feed of
closing them on scroll.
If the sticky recipient bar hides the date separator completely,
the recipient bar needs to show the correct date for the message
next to it, otherwise the user will see the wrong date for the
message.
To fix this, we show the date on the date separator as soon as
the sticky message header starts to overlap with the date separator.
This is a preparatory work for #24360.
'DIRECT MESSAGES' are completely collapsed in the 'more topics' view.
Clicking on 'DIRECT MESSAGES' exits the 'more topics' view and
scrolls to it from that state. One wouldn't be able to open
'DIRECT MESSAGES' without leaving the 'more topics' view.
Fixes: #25035.
Signed-off-by: Ishaan Singh <asishaan.191cs124@nitk.edu.in>
We now show the stream privacy type icon for the option
selected in dropdown list widget.
This commit also includes a minor CSS change to make the
web-public better aligned in the dropdown list widget
"Move topic" and "Move message" modal. There is no visible
change for other pages and other icons due to this CSS
change.
Fixes part of #22355.
Renamed toggle_topic_mute function to toggle_topic_visibility_policy.
In toggle_topic_visibility_policy function if topic is either muted or
unmuted it will set the topic's visibility_policy to Inherit else, if
stream is muted or unmuted topic's visibility_policy will be set to
unmuted and muted respectively.
Updated set_user_topic_visibility_policy to only show feedback widget
in case of muting topics with hotkey.
Fixes#25125
Because unsubscribing from welcome emails cannot be undone, it is
confusing that the unsubscribe success page suggests that the user
can. Makes the second sentence about undoing the unsubscribe action
conditional on the `subscription_type` not being "welcome".
Updates the first sentence to specifically note the Zulip realm
that has been updated for the unsubscribe action so that it is
clear for which Zulip organization the user's settings have been
updated/changed, since the user might have accounts with various
Zulip organizations (via Zulip Cloud or self-hosted servers) that
use the same email account.
The logic to avoid first unread message with a date row to not
have an unread marker works purely based on `z-index` and seems
to be working nicely.
This avoids a bug where the background color of the date row
of the first unread message is different from others.
We show a modal if user is not allowed to resolve or unresolve
topics due to time limit. The modal just contains the text
mentioning user cannot resolve topic without stating the
count of messages that are within the time limit as we do
not recommend partial resolving of topics.
This commit does not include any changes for resolving or
unresolving topic using "Move topic" or "Move message" modals,
as we will still consider them as simple topic move and show
the same modal that is shown in general for moving message.