Commit Graph

8984 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
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
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
Vector73
fc415e1fc5 pill_container: Remove hardcoded HSL value from input_pill.css. 2025-07-23 11:13:07 -07:00
Karl Stolley
a4d70505ec left_sidebar: Normalize input-wrapper row height. 2025-07-22 20:59:02 -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
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
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
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
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
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
Evy Kassirer
3bb08183f7 stream_list: Remove unused references to stream-filters-label. 2025-07-22 12:15:54 -07:00
Evy Kassirer
c942900b69 stream_list: Hide channels on zoom-in using .hide instead of hide().
This gives us more control, for example `show()` was adding
`display: inline-block;` to channels after unhiding them
which was overriding other code (added for channel folders
in future commits) that was trying to hide the channels.
2025-07-22 12:15:21 -07:00
Sayam Samal
c92e9a7229 topic_list: Move input blur on escape logic to hotkey.js module.
This is a follow-up commit to 021d6cb169,
and moves the logic for blurring the topic filter input when the escape
is pressed from `clear_topic_search` to the `web/src/hotkey.js` module
for better code readability, and to be in adherence with the comment
in `web/src/hotkey.js` which states the logic for handling the escape
key interaction.
2025-07-21 23:16:26 -07:00
Sayam Samal
39e467c0dd inputs: Fix input icons' vertical alignment for multi-line inputs. 2025-07-21 23:16:26 -07:00
Sayam Samal
a3e740e332 inputs: Replace border with outline for input elements.
This commit replaces the `border` property with `outline` for input
elements, since the `outline` property is more suitable for focus
indicators. This change also removes the need for extra padding
adjustments due to the border's impact on layout.
2025-07-21 23:16:26 -07:00
Sayam Samal
7f3ff923b8 recent_view: Fix recent view search bottom margin. 2025-07-21 23:16:26 -07:00
Sayam Samal
122d93d430 filter_input: Add explicit classname for filter clear button.
This commit adds an explicit "input-close-filter-button" classname to
the filter input clear button, improving the readability of the code.
2025-07-21 23:16:26 -07:00
Aman Agrawal
17a126a926 condense: Fix long unread message collapses after initial render.
After narrowing to a long unread message, the message gets marked
as read and can be collapsed when rerender happens since the
cutoff of read message is different.

Fixed by tracking which messages were unread during initial
render and using the unread cutoff for them until user narrows
again.
2025-07-21 21:47:21 -07:00
Anders Kaseorg
a29ed94e5b web: Switch to Zod mini API.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
cb28bff831 web: Avoid Zod .exclude().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
1d419f864d web: Avoid Zod z.number().int().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
d5996dd356 web: Avoid Zod .rest().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
32e1127489 web: Avoid Zod .loose().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
9266425317 web: Avoid Zod .extend().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
371c798584 web: Avoid Zod .and().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
43e4dbd51b state_data: Simplify state_data splitting.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
9515d77b1e web: Use Zod z.keyof() functionally.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
6dafa9f1c7 web: Avoid Zod .or().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
7c875baf45 web: Use Zod z._default() functionally.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
fec8bc4a61 web: Use Zod z.nullish() functionally.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
2905ce97b6 web: Use Zod z.nullable() functionally.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
21db47989d web: Use Zod z.optional() functionally.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
c431785d3f web: Upgrade to Zod 4.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
73bf77b972 web: Avoid deprecated Zod .merge().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Anders Kaseorg
1f1839f19b web: Replace one-argument z.record() usage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Sayam Samal
b5aa895042 topic_list: Fix bug related to br element in empty contenteditable div.
When the contenteditable div in the topic list filter is empty, the
browser adds a <br> element to it, which interferes with the ":empty"
selector in the CSS — responsible for showing the placeholder and hiding
the clear button in the input field. Hence, we detect this case of an
empty contenteditable div and clear the content of the div to ensure
that the CSS styles are applied correctly.
2025-07-21 16:36:09 -07:00
Aman Agrawal
896fc5e8b6 billing: Fix loading spinner not aligned on upgrade page. 2025-07-21 11:09:19 -07:00