Commit Graph

65904 Commits

Author SHA1 Message Date
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
Shubham Padia
cb852b0fa6 help-beta: Add ZulipTip custom component that does not have a header.
We do not want to have a heading for every tip and thus we created a
custom component for our aside. We want to add a lightbulb icon and the
text `Tip:` is bold as a prefix for every tip as if it was already part
of the text. To do that, we cannot insert both of those as html seperate
from the slot html, we had to access the slot html and insert both of
them into the HTML tree.
2025-07-24 12:00:26 -07:00
Shubham Padia
78eed0a817 help: Make loose list tight for import-self-hosted-server-tips. 2025-07-24 12:00:26 -07:00
Shubham Padia
41846b35ab help-beta: Convert indented admonitions to asides.
Fixes https://chat.zulip.org/#narrow/channel/19-documentation/topic/new.20help.20center.3A.20broken.20tip
After indenting asides properly, they became part of lists, so we had to
change Flattenlist to allow asides inside it and ignore comments.
2025-07-24 11:59:48 -07:00
Aman Agrawal
500e40f786 inbox: Attempt to fix inbox scrolling to top on scrolling down.
We focus on the middle row instead of the top which is what we
use for recent view. Recent view doesn't have this problem, AFAIK,
so hopefully this will fix it.
2025-07-24 11:58:29 -07:00
Prakhar Pratyush
29ea8a07c2 push_notification: Add support to configure priority and push_type.
This commit adds support to let server configure:
* fcm_priority
* apns_priority
* apns_push_type

while sending E2EE push notifications.

The values of these fields will vary depending on whether the
send request is to send push notification for a message or
revoke an already sent notification.

Since, the bouncer receives encrypted data so it can't inspect
the payload to determine whether it is a removal request or not,
hence can't configure priority on its own.

The server needs to specify explicitly.

We're not simply sending a single 'is_removal' flag because
allowing the server to configure them separately will help in
future to support other types of notifications with a different
combination of priority and push_type, like whose aim is to notify
user about information other than a new message or removal request.

Fixes part of #35368.
2025-07-24 11:56:42 -07:00
Prakhar Pratyush
945f27f099 push_notification: Remove redundant @activate_push_notification_service.
In 'test_e2ee_push_notifications', the `SendPushNotificationTest` class
is already decorated with `@activate_push_notification_service()`,
so individual test methods do not need to repeat it.
2025-07-24 11:56:42 -07:00
Vector73
6f8cb2b787 message_delete: Refactor message delete functions in a new file. 2025-07-24 11:53:34 -07:00
Pratik Chanda
e7629ef07d message_flags: Fix message flags not updating for wildcard mentions.
Earlier, editing a message with wildcard mention and removing the
wildcard mention didn't properly remove the corresponding flag for
it in the message object. It was only updating flags when mentions
were present in new message but not the other way around.

This commit fixes this behaviour by removing flags if the new message
removed mention from it.
2025-07-24 11:52:20 -07:00
Pratik Chanda
9a283d0641 css: Fix selector for user-pill-container so that it isn't overridden.
This commit improves the selector for user-pill-container so
that rules for it aren't overridden by parent styles. Also fixes
the user pill min-widdth being overridden.
2025-07-24 11:48:48 -07:00
Karl Stolley
8a833311de left_sidebar: Correct filter-input ellipsis bug in Safari. 2025-07-24 11:47:13 -07:00
Karl Stolley
9720fc93c3 left_sidebar: Correct filter-input scrollbar artifact. 2025-07-24 11:47:13 -07:00
Lauryn Menard
c056edb9d0 help: Indent tables that are in unordered lists.
Updates tables in "Import from ..." articles that map user roles
to be indented and therefore in the unordered list item.
2025-07-24 09:22:56 -07:00
Shubham Padia
21bcf590a1 help-beta: Use zulip-unplugin-icon class for font awesome icons. 2025-07-24 09:02:00 -07:00
Alya Abbott
c082c9875a docs and portico: Update contributor numbers.
Fixes #35350.
2025-07-23 23:31:32 -07:00
Karl Stolley
56739f950c poll_widget: Disallow poll-vote count collapsing. 2025-07-23 16:18:36 -07:00
Sayam Samal
9a49007ef1 showroom: Fix wrong process name for desktop notifications banner. 2025-07-23 12:01:33 -07:00
Sayam Samal
d00cf1a0e8 banners: Improve responsiveness in normal banners.
This commit improves the responsiveness of normal banners by adopting a
flexbox layout for the label and action buttons. This change better
accommodates varying text lengths and button counts in the banners, due
to the natural flowy nature of flexboxes.

The key logic shift involves using `flex-basis` to manage layout
transitions: the label and the group of action buttons now wrap to
separate lines when the label's width is less than 60% of the banner
query container's width (60cqw).

This commit also updates the CSS for navbar banners to align with the
new flexbox layout between the label and the group of action buttons,
while also ensuring that the layout behavior of these banners remains
consistent with the previous implementation.
2025-07-23 12:01:33 -07:00
Karl Stolley
b26e54b724 compose: Disregard textarea-focus for low-attention setup.
As noted in the comment, focus in the recipient row is
better handled by event handlers elsewhere.

This change also allows us to avoid a race condition
when determining focus is deferred (as is the case
with the auto-opened compose box on DMs).
2025-07-23 11:58:47 -07:00
Karl Stolley
7515ed45be compose: Defer triggering focus.
This commit fixes a bug on iPad/Safari that caused
the entire viewport to scroll wildly when navigating
to lengthy DM conversations.

Co-Authored-By: Aman Agrawal <amanagr@zulip.com>
2025-07-23 11:58:45 -07:00
Karl Stolley
4ddaaead10 left_sidebar: Remove dead CSS that serves no purpose. 2025-07-23 11:54:26 -07:00
Karl Stolley
05abb17415 left_sidebar: Remove dead CSS that may cause hover cutoffs. 2025-07-23 11:54:26 -07:00
Vector73
6aac806f76 message_delete: Remove explicit is_spectator condition.
Removes explicit `is_spectator` condition when checking if
message can deleted as it is checked by
`user_has_permission_for_group_setting` function.
2025-07-23 11:52:48 -07:00
Aman Agrawal
94dc41f8cd inbox: Fix is_waiting_for_revive_current_focus not being reset.
`is_waiting_for_revive_current_focus` should be set to `true`
when inbox is hidden so that it be correctly checked when
it inbox is displayed later.
2025-07-23 11:50:20 -07:00
Lauryn Menard
95e6af8c64 api-docs: Revise feature level 404 and 392 changes entries.
Updates the changelog entries for feature levels 404 and 392, and
revises the descriptive text for the topics_policy channel and
realm level settings.

The feature level 404 changes were originally added in commit
a77fc6aa79.

The feature level 392 changes were originally added in commit
deaa43c7e6.
2025-07-23 11:49:55 -07:00
Lauryn Menard
7d3b5859fb api-docs: Fix some colon typos in API changelog entries. 2025-07-23 11:49:55 -07:00
Shubham Padia
7311d7e11b help-beta: Add styling for kbd elements.
Fixes #35404.
The styling is just copy-pasted from existing styling.
For ⌘ and ⌥, we removed vertical align as middle, since it was not
aligning with the new css and it looked fine without it. The font-size
was also looking too big, which has been reduced but not all the way to
0.85em. At 0.85em, the symbol is not legible.
2025-07-23 11:37:38 -07:00
Aman Agrawal
42b5a9b8c1 inbox: Focus first row instead of header on keypress.
If the user has not scrolled and this is their first keypress,
focus on conversation row instead of a header.
2025-07-23 11:30:38 -07:00
Shubham Padia
9f6c00a52c help-beta: Set class explicitly instead of using default class.
Even though we do not allow classes in svgs anymore, astro inserts it's
own class in some cases, causing problems with the icons. `defaultClass`
is only applicable if the svg does not have a class already. So we have
switched to using iconCustomizer instead so the zulip icons always have
the `zulip-unplugin-icon` class.
2025-07-23 11:24:12 -07:00
Shubham Padia
6b66449352 help: Disallow class in svg.
When copying svg from other places e.g. lucide, class names are also
copied over. These classes are not defined in our css and thus have no
effect whether they are present or not. But if the svg has the class
property, unplugin-icon will not override that class property and apply
the defaultClass we have defined in astro.config.mjs. We need that class
for our icons to look as desired.
2025-07-23 11:24:12 -07:00
Lauryn Menard
353a2047e1 help: Indent tip to be in unordered list for link to message article. 2025-07-23 11:13:41 -07:00
Vector73
fc415e1fc5 pill_container: Remove hardcoded HSL value from input_pill.css. 2025-07-23 11:13:07 -07:00
Shubham Padia
db0cbcbdf5 help: Reference link should not be inside the admonition.
The current help center renders it correctly somehow but the new help
center needs it to be outisde the tip.
2025-07-23 11:12:34 -07:00
Prakhar Pratyush
1c7dd83dbe register_push_device: Add an error code to push-not-configured error.
This commit adds an error code to make it easier for clients
to identify when push device registration is rejected due to
server not being configured to use push notification service.

Fixes part of 35368.
2025-07-23 11:11:46 -07:00
Karl Stolley
a4d70505ec left_sidebar: Normalize input-wrapper row height. 2025-07-22 20:59:02 -07:00
Alex Vandiver
5319a2f33e narrow: Skip topic mutes for DM narrows. 2025-07-22 20:57:36 -07:00
Alex Vandiver
83acf70d0f models: Add a partial index on unread DMs.
This helps the find_first_unread_anchor call for DMs with a user.
2025-07-22 20:57:36 -07:00
Aman Agrawal
04f7dd998b inbox: Don't changed focused element on the first user keypress.
This is important to let user know where the focused element is
before they start navigating.
2025-07-22 17:23:47 -07:00
Aman Agrawal
26f215cc8e inbox: Fix current_focus_id not updated on click.
If user is focused on search and clicks on a row, focus is
not shifted to row.
2025-07-22 17:23:47 -07:00
Aman Agrawal
0f1cccc1cc inbox: Don't show focus outlines without inbox relevant keypress.
Untill user uses a keypress that inbox handles, we don't show
focus outlines.
2025-07-22 17:23:47 -07:00
Aman Agrawal
9d643ba31b stripe: Add test to verify charge for new users during free trial.
Added test to check if customer is charged for new users after
invoice payment at the end of free trial.
2025-07-22 17:13:37 -07:00
Aman Agrawal
626524ba8e inbox: Attempt to fix inbox scrolling to top unexpectedly.
Inbox can suddenly scroll to top due to a rerender when user
is trying to scroll down. A possible caues for this is
`move_focus_to_visible_area` being triggered on scroll but the
element located using:

```
document.elementFromPoint(inbox_center_x, inbox_row_below_filters);
```

being out of view. To fix it, we try to locate the element in the
same animation frame. This will remove the possibility of element
being out of view when we try to set focus to it.
2025-07-22 17:12:50 -07:00
Prakhar Pratyush
7e1afa0e8a push_notification: Send end-to-end encrypted push notifications.
This commit adds support to send encrypted push notifications
to devices registered to receive encrypted notifications.

URL: `POST /api/v1/remotes/push/e2ee/notify`
payload: `realm_uuid` and `device_id_to_encrypted_data`

The POST request needs to be authenticated with the server’s
API key.

Note: For Zulip Cloud, a background fact about the push bouncer is
that it runs on the same server and database as the main application;
it’s not a separate service. So, as an optimization we directly call
'send_e2ee_push_notifications' function and skip the HTTP request.
2025-07-22 17:08:55 -07:00
Aman Agrawal
fa9165236d inbox_ui: Minor refactor.
Use `inbox-folder` class to check if the row is an inbox folder.
2025-07-22 17:04:56 -07:00
Aman Agrawal
e8aa6e9ecf inbox_ui: Fix scroll jumb when coming back when scrolled down.
Used the same method used to fix it in recent view.
2025-07-22 17:04:56 -07:00
Sahil Batra
eb57fe10a2 streams: Handle empty topic only streams being used for announcements.
This commit updates code to send messages to "general chat" topic
if streams used for announcements for "New user signups",
"New created streams", "Moderation requests" and "Zulip updates"
have topics policy set to allow only "general chat" messages.
2025-07-22 16:59:47 -07:00
Mateusz Mandera
639972b753 get_recursive_group_members: Use DISTINCT in the query.
Having repetitions in the result can cause subtle bugs in callers that
don't expect it.
2025-07-22 16:21:05 -07:00
Shubham Padia
b0914167eb help: Remove organization-type-intro macro.
Fixes
https://chat.zulip.org/#narrow/channel/19-documentation/topic/new.20help.20center.3A.20Includes.20inside.20list.20item
The macro works fine for the current help center. But for the new help
center, the macro has a paragraph tag already, when it is part of a list
item, the margin inserted by starlight causes spacing issue. We can
override the margin for this specific case when we have the ability to
modify the MDX directly. Issue for that: #35407. Until then, we remove
this macro since it's only used it two places to have proper spacing.
2025-07-22 14:48:08 -07:00
Shubham Padia
b88afcc043 help: Move reference link away from the middle of a list.
The blank lines around it were causing weird spacing issues in the new
help center.
2025-07-22 14:36:25 -07:00