Commit Graph

65708 Commits

Author SHA1 Message Date
Rohan Gudimetla
3ec0439c89 markdown: Tweak audio element styles for chromium based browsers.
This commit tweaks some styles for audio elements of chromium
based browsers using `webkit` so as to render them in styles
similar to firefox.
2025-07-16 17:01:06 -07:00
Alex Vandiver
7da05b3f7d tests: Rename gcm_devices to fcm_devices.
We only use GCM in the code when strictly necessary.
2025-07-16 16:59:58 -07:00
Alex Vandiver
5d585eff37 tests: Remove unnecessary tuples. 2025-07-16 16:59:58 -07:00
Alex Vandiver
3e5af466e4 push_notifications: Remove vestiges of base64 storage of tokens.
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.
2025-07-16 16:59:58 -07:00
Maneesh Shukla
3bd8c28fca buttons: Redesign some old-style buttons with rounded class.
Fixes part of #35006.
2025-07-16 14:46:23 -07:00
PieterCK
9de1b47ffa slack_import: Improve topic name for Slack threads.
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.
2025-07-16 14:32:05 -07:00
Mateusz Mandera
4210ccc5db realm_reactivation: Use redirect-to-POST trick.
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.
2025-07-16 13:53:20 -07:00
Tim Abbott
5b00cb6753 Partially revert "home: Enable partial_subscribers in web app."
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.
2025-07-16 13:26:33 -07:00
Tim Abbott
458c660f65 home: Enable partial_subscribers in web app.
Fixed #34244.
2025-07-16 13:11:56 -07:00
Evy Kassirer
55634c8fcc peer_data: Use sub.subscriber_count for get_subscriber_count. 2025-07-16 13:11:56 -07:00
Alex Vandiver
0c000da267 i18n: Update translations from Transifex. 2025-07-16 12:45:20 -07:00
Tim Abbott
45941ba4d1 stream_list: Enter should use web_channel_default_view.
This previously misleadingly named on_stream_click masked the fact
that this was not using the actual click handler.
2025-07-16 12:35:14 -07:00
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