Commit Graph

65886 Commits

Author SHA1 Message Date
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
Shubham Padia
7ce87c66ac help: Make loose lists tight for help center files.
In our current implementation, loose lists and tight lists look the same
visually. Loose lists are lists with blank lines between list items, and
the contents of a list item should be enclosed in a paragraph tag in
that case. For unordered lists, paragraph tags have a bottom margin in
starlight and thus looses lists look much more spaced out than tight
lists.

That is not the behaviour we had in mind while writing the
documentation, the reason we had all these loose lists is to make the
documentation easy to write and read. So we attempt to remove all the
blank lines and fix the problem at source. Since paragraph tags are used
for other purposes in a list in starlight, it won't be a wise decision
to let the source be as is and just change things in css, other expected
behaviours might break in that case. See this topic for more details:
https://chat.zulip.org/#narrow/channel/19-documentation/topic/new.20help.20center.3A.20regressions/near/2226084

All the changes were made by a one-off script which has not been
commited to the repo. The script wasn't perfect and could not decide
between blank lines that make a list loose vs blank lines necessary for
a sub-list or a code block inside a list item. A manual review of all
the changes was done before making this commit to ensure that no
unintended changes were made to the help center files.
2025-07-22 14:36:25 -07:00
Alex Vandiver
2f4dd72076 push_notifications: Adjust APNs tokens to be case-insensitive in the database.
APNs apparently treats its tokens case-insensitively; FCM does not.
Adjust the `unique_together` to instead be separate partial
constraints, keyed on the `kind` of the PushDeviceToken.
2025-07-22 14:30:13 -07:00
Anders Kaseorg
63f6a97f0c install-shfmt: Upgrade shfmt from 3.11.0 to 3.12.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-22 14:19:56 -07:00
Anders Kaseorg
d0f9fb73cc dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-22 14:19:56 -07:00
Anders Kaseorg
abe36b2c3d eslint: Fix unicorn/require-module-specifiers.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-22 14:19:56 -07:00
Anders Kaseorg
adf10dcab9 eslint: Fix unicorn/no-array-reverse.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-22 14:19:56 -07:00
Anders Kaseorg
c911dcf279 install-node: Upgrade Node.js from 22.17.0 to 22.17.1.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-22 14:19:56 -07:00
Karl Stolley
8b667be929 left_sidebar: Hold topic filter input to a single line. 2025-07-22 14:18:02 -07:00
Karl Stolley
b31b4c7451 Revert "inputs: Fix input icons' vertical alignment for multi-line inputs."
This reverts commit 39e467c0dd.
2025-07-22 14:18:02 -07:00
Shubham Padia
e2011fcd97 icons: Do not allow stroke property via the style tag in svgs.
We already had a lint rule for this, but we did not disallow setting it
from the style side. There is no existing violation of this rule, but
it's still better to have this rule in place.
2025-07-22 12:55:05 -07:00
Shubham Padia
22d8c725eb icons: Do not allow stroke property via the style tag in svgs.
We already had a lint rule for this, but we did not disallow setting it
from the style side. This was breaking the icons changed in this commit
in our new astro help center.
2025-07-22 12:55:05 -07:00
Shubham Padia
d24f2972d4 icons: Do not allow fill property via the style tag in svgs.
We already had a lint rule for this, but we did not disallow setting it
from the style side. This was breaking the icons changed in this commit
in our new astro help center.
2025-07-22 12:55:05 -07:00
Shubham Padia
81464c2812 help-beta: Make icons work in dark mode.
The icons were not changing color in dark mode, after setting fill to
currentColor, that problem should be solved.
2025-07-22 12:55:05 -07:00
Shubham Padia
bd935e07d8 help-beta: Use defaultClass instead of defaultStyle.
Somehow defaultStyle was not getting applied in all cases, but
defaultClass was getting applied in all cases. We don't have time to
investigate, but using a class is better anyways, so this change should
be fine.
2025-07-22 12:55:05 -07:00
Evy Kassirer
935a8b9278 events: Consider partial_subscribers key in apply_event.
Fixing bug reported here:
https://chat.zulip.org/#narrow/channel/343-kandra-errors/topic/KeyError.3A.20'subscribers'/near/2226586
2025-07-22 12:49:28 -07:00
Ryan W. West
b3acbf3146 docs: Fix Markdown developer docs discussion of headings. 2025-07-22 12:34:17 -07:00
Alex Vandiver
dbe1f778cf grafana: Be more forgiving of missing alert keys. 2025-07-22 12:20:04 -07:00
Evy Kassirer
3bb08183f7 stream_list: Remove unused references to stream-filters-label. 2025-07-22 12:15:54 -07:00