This commit makes the following changes:
- Prevents the codepath in load_messages in message_fetch and
get_events in server_events from interfering with each other.
- The banner label now displays the time interval after which the
connection will be retried.
- The loading indicator now shows on the banner when the retry is in
progress via the JS logic.
Co-authored-by: Sayam Samal <sayam@zulip.com>
Fixes#33924.
The `propertychange` event is deprecated and was only
supported in older versions of Internet Explorer.
This commit removes all instances of `propertychange` event.
Tuple is converted into a list by orjson, which in turn causes mismatch
in the initial state and the hybrid state after using apply_events.
Using a list instead helps us prevent that.
UserGroupMembersData is not serializable by orjson. We will be
introducing a TypedDict (which is serializable) in the next commit
called UserGroupMembersDict. This rename will help us distinguish
between the two.
When I adjusted 4fbf91c135 to no longer
do a full re-validation on every character typed, that unmasked bugs
in how the compose_setup handler code and compose_validate split
responsibility for validating 0-length messages.
The user-facing result was the send button not enabling properly when
starting to type.
Fix this by moving the 0-length message validation into
compose_validate, where we already handle issues of too-long messages,
sharing the same basic logic for determining when to do a full
validate() call.
A benefit of this reworking is now all of the logic for handling the
`invalid` class is in one place in validate, rather than split with
the compose_setup module.
Adjust the focus style for dropdown list items in inbox and recent-view.This ensures the focus outline is fully visible
across different zoom levels and fixes#34020
Spectators don't have a right sidebar, and apparently combining the
right-sidebar hiding logic with that results in a glitchy search bar.
Avoid either setting or reading from the right sidebar persistence
configuration. We don't do anything with the left-sidebar toggle,
since that living in local storage seems reasonable.
Fixes#34007.
When the user is hovered on the send button and uses keyboard
to update the compose box, the tooltip was not updated. This
fixes that edge case by hiding and showing the tooltip again.
Compose send tooltip was not correctly displayed when the compose
box was in an invalid state.
We significanlty improve the logic for displaying the tooltip here
to provide a more robust experience to the user.
This commit updates how we show the text mentioning that archiving
a stream which is used for new user, new channel or update
announcements will result in the announcements not being sent.
Fixes#33379.
Previously, stream archive button was only shown to realm admins.
Now button is shown to all the users who can administer the
channel.
Fixes part of #33379.
Doing a lot of DOM manipulation on message hover leads to
tooltips being not hidden / displayed when they should be.
This commit is an attempt to optimize that code to do minimal updates.
Earlier, we used to show "general chat" as the placeholder.
This commit adds support to show "Enter a topic (skip for general
chat)" as the placeholder when topic is not mandatory in the
move-topic-new-topic input box.
We show "general chat" (as we show in compose topic input box)
when move-topic-new-topic input box is not focused and topic="".
Fixes#33846.
Since the input-group covered all the available space, tooltip looked
like it is separated from the checkbox label. This commit fixes the
width of input-group to be just wide enough to contain the content
when the setting is disabled so that tooltip is positioned correctly.
This commit enables the retry button even when the loading indicator
is being shown, and hides the loading indicator in favor of the original
button content to indicate that the button is still interactable.
Fixes part of #33924.
bold_current_selection is a field within the options returned by
get_options, not a field on DropdownWidgetOptions itself.
Signed-off-by: Anders Kaseorg <anders@zulip.com>