Commit Graph

65952 Commits

Author SHA1 Message Date
Alex Vandiver
fd390b9eb1 settings: Enable Altcha in development if on localhost.
We only do this on localhost, because users of remote development
servers will run afoul of "Secure context is required"[^1].

[^1]: https://altcha.org/docs/troubleshooting/#secure-context
2025-07-25 22:29:51 -07:00
Alex Vandiver
74675fae94 settings: Use get_secret for altcha_hmac.
When building tarballs, we do not have development secrets.
2025-07-25 22:29:51 -07:00
Alex Vandiver
8af90294d8 altcha: More error-proofing around settings validation. 2025-07-25 22:29:51 -07:00
Aman Agrawal
f0f916f538 navbar: Fix double outline on navbar when focused via keyboard.
Fixes #35001

`outline-style: auto` results in double outline of white and
dark blue which doesn't look good. Replaced to use white outline
only.
2025-07-25 22:27:29 -07:00
Sayam Samal
5d4b9ee505 topic_popover: Show loading indicicator on topic resolve/unresolve.
This commit shows a loading indicator in the recipient bar when the
user resolves or unresolves a topic from the topic actions menu.

Since we do not have a unresolve icon button in the recipient bar
following commit 23ac87606a, we
first render a icon button with a placeholder icon in the recipient bar,
and then show the loading indicator when the user clicks on the
"Mark as unresolved" option in the topic actions menu.
2025-07-25 22:27:03 -07:00
Aman Agrawal
df126300b3 pm_list: Fix dm filter not cleared on zooming out.
`clear_search` doesn't reset the filter text which causes the
issue, hence fixed by clearning the filter text here.
2025-07-25 22:25:45 -07:00
Alex Vandiver
6c4d3f89c9 i18n: Update .po files with ./manage.py makemessages. 2025-07-25 20:30:42 +00:00
Alex Vandiver
f9fb0027d7 i18n: Remove translations which had bogus empty plurals. 2025-07-25 20:29:21 +00:00
Hosted Weblate
291e8699b4 i18n: Sync translations from Weblate. 2025-07-25 22:13:10 +02:00
Sayam Samal
b24b3c49db left_sidebar: Replace CSS a selector with specific class selectors.
This commit simplifies the CSS selectors in the left sidebar styles by
replacing generic `a` selectors with more specific class selectors.

This change enhances the specificity of the styles, and improves the
selectors' performance.
2025-07-25 13:13:05 -07:00
Sayam Samal
dca7f71fca left_sidebar: Fix focus styles for BROWSE CHANNEL/LOG IN TO BROWSE MORE. 2025-07-25 13:13:05 -07:00
Sayam Samal
701c81d919 left_sidebar: Make LOG IN TO BROWSE MORE link keyboard accessible. 2025-07-25 13:13:05 -07:00
Sayam Samal
94b6b6ead4 left_sidebar: Fix focus styles for back to channels link in topics list. 2025-07-25 13:13:05 -07:00
Sayam Samal
2462a6b457 left_sidebar: Fix ENTER key behavior in back to channels in topics list.
This commit addresses the issue where pressing the ENTER key on the
"back to channels" link in the zoomed in topics list did not perform
the intended action by adding the `trigger-click-on-enter` class to
the element.
2025-07-25 13:13:05 -07:00
Sayam Samal
c3aaaa2303 left_sidebar: Fix focus styles for back to channels link in DM list. 2025-07-25 13:13:05 -07:00
Sayam Samal
ac0f3a0817 left_sidebar: Fix ENTER key behavior in back to channels in DM list.
This commit addresses the issue where pressing the ENTER key on the
"back to channels" link in the zoomed in direct messages list did not
perform the intended action by adding the `trigger-click-on-enter`
class to the element.
2025-07-25 13:13:05 -07:00
Sayam Samal
fa266701e0 left_sidebar: Make DM list back to channels link keyboard accessible. 2025-07-25 13:13:05 -07:00
Sayam Samal
63200b9e9e left_sidebar: Fix ENTER key navigation in more conversations in DM list.
This commit addresses the issue where pressing the ENTER key on the
"more conversations" link in the direct messages list did not perform
the intended action by adding a `trigger-click-on-enter` class to the
element.

This allows the `process_enter_key` function to explicitly trigger a
click event on the element when the ENTER key is pressed, ensuring that
the associated click handler is called.
2025-07-25 13:13:05 -07:00
Sayam Samal
9ce596fbd8 left_sidebar: Fix focus styles for show more conversations in DM list. 2025-07-25 13:13:05 -07:00
Sayam Samal
41bc50f2d6 left_sidebar: Fix focus styles of items in DM list. 2025-07-25 13:13:05 -07:00
Sayam Samal
c41b1e2a60 left_sidebar: Fix focus styles for stream list. 2025-07-25 13:13:05 -07:00
Sayam Samal
52c8307031 left_sidebar: Fix focus styles for topic list. 2025-07-25 13:13:05 -07:00
Prakhar Pratyush
6ab6df96c8 push_notification: Send a list of push requests.
Earlier, we were passing a map `device_id_to_encrypted_data`
and http headers as separate fields to bouncer.

The downside of that approach is it restricts the bouncer to
process only one type of notice i.e. either notification for
a new message or removal of sent notification, because it
used to receive a fixed priority and push_type for all the
entries in the map.

Also, using map restricts the bouncer to receive only one
request per device_id. Server can't send multiple notices
to a device in a single call to bouncer.

Currently, the server isn't modelled in a way to make a
single call to the bouncer with:
* Both send-notification & remove-notification request data.
* Multiple send-notification request data to the same device.

This commit replaces the old protocol of sending data with
a list of objects where each object has the required data
for bouncer to send it to FCM or APNs.

This makes things a lot flexible and opens possibility for
server to batch requests in a different way if we'd like to.
2025-07-25 12:47:55 -07:00
Prakhar Pratyush
3d3f4d5e62 push_notification: Remove 'get_apns_payload_data_to_encrypt'.
'get_apns_payload_data_to_encrypt' was added in commit
0ae34ddb65, in parallel
to 'get_message_payload_apns' - to use in E2EE codepath.

The intent was to avoid nesting in the payload returned
by 'get_message_payload_apns' function, just like FCM
payload returned by 'get_message_payload_gcm'.

Turned out, the nesting is helpful in APNs case for various
reasons. So, this commit reverts that function and we'll
continue to use the older structure returned by the function
'get_message_payload_apns'.
2025-07-25 12:47:55 -07:00
Alya Abbott
8b72f51156 recent: Follow current pattern for placeholder text.
We no longer show keyboard shortcuts in placeholders.
2025-07-25 12:37:31 -07:00
Karl Stolley
b5e011565f portico: Prevent label styling from affecting altcha-label. 2025-07-25 11:55:54 -07:00
Sahil Batra
34cb0034e1 settings: Handle long names better in susbcribers and members list.
This commit updates the subscribers and group members table CSS to
use fixed layout. This helps in having user pill take the width if
available and we can show more characters.

Previously the width of name in user pill was set to have a max
width of 165px which meant the there was some empty unused space in
the rows especially on narrow screens when email column was hidden.

Fixes #35157.
2025-07-25 11:21:23 -07:00
Aman Agrawal
1d7b9ea83c compose_tooltips: Fix message edit tooltip visible without mousemove.
Fixes #34009

Fixed by only initializing tippy instance once user moves mouse.
2025-07-25 11:10:07 -07:00
Maneesh Shukla
074850ef5d message-edit-tooltips: Fix the breaking tooltips on rerender.
Fixes: #35217.
2025-07-25 11:10:07 -07:00
Karl Stolley
6341bf192d compose_attention: Handle general-topic corner case. 2025-07-25 11:07:58 -07:00
Karl Stolley
cb96ddc1ff compose_attention: Handle cases where topics are undefined. 2025-07-25 11:07:58 -07:00
Lauryn Menard
07ff9ec4f9 help: Add mobile tab for "Rename a topic" instructions. 2025-07-25 10:09:56 -07:00
Alex Vandiver
25fbb05fea upload: Attempt to guess character set text/* which are served inline.
This is only `text/plain`, currently.  In such cases where the
client-provided content-type also does not specify a `charset`, we use
`chardet` to make a guess, and store that guess to provide later when
serving the content.  The detection is done in a streaming fashion,
and thus should not require re-downloading the full content.
2025-07-24 22:40:12 -07:00
Alex Vandiver
ae001dfa96 upload: Allow uploads to set charset.
Previously, the `user_file.content_type` only contained the MIME type
of the uploaded file; no other parameters were included, meaning that
a file a client specified as `content-type: text/plain; charset=big5`
would be stored with an `Attachment.content_type` of `text/plain`.

Re-construct the full content-type header from `content_type_extra`,
which includes those parameters.

We do not include a test because Django does not support specifying
such parameters in the upload path.
2025-07-24 22:40:12 -07:00
Alex Vandiver
edb5943d8b upload: Use content_type instead of mimetype for consistency. 2025-07-24 22:40:12 -07:00
Alex Vandiver
183da665ac upload: Rename .source to .vips_source. 2025-07-24 22:40:12 -07:00
Shubham Padia
28cb68117f help-beta: Better align icon with the rest of the text for ZulipTip. 2025-07-24 22:35:40 -07:00
Anders Kaseorg
fa23059f17 event_schema: Fix Enum validation in check_realm_update and friends.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-24 22:35:05 -07:00
Anders Kaseorg
ba53ec5712 event_types: Add missing default EventPushDevice.error_code = None.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-24 22:34:20 -07:00
Anders Kaseorg
94ed87129f event_types: Remove defunct PersonIsBillingAdmin.
Commit c049259d07 (#33739) should have
removed this completely, rather than merely removing its
is_billing_admin member.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-24 22:34:06 -07:00
Anders Kaseorg
87e866d23e event_types: Unmark typing_edit_message recipient fields as optional.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-24 22:33:49 -07:00
Anders Kaseorg
4603472fe3 event_types: Combine typing_edit_message variants.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-24 22:33:49 -07:00
Anders Kaseorg
30f93fa563 event_types: Remove nonexistent realm_billing event.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-24 16:50:39 -07:00
Karl Stolley
1bba4c2a99 recent_view: Don't apply line-clamping to 1:1 DMs. 2025-07-24 16:49:53 -07:00
Karl Stolley
ea58f35941 recent_view: Ensure all DMs get an identifying class. 2025-07-24 16:49:53 -07:00
Mohammad Reza Kianifar
015f674520 notification: Use existing email format for missed 1:1 DM via DM group.
To maintain API compatibility, we render the email notification for
missed 1:1 direct messages using DirectMessageGroup with the same
format as messages sent to a Personal recipient.
2025-07-24 16:41:52 -07:00
Prakhar Pratyush
2dbc17b453 push_notification: Revoke push notifications using encrypted payload.
This commit updates 'handle_remove_push_notification' function
to use the new 'send_push_notifications' function.

It leads to encrypt the removal payload before sending it to bouncer.

Fixes part of #35368.
2025-07-24 16:13:00 -07:00
Prakhar Pratyush
84db492dfb push_notification: Reuse 'send_push_notification_legacy'.
This commit refactors 'handle_remove_push_notification'
to reuse 'send_push_notification_legacy' function.
2025-07-24 16:12:59 -07:00
Shubham Padia
fd81f5f5fd help-beta: Make icon + Keyboard Tip: a prefix instead of header.
We do not want icon + `Keyboard Tip:` to occupy it's own row. Our
approach for this component and most of the logic is similar to
ZulipTip. We prefer having separate components for note, tip and
keyboard tip, that is why we have duplicated code between ZulipTip and
KeyboardTip, we should think about having a single underlying component
for both to avoid duplication in the future.
We do not have any cases of non paragraph content in keyboard tip, so we
have removed that chunk of code when copying over logic from ZulipTip.
2025-07-24 13:37:51 -07:00
Shubham Padia
5cb622abbe help-beta: Turn off failing eslint rule for ZulipTip.astro. 2025-07-24 13:37:51 -07:00