Commit Graph

65696 Commits

Author SHA1 Message Date
Tim Abbott
85835fae9b stream_list: Rename confusing on_stream_click. 2025-07-16 12:35:14 -07:00
Sahil Batra
2294552080 left-sidebar: Fix clicking on stream row in left sidebar.
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".
2025-07-16 12:35:14 -07:00
Shubham Padia
070b94aabc help-beta: Set first paragraph of content as meta.description.
Fixes #35115.
2025-07-16 12:02:32 -07:00
Shubham Padia
c03328eeee help-beta: Use astro recommended tsconfig for our project.
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.
2025-07-16 12:02:32 -07:00
Shubham Padia
e0abc5253b help-beta: Adjust kbd tags if the user is using a mac style keyboard.
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.
2025-07-16 12:00:45 -07:00
Tim Abbott
e9951e9d9a compose_validate: Return early in inform_if_topic_is_moved.
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.
2025-07-16 11:39:14 -07:00
Vector73
fa7a4a953d compose_validate: Don't show topic moved banner on topic resolve.
The topic moved compose warning banner should not shown when
the topic in compose recipient box is only resolved or unresolved.

Fixes #35082.
2025-07-16 11:39:14 -07:00
whilstsomebody
640286b91f admin_human_form: Update classes to kebab-case.
This commit updates the classes `.deactivate_user_button`
and `.reactivate_user_button` to kebab-case as per our
new rules for writing new classes.
2025-07-16 11:16:10 -07:00
whilstsomebody
6649efea70 settings_user_list_row: Remove redundant classes.
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.
2025-07-16 11:16:10 -07:00
Vector73
7895873dc1 pill_container: Fix background color in dark theme. 2025-07-16 10:21:31 -07:00
Apoorva Pendse
6166576059 api_docs: Link to message-formatting article where relevant.
Fixes: https://chat.zulip.org/#narrow/channel/412-api-documentation/topic/document.20html.20for.20markdown/near/2216238.
Signed-off-by: Apoorva Pendse <apoorvavpendse@gmail.com>
2025-07-16 09:39:41 -07:00
apoorvapendse
ebbb208a47 streams: Extract channel description validation logic.
Fixes: Point 1 of https://github.com/zulip/zulip/pull/33405#issuecomment-3064452310
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-07-16 09:38:36 -07:00
apoorvapendse
947658def4 streams: Extract topics_policy validation.
Fixes: Point 3 of
https://github.com/zulip/zulip/pull/33405#issuecomment-3064452310.
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-07-16 09:38:36 -07:00
akshatdalton
520c58bf6b narrow: Fix topic highlighting issue with apostrophes in search results.
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
-----------------+--------------------------
      &#39;      |           &#x27;

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>
2025-07-16 09:26:40 -07:00
Alex Vandiver
e9a2ee56c3 log-search: Add --stats flag. 2025-07-16 09:22:02 -07:00
Alex Vandiver
2616b7d030 log-search: Add a missing new filter flag to -L. 2025-07-16 09:22:02 -07:00
Vector73
f46da0eafb typeahead: Skip topic suggestions for empty-topic-only channels.
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.
2025-07-16 09:21:31 -07:00
Alex Vandiver
c977730f81 mime_types: Remove incorrect comment, and add audio/mp4 and audio/webm.
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.
2025-07-16 09:20:31 -07:00
Alex Vandiver
f87479703d i18n: Remove translations which had bogus empty plurals. 2025-07-15 23:31:47 -07:00
Alya Abbott
85654b19fb help: Document resolved topics filter in the left sidebar. 2025-07-15 17:51:11 -07:00
Evy Kassirer
5a23287cf5 peer_data: Stop returning unused boolean from remove_subscriber. 2025-07-15 17:38:02 -07:00
Tim Abbott
428efeb1a4 topic_list: Only match is: queries in typeahead.
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.
2025-07-15 17:09:11 -07:00
Tim Abbott
24113b5dd5 topic_list: Rewrite typeahead using an item type.
This makes it a lot easier to control the matching and display
separately.
2025-07-15 17:09:11 -07:00
Alya Abbott
421f5e9e0c help: Tighten SAML group sync intro wording. 2025-07-15 17:08:50 -07:00
Sahil Batra
70d18d7528 tests: Move test for permission to update topics_policy.
This commit updates tests for permission to update topics_policy
of a channel to test_channel_permissions.py.
2025-07-15 15:54:30 -07:00
Sahil Batra
7e6d487916 tests: Improve tests for checking permissions to update channel privacy.
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.
2025-07-15 15:54:30 -07:00
Sahil Batra
2126f365c0 tests: Refactor test for checking permission to update channel.
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.
2025-07-15 15:54:30 -07:00
Sahil Batra
534fdc2ac1 test_channel_permissions: Use one parameter for error cases.
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.
2025-07-15 15:54:30 -07:00
PieterCK
580845415b slack_data_import: Refactor get_user_mentions.
This commit extracts a portion of logic from `get_user_mentions` into a
new helper function for reusability. This is a prep commit for #30166.
2025-07-15 15:49:05 -07:00
Kislay Verma
a21afe2d60 message_list_hover: Fix glitch when hovering over a message.
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.
2025-07-15 13:11:24 -07:00
Kislay Verma
14a115224a message_list_hover: Fix glitch when hovering over a message.
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.
2025-07-15 13:11:24 -07:00
Kislay Verma
de4139a219 message_list_popover: Refactor message_hover.
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.
2025-07-15 13:11:24 -07:00
Mateusz Mandera
90640350ed help: Add instructions for Okta-side configuration for SAML group sync.
Also update plans and features table. Follow-up to #34671.
2025-07-15 12:45:09 -07:00
Tim Abbott
8a3b27061c help: Fix typo in link syntax. 2025-07-15 12:43:10 -07:00
Shubham Padia
1a2adb4e82 help-beta: Update sidebar to the current state.
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.
2025-07-15 12:23:47 -07:00
Alya Abbott
cfd9979a3c portico: Add quotes to /for/communities. 2025-07-15 11:58:22 -07:00
Sahil Batra
7b66eb838e groups-ui: Update error shown when group cannot be deactivated.
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.
2025-07-15 11:57:42 -07:00
opmkumar
b5fc39044e left_sidebar: Fix unread counts showing for muted channels.
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.
2025-07-15 11:38:13 -07:00
Vector73
f9e41915c3 pill_container: Fix background-color in dark theme. 2025-07-15 11:12:50 -07:00
opmkumar
722a2cce9d filter: Update title for spectators when using channels:public filter. 2025-07-15 10:48:39 -07:00
Vector73
4e93607fde tooltip: Show only empty topic allowed tooltip on the topic text.
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".
2025-07-15 10:10:02 -07:00
Shubham Padia
8d71793756 help: Add heading between an unordered and ordered list.
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>
2025-07-15 16:39:40 +00:00
apoorvapendse
b8a1a224d5 copy_messages: Prevent blueslip error while copying overlay message header.
Fixes: https://github.com/zulip/zulip/pull/35097#issuecomment-3058834909
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-07-15 09:22:54 -07:00
Shubham Padia
183b79b1ab help-beta: Highlight heading if it is the target.
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.
2025-07-15 09:15:37 -07:00
Pratik Chanda
421b6e9787 hotkey: Add topic filter focus check in is_in_focus.
This commit adds a topic filter focus check inside `is_in_focus`
which prevents shifting focus from topic filter input to topic list
when typing.
2025-07-15 09:13:57 -07:00
Shubham Padia
2cdcadf1c6 help-beta: Remove border after the title. 2025-07-15 09:11:27 -07:00
Shubham Padia
4f23bd2e68 help-beta: Decrease heading sizing by a factor of 1.
Fixes #35123.
2025-07-15 09:11:27 -07:00
Alex Vandiver
6d80d4c77f restart-server: Skip weekly restart-server if a deploy is in process.
This is unlikely, but cron running `restart-server` at the random
wrong time mid-deploy could be bad.
2025-07-15 09:07:36 -07:00
Alex Vandiver
a5a5791794 management: Skip hourly crons during deploys.
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.
2025-07-15 09:07:36 -07:00
Prakhar Pratyush
7d6b18976a api-docs: Fix link formatting and improve status value presentation.
Corrected a broken Markdown link.

Also updated the description of the `status` field to use backticks
with values.
2025-07-15 07:33:16 -07:00