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.
The previous behavior for this component was too annoying if you were
just trying to do a normal filter.
There's definitely more to clean up here; the search_pill.ts usage is
problematic.
This commit updates check_channel_privacy_update to use
do_change_stream_permission for setting the stream privacy
to its old state so that we do that in a reliable way and
can avoid bugs in future.
This commit updates how we check permission for updating
properties of an unsubscribed private channel.
There is no need of checking all can_administer_channel_group
values for unsubscribed private channel, when we check them
for a subscribed private channel. It is sufficient to check
one case where an unsubscribed user can update private channel
if they belong to can_administer_channel_group.
This also helps in avoiding repeated calls to subscribed_to_stream
which made a DB query that could make the test slow.
This commit updates check_channel_property_update to just
accept error_msg parameter instead of having both allow_fail
and error_msg, as error_msg is sufficient to determine
whether the request is expected to fail or not.
If we hover over a message, we see the message move button
(provided the settings allow so). But if the move deadline is
passed while we're hovering, we still see the move button,
when it should be hidden.
This commit fixes this by updating the move button
visibility when the move deadline is passed.
Fixes#15810.
If we hover over a message, we see the message edit button
(provided the settings allow so). But if the edit deadline is
passed while we're hovering, we still see the edit button,
when it should be hidden.
This commit fixes this by updating the edit button
visibility when the edit deadline is passed.
Fixes#15810.
This commit removes the `args` variable which serves no useful purpose.
The JQuery logic is extracted into a separate function which will later be
used inside timeouts. This is done as a prep to #15810.
Partially fixes#35130.
We will still need to do a second check before the cutover, but this
commit does most of the work before the cutover happens.
The comparison was done manually.
Added comment to sidebar index should help update these changes to astro
config, although we will not solely rely on people reading that. A
second check before cutover would be prudent.
This commit updates error banner shown when group is only used
as subgroups and not as permission.
If group is used as a permission, then we mention that in the
error banner and have a button to go to "Permissions" panel.
We show the same banner even when group is used as a subgroup
as well. But when group is only used as subgroups, we just
show a message containing names of all the supergroups.
Previously, unmuted unread counts for muted channels were still shown
in the left sidebar even when the "Show unread counts for" setting was
set to "No channels".
This commit ensures that unread counts are correctly hidden for muted
channels based on user settings.
This commit shows "Only general chat allowed in this channel" tooltip
close to the topic text instead of in the center of topic input by updating
the topic input box "max-width" to "fit-content".
Fixes#35121.
The ordered list in question when converted to the new help center
looked weird when it was following just after an unordered list. We
add a heading in between to make it look nice.
We could not find any other instances of similar pattern occurring
directly in the markdown. The pattern in this case was also happening
b/w two different imported markdown files, we have not checked for the
pattern post-import since that would be too complicated for the purposes
of our issue.
Co-authored-by: Alya Abbott <2090066+alya@users.noreply.github.com>
Fixes#35119.
In the old help center, our css used to target each heading tag, h1, h2,
etc. individually. We don't need to do that anymore since the first
child of .sl-heading-wrapper is the heading element in starlight.
The rounded border on the top left and top right has been removed since
it did not look good with the default starlight theme.
This is most important for `send_zulip_update_announcements`, which
can race with the version run as a post-deploy hook. However, all of
these crons can tolerate being slightly delayed, and there's little
benefit to them taking CPU or possibly hitting odd borderline race
conditions when the deploy is in progress.
For safety, we only trust the deploy lockfile if it was created
within the last hour -- deploys should not take more than an hour, and
failing to ever run hourly crons is much worse than perhaps running
them during a real very-long deploy.