a522ad1d9a mistakenly deleted this variable assignment, which made
the `zulip.conf` configuration setting not work -- uwsgi's `lazy_apps`
were not enabled, which are required for rolling restart.
This commit addresses `#stream-creation .modal-footer` becoming
transparent after an error in creating a stream due to overlapping
with `.stream-creation-body`. Instead of adding data-simplebar on
.stream-creation-body, added it to a new div
`stream-creation-simplebar-container` which contains 3 divs:
stream_create_info,stream_creating_indicator and stream-creation-body.
Additionally, fixed the border-radius of the modal footer on the
bottom left side for device width > $md_min.
Fixes#25526
This commit adds a new test to check how the visibility policy updates
when moving messages to a topic that didn't exist previously.
This test also helps us adding coverage for the code which just
skips setting visibility_policy if there is no need to update the
value because both previous and new value of visibility policy
is INHERIT. The "actions/message_edit.py" file has 100% coverage
now and thus is removed from "not_yet_fully_covered" list.
The code for updating visibility policy values on moving messages
had two bugs.
- There was a typo in elif condition where "user_profile" was being
used instead of "user_profile_with_policy".
This commit fixes the typo.
- It was assumed that there would be no UserTopic rows for target
topic if the target topic didn't exist. But there can be such case
where some messages were sent to that topic and the user muted
the topic. But then the messages in that topic was deleted. In
such case there can be UserTopic rows for a stream-topic pair
that does not exist.
This commit fixes the code to handle such case as well and set
the visibility policy of new topic to what was set for the original
topic. This change simplifies the condition to just check whether
new_visibility_policy is equal to target_topic_visibility_policy
and skip if so, and update the visibility policy otherwise.
Due to this change, we now do not try to mute the already muted
topic if the topic is moved to a topic which didn't exist
previously and thus we modify the existing test to not expect
any INFO logs.
This commit adds tests to cover the case of message editing
not allowed due to allow_message_editing set to False and
the case when there is no limit set when moving all messages
in a topic.
The "actions/message_edit.py" file does not have 100% coverage
still and it will be addressed in the next commit.
We do not pass "email_address_visibility" to do_create_realm
anymore. It was passed before to set the setting for realms in
development database, but it has been changed since we changed
email_address_visibility to be a user-level setting instead
of realm-level setting since now it is set on RealmUserDefault
table.
Adds test coverage for the error sent for editing a scheduled
message that was successfully sent.
`zerver/actions/scheduled_messages.py` now has 100% test coverage
again.
Previously, when a user enters a empty dm-including view, they'll notice
the "Why not start the conversation" action line and click on the link.
When this happens, the compose box would open but the receipent box is
never populated.
Since the dm-including view is a search view, we should drop that phrase
from dm-including views altogether. It also isn't super natural to
have a button that starts the conversation with the user anyways.
Fixes: #25524.
Simplebar introduces a bunch of intermediate divs, and we want to be
clearing the content element, not the entire container including the
simplebars divs.
`update_or_append_banner` abstracts the logic for not creating another compose
banner if one is already present in the DOM, it just replaces the content of the
old banner with the new one.
When the user has a wildcard @-mention we show a warning if the stream has more than
15 members. When the user clicks "Yes, schedule" and confirms the intend to schedule
the message we open the send later modal to let user choose scheduling time.
Fixes#25426.
Extracted opening send later menu code in its own function `open_send_later_menu`
so that we can reuse to directly open the modal from different parts of code.
Added a new param `scheduling_message` which is passed down to the `show_wildcard_warnings`
this argument will help us to do logic relevant to when we are doing validation on scheduling
a message.
In ab0c5f3092, it was missed that this
code depended on the sender_info_hover CSS class, which is no longer
an empty element on messages without a message sender avatar/name
element.
The logic is still hacky, as it relies on the position of an invisible
element, but we're rewriting the positioning logic using Tippy anyway,
so it's not worth doing much to make it nicer.
Fixes#25496.
This is a preparatory commit that will help to render the options
for the send-later modal separately. This is necessary to have
actual sending options if the user keeps the modal open.
Fixes#25462.
hotkey.js is the file that handles the 'e' keyboard shortcut. It maps to the
'edit_message' event and will simply call message_edit.start().
message_edit.start() doesn't check whether it's already been opened previously,
so it will go through and try to register handler for the clipboard button
again. When the clipboard button gets clicked, the handler will be called
twice. Once with a properly target element, and once with null.
Fix this issue by checking if message_edit.start() has already operated on
the given $row.