For multiline strings in triple quotes, a '\n' is included
at the end of each line.
Earlier, to skip '\n' we used to add an escape character '\'
at the end of each line.
This commit adds a function to avoid manually adding '\'.
As a part of the zulip news feature, we send an initial
group DM to admins suggesting them to update or set
the 'zulip_update_announcements_stream'.
This commit updates those messages to make it better.
Updates the check email translation test for updated email text in
confirm_new_email.html and onboarding_zulip_topics.html for current
translated strings in German.
This commit fixes an assert statement in get_input_element_value
to also include the textarea elements, which is used for realm
description. After updating, the assert statement now checks
the input_elem to be having one of the following types -
HTMLInputElement, HTMLSelectElement and HTMLTextAreaElement,
as these cover all the possible input elements with input_type
set to "string".
Follow-up to #29264.
Fix a bug where scroll to bottom tooltip remains
visible even after the button dissapeared.
This was fixed in #29253 but the fix does not work
for the updated jquery event handling.
This updated fix bypasses the jquery wrapper to
access the exact propertyName.
Fixes: #28656
Messages that are not delivered locally like slash command messages,
messages with backend only syntax, etc are processed by
'echo.process_from_server' function.
Earlier, in 'echo.process_from_server' we were clearing out
the local IDs of non-echoed messages and then a check to
set 'sent_by_this_client' based on local_id.
This led to 'sent_by_this_client' incorrectly set to False
as the local_id is already deleted.
This commit fixes the incorrect behavior. We first determine
the 'sent_by_this_client' on the basis of local_id and then
we delete.
As noted in the docstring for `bulk_insert_ums`, this is at least one
order of magnitude faster than using `bulk_create`. This also
includes a `ON CONFLICT DO NOTHING` which allows multiple
soft-reactivations to run at once without failing. We also adjust the
update of `last_active_message_id` to be safe against races.
Rather than use a bulk insert via Django, use the faster
`bulk_insert_all_ums` that we already have. This also adds a `ON
CONFLICT` clause, to make the insert resilient to race conditions.
There are currently two callsites, with different desired `ON
CONFLICT` behaviours:
- For `notify_reaction_update`, if the `UserMessage` had already been
created, we would have done nothing to change it.
- For `do_update_message_flags`, we would have ensured a specific bit
was (un)set.
Extend `create_historical_user_messages` and `bulk_insert_all_ums` to
support `ON CONFLICT (...) UPDATE SET flags = ...`.
This commit updates the code for parsing strings to
numbers to use correct types -
- Number.parseInt and Number.parseFloat take strings
as inputs but we were passing Number objects.
- We were using string as an operator for "*" arithmetic
operation, which is incorrect.
This commit fixes the above mentioned things and would
be helpful when we convert settings_components file to
typescript.
THis commit refactors get_realm_time_limits_in_minutes
code to not convert the setting value to integer and just
keep it string. This change will help us in not defining
the type of the variable as "number | string" when we can
easily use the string values.
Fix overlapping UI layout for stream subscribers search
on screens smaller than 320px. Break the search field
to a new row in the layout. Also fix the same issue in
the group settings > members panel.
Fixes#29368
These default to off, because in situations with thousands of queues,
consumers, and producers, they cause unreasonable overhead. Our use
case has few enough queues that we do want to be able to inspect them
individually.
Enable per-object Prometheus metrics, per [1].
[1]: 78851828ec/deps/rabbitmq_prometheus (configuration)
There seem to be two different ways of making the unread
marker visible:
(1) `user-with-count` classname on the `user_sidebar_entry`
element, which is added on render and not modified after
render at all.
(2) `hide` classname, which is toggled on the `unread_count`
element in `update_unread_count_in_dom`.
This creates a bug where sometimes the buddy list doesn't
update when messages are marked unread. This actually
doesn't always happen, since if there was an unread marker
that was there on the original render (and then removed
and put back) it will display again.
This commit keeps the `hide` class and removes the
`user-with-count` strategy.
Instead of only checking for visible `a` tags, we should also check
for visible elements with the `tabindex=0` attribute defined. This
allows us to support navigation for other components which we
explicitly set to be tabbable.
This commit introduces a theme switcher feature within the personal
menu popover. The implementation begins with the development of a
tab picker, which has the following features:
* Utilization of radio buttons to emulate the tab picker.
Radio input buttons provides the native way in HTML to select one
value out of a set.
* Support for both horizontal (default) and vertical orientations.
Vertical orientation can be achieved by appending the
`.tab-picker-vertical` class.
* Respects the `prefers-reduced-motion` option set by the user.
Disables the sliding tab animation to improve accessibility.
Additionally, the theme switcher component incorporates error handling
mechanisms. In the event of a server/network error, the tab slider
reverts to the previous theme option after a delay of 500ms. This
behavior visually communicates the occurrence of an error to the user,
improving the UX.
Fixes: #22803.
To increase the discoverability of the possibility of specifying the
language for a code block, we trigger the language typeahead when code
syntax is added using the code formatting button. A blank option is
shown preselected in the typeahead, so that pressing enter will not
mistakenly add a language to the code block.
We only trigger the typeahead on empty opening fences when added by the
button, by setting a state variable to true when adding the syntax using
the button, checking for this state when sourcing languages for the code
typeahead, and then resetting the state variable to false.
Fixes: #29150.
Now we don't hide the typeahead if the focus is back in the input within
150 ms. This is common when using the compose formatting buttons, which
only momentarily take the focus away from the input.
This is a prep commit for the next, to show typeahead on adding code
syntax with the code formatting button.
The inline `format` function defined in `format_text` function` now
returns true if formatting was added rather than removed, else false.
This is a prep commit for the upcoming change to show typeahead on using
the code formatting button to add code formatting to any selected text.
The bots do not exist in the user table to look up their active
status, and attempting to import them into the analytics table will
result in duplicate rows.