In some cases, some of the starlight css was inserting a margin top of
1rem to the svg tag inserted by unplgin-icons. We make the top margin
0 explicitly to make sure that extra margin is not added.
Slug was mentioned for the two entries in question as if they were
normal help pages, but they were external links and should have been
mentioned accordingly.
This repeats #34801, but also covers the cases where the msgstr was
already trimmed, because the translator did not bother to include the
leading/trailing whitespace in their translations.
We show the UI to send email to the user being deactivated when
deactivating user from button in "Manage user" section of user
profile modal, but the email text was not included in the API
request sent to server and thus no email was sent. This commit
fixes it to send the email if it was configured while deactivating
the user from "Manage user" modal.
0229f73fae introduced a bug wherein
while caching the media assets keyed using the message id, previews of
media from composebox which also used same codepath attempted to find
the message id from the asset. This resulted in an assertion error.
This is fixed by making sure that compose previewable assets are
never cached nor attempted to fetch from cache since they don't
have a message id yet.
Co-authored-by: Tim Abbott <tabbott@zulip.com>
APNs tokens are provided by the client in hex, and we store them in
hex. The existing code which attempts to "validate" them by parsing
them as base64 only works because base64 is a superset of hex.
Enforce that APNs tokens are hex, and remove all of the pieces of test
code which were incorrectly passing them in as base64 strings.
This updates the topic name format for Slack threads to include a
snippet of the original message. Currently the format looks like this;
"{date} Slack thread {n}", which provides little to no context about the
thread.
Currently we also use the `thread_ts_str` key to keep track of Slack
threads we're converting, this key format makes it so that it has a
small chance of combining threads with the same timestamp under one
topic. This commit updates it to use a new key format, `thread_key`.
Fixes#27661.
Uses the approach done for email change confirmations in #34980 to avoid
triggering a reactivation via just a GET request. Instead, the GET
should return a page which will trigger the browser to then POST the key
to the endpoint.
This reverts commit 458c660f65.
We realized we need one more pull request before we can turn this on.
I kept the hunks related to finalizing the cutoffs.
Clicking on the stream row should open the message view
as per "Channel links in the left sidebar go to" setting.
But this happens only when clicking on stream name element
and not on the complete stream row, like clicking on the
privacy icon or towards the left of it, opens the channel
feed always irrespective of the setting. This commit
fixes that.
Updated the code to attach the "New topic" button handler
to "#stream_filters" element instead of "body", as it was
not being executed due to stopPropagation being called in
the click handler for "a" element for stream row.
Attaching the event to "#stream_filters" makes sure that
clicking on "New topic" button calls the handler for it
first and stops event from being propagated to the "a"
element for stream row.
Also moved "New topic" handler to stream_list.ts, as it
would be easy to maintain them if all handlers for the
UI are in the same file.
This also fixes the bug when pressing "Enter" key after
clicking on a stream row did not open the compose box for
replying to the selected message which is the expected
behavior when "Channel links in the left sidebar go to"
setting is set to value other than "List of topics".
Having some options not set to true was causing hard to debug issues
when it comes to types. While that can be solved by changing `allowJs`
to true, it would be good to use the standard tsconfig they recommend in
order to avoid such issues in the future.
Fixes#31287.
These tags are not limited to just KeyboardTip, so we want to run the
transformation on all html.
We need to run the transformation client-side since the user's keyboard
style is only known at that time.
We had to override the HEAD component since that's what starlight
recommends to do if we want to include local assets on every page. If we
were using a remote js file, we could have modified the head config
option provided by starlight.
The script file to adjust the tags is mostly just copy-paste of the
original function to adjust for the lack of JQuery. Most of the comments
are also copy-pasted.
One change in the new script is to just use ⌘ symbol directly instead of
using zulip-icon since we don't have any centering problems in the new
help center.
This also ends up consistently calling clear_topic_moved_info for all
code paths where we exit the function without adding a banner. It
might be better to just call that clear function at the start; I'm not
entirely sure why we don't do that.
This commit Removes `deactivate-user-button` and
`reactivate-user-button` classes.
These classes were originally introduced in commits
50582b72b6 and
c0b3fb1bbe for the sole
purpose of styling. The associated styles were later removed
in 1c89c3e647 but the classes
themselves were mistakenly left behind.
Removing them has no effect in the functionality of the
buttons and there is no evidence of any bugs or regression
caused by their removal.
This commit addresses the issue where the topic highlighting
in search results was offset by one character when an
apostrophe was present. The problem stemmed from the disparity
in HTML escaping generated by the function `func.escape_html` which
is used to obtain `topic_matches` differs from the escaping performed
by the function `django.utils.html.escape` for apostrophes (').
func.escape_html | django.utils.html.escape
-----------------+--------------------------
' | '
To fix this SQL query is changed to return the HTML-escaped
topic name generated by the function `func.escape_html`.
Fixes: #25633.
Co-authored-by: Pieter CK <pieterceka123@gmail.com>
When inserting a channel link in the compose box, the topic typeahead
is now not shown for channels that allow only empty topics. This
ensures a direct link to the channel is inserted.
The comment came from when the only use of `AUDIO_INLINE_MIME_TYPES`
was based on the result of `mimetypes.guess_type`, which would happen
to always return `video/mp4` and not of `audio/mp4` for `.mp4` files.
Before being merged, the code was updated to examine uploaded files'
content-type, which can very well be `audio/mp4` -- and in such cases,
should very much be shown inline.
Add the missing content-types to `AUDIO_INLINE_MIME_TYPES`, and remove
the comment.