This commit is a follow-up of 43eebbf9c6,
and it sets `data-simplebar-tab-index="-1"` on the remaining popovers.
This prevents the simplebar container from taking focus while trying to
navigate the popovers via the keyboard, thus fixing the bug where the
user had to click the down key twice before reaching the first
focus-able popover menu option.
This should work because all the events are either `change` events or
`click` events on elements without children. This change is being made
to make typescript migration easier, ecause we can type `this` more
easily than `e.target`.
This simplifies the StreamSubscription type, and parallels how we
always initialize every other property that isn’t in
NeverSubscribedStream (audible_notifications, desktop_notifications,
email_notifications, push_notifications, wildcard_mentions_notify,
color, is_muted). email_address was already optional.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Fixes#31701.
This fixes a bug where when the user clicks on a near link, the
pointer doesn't shift to the `near` linked message. This can
be a confusing experience for the user.
On a fresh render of a narrow if the view doesn't scroll,
`update_sticky_recipient_headers` is not called. So, we need call
it after we have scrolled to the message we want to select.
This helps us better update the views where we don't have the
messages that were updated cached or the filter cannot be
applied locally.
Tested using browser breakpoints for search `zulip` in starred narrow
for `!filter.can_apply_locally()` and setting message_fetch
constants to single digit for `messages_to_fetch.length > 0`.
This flake was happening since `wait_for_fully_processed_message`
only checks if the `star` icon is displayed on the message but
doesn't check for current narrow or waits for the narrow to
change.
Since narrow is changed to the message narrow after sending a
message. If we don't wait for narrow to change, this narrow change
can make the `get_current_msg_list_id` call return true for the
wrong narrow change. Which causes message list id of the wrong
message list to be returned and hence we cannot locate this
message list id.
To fix it, we check if sending this message will cause a narrow
change and if true, we wait for the narrow to change before
checking if the message is visible.
Previously, only spaces were used as word separators when searching
for topics. This meant that searching for "support" would not find a
topic named "topic_support" or "topic/support," which could lead to
unexpected results.
To address this, hyphen (-), underscore (_), colon (:), and slash (/)
have been added as additional word separators for topic filtering in
the left sidebar, as these characters are commonly used as separators
in topic names.
Fixes: #31844
Before, the message reactions section along with the add reaction button
was being rendered for every message even when there were no reactions
present - this led to additional DOM cost.
This commit adds the message reactions section only when there is
at least a single reaction on the message, and follows up with a cleanup
of the message reactions section when there are no reactions.
Fixes#31137.
Co-authored-by: Anmol-dev45 <basnetanmol2020@gmail.com>
Instead of storing setting pill widgets for new groups
in group_setting_widget_map, we just use variable in the
user_group_create file to store the widget.
This helps in accessing the widget with the key having
"new_group_" as prefix which we want to avoid as a pattern.
Note that the classes and IDs in templates still use
"new_group_" prefix.
This commit refactors get_group_setting_widget_value function
to accept pill widget as parameter instead of setting name.
This is a prep commit for not needing to store the widgets for
group creation form in settings_components.group_setting_widget_map.
This commit refactors set_group_setting_widget_value function
to accept pill widget as parameter instead of setting name.
This is a prep commit for not needing to store the widgets for
group creation form in settings_components.group_setting_widget_map.
Previously [{operator: "topic", operand: "one\xa0two"}] would be
unparsed to "topic:one\xa0two" which parses as [{operator: "topic",
operand: "one"}, {operator: "search", operand: "two"}], leading to
exceptions in the search pill system.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Previously, the "stream_topic_history" used to store unacked float
message ids as well in its "max_message_id" of stream and
"message_id" of topic histories.
This commit updates it to rather store only the acked message ids
here, and rather use the "echo_state" module so as to look up
for unacked messages in case of looking for recent topics, or
max message id in functions.
Previously, when `insert_local_message` was called, the
data structures in the `echo_state` are updated with the new
local messages after calling `insert_new_message`. This would
update the stream sidebar before even updating the `echo_state`
with the new local messages.
This commit introduces `track_local_message`, which basically
updates the `echo_state` data structures with the local
message before actually updating the stream sidebar.
This is a preparatory commit to update stream_topic_history
to only contain acked message ids.
The narrow_state module has a function that returns what this needs.
This does remove a log statement, but I don't think it was useful; we
don't need to or have a useful way to colorize a channel that doesn't
exist.
This commit refactors the `ensure_channel_topic_terms` of filter.ts.
Previously, this method used to add channel and topic terms, with
operands as placeholders in case the `with` narrow doesn't have
channel-topic terms.
This commit updates it to rather correct the narrow with the right
terms in case the channel-topic terms are missing in the `with`
narrow, but leave it as it is in case the channel-topic terms are
present, so that it can later be corrected if the channel-topic
terms are not pointing to the right conversation.
Previously, no custom styling was being applied to the enter send
choice options, which led to uneven styling from the other popover
options, as well as the outline ring being cut-off from the edges of
the popover. This commit fixes these issues by adding custom styling
for the outline ring when the enter send choice options are focused.
This was causing a bug where the participants weren't necessarily
all getting rendered, specifically when there were many subscribers
to a channel, because we render users in batches as buddy list
scrolls, and those users would only show up after some scrolling.
This fix makes sure we always load the participants first.