If the initial fetch pre #29740 fetches all muted messages we don't
have any messages in all message list and hence query for
oldest message is undefined.
This results in us trying to render oldest_message_timestamp
with its value as infinity.
To fix it, we include muted messages in our search for oldest
message in the list and if we still cannot find one, we wait
for the next fetch.
Earlier, we were using 'send_event' & 'queue_json_publish' in
'do_send_messages' which can lead to a situation where we enqueue
events but the transaction fails at a later stage.
Events should not be sent until we know we're not rolling back.
It's going to be helpful in the future to record the reason for realm
deactivation.
- For information tracking
- For making a distinction between cases where we can allow realm owners
to reactivate their realm via a self-serve flow (e.g.
"owner_request") vs where we can't (ToS abuse).
The removePill function of input_pill module uses a for loop
for iterating and finding the required pill.
Replace the for loop with inbuilt findIndex function for efficiency.
Authored-by: Dhruv Chouhan <dc.dhruvchouhan@gmail.com>.
Add 'click' event listener to the pills in stream settings
to toggle the user_group_info_popover.
Fixes#28687.
Co-authored-by: Pieter CK <pieterceka123@gmail.com>.
Refactored hashchanged() so that popover.hide_all()
is executed before checking is_overlay_hash() to close
popovers when the user changes hash but still on overlay.
Add a 'click' event listener to the user pills in
stream and group settings which toggles the
user_card_popover.
Co-authored-by: PieterCK <pieterceka123@gmail.com>.
While rendering input pills in input_pills.create function,
pass in the user_id or group_id accordingly.
Display the id as an html attribute in input_pill.hbs.
Co-authored-by: Pieter CK <pieterceka123@gmail.com>.
When input pills are hovered, the 'x' button is highlighted.
This commit ensures that 'x' button is highlighted only if the
'x' button is hovered, not anywhere else on the pill.
Author: ecxtacy <dc.dhruvchouhan@gmail.com>.
Added new utility function to hash_parser to dynamically
detect the hash category of an URL. This is intended to
reduce the need of adding more adhoc hash_parser utility
functions.
Since #private_message_recipient is a <div contenteditable>,
not an <input> or <textarea>, it doesn’t make sense to call
.val() (it will always give the empty string).
It looks like this line is from over 10 years ago
(09deef9611 (diff-f2b22549dc2fb4824b37e787d964a2c9f4f580e767f86b6d7ded1d0ff37d5a62R291))
and probably before we had pills here. We can just remove this
whole block.
This commit renames are_both_setting_values_equal function
to are_both_group_setting_values_equal to make it clear
that this function is used to compare value of group
settings.
This commit moves validate_group_setting_value_change,
are_both_setting_values_equal and parse_group_setting_value
functions, which are used for updating the group settings, to
"zerver.lib.user_groups" as these functions will also be used for
group based realm and stream settings and "zerver.lib.user_groups"
file seems a better place to place such functions which are used
at multiple places.
For same reasons, we also move GroupSettingChangeRequest dataclass
to "zerver.lib.user_groups" file.
If an invalid timezone (such as +32h) was provided, the
timestamp.astimezone call would throw an exception, causing the
message send to fail. Replace that with a user-facing error.
Fixes#19658.
Reproducer:
* Start with empty hash and combined feed as home view.
* Go to any narrow.
* Keep pressing escape key.
You will keep switching between narrow view and home view while
you should just stop at home view. This was due to
`set_hash_to_home_view` not considering empty hash as a valid
home view hash.
This commit refines word wrapping in user profile popovers. It implements 'overflow-wrap: break-word;' for category ‘name’ items (e.g., ‘Email’, ‘User ID’) and 'overflow-wrap: anywhere;' for category ‘value’ segments, ensuring proper line breaks and preventing overflow issues. Additionally, addressed prettier problems to maintain code consistency.
Fixes#22865
Updates instances of default-streams-list to instead be
default-channels-list as the data-section for the organization
settings overlay is part of the URL hash.
Since we were trying to close dialog widget regardless of caller
after marking messages as read, it results in an error if the dialog
widget is not open especially since there was no dialog widget
involved in the process.
So, track the id of the dialog widget which called the `read` `op`
and operate on it based on it's status if there was a dialog
widget involved.
This is a follow-up to #29425. It assigns creator to three streams
that are used in tests and another two that aren't. For tests,
we assign a guest, an admin and an owner as creator.
To help users focus on the onboarding experience, we no longer
send the introductory "Zulip updates" message as a part of
onboarding.
Now, we send the introductory message just before the first
update message.
Fixes#30053.