Commit Graph

7579 Commits

Author SHA1 Message Date
Karl Stolley
34cd1e2c27 right_sidebar: Better handle manually hidden right sidebar.
With the larger, flexibly sized right sidebar, we want to allow
for the middle column to expand to fill its place even outside of
the "Use full width on wide screens" setting.
2025-02-26 15:52:24 -08:00
Karl Stolley
1c74b1635b viewports: Re-engineer breakpoint detection from JavaScript. 2025-02-26 15:52:24 -08:00
Karl Stolley
f27a69be71 container_queries: Add baseline container queries and fallbacks. 2025-02-26 15:52:24 -08:00
Karl Stolley
c7702ae3ba container_queries: Establish new breakpoints. 2025-02-26 15:52:24 -08:00
Karl Stolley
d33d09eaf3 app_layout: Establish containers for spec-aligned browsers. 2025-02-26 15:52:24 -08:00
Karl Stolley
430c4d179a container_queries: Detect spec-aligned support.
Some browsers, notably Safari on both iOS and macOS, are not yet
aligned with the CSS specification, which does not force layout
containment but does force an independent formatting context
(see https://github.com/w3c/csswg-drafts/issues/10544).

The little test here will allow us to deliver em-aware container
queries to browsers that are spec aligned, and fall back to media
queries in browsers that are lagging.
2025-02-26 15:52:24 -08:00
Karl Stolley
c2cf7ef571 right_sidebar: Set em-based min and max width, flexible column width. 2025-02-26 15:52:24 -08:00
Shubham Padia
4da8cf35bf right_sidebar: Rename to right column wherever applicable.
In our css variables, we were using sidebar and column interchangably.
But, sidebar is 10px less wider than the column. This commit makes no
behaviour change, but renames variables to use column where necessary
and uses variable for sidebar instead of a fixed 240px value.
2025-02-26 15:52:23 -08:00
Karl Stolley
dc326dd5ed css_variables: Remove unused breakpoints. 2025-02-26 15:52:23 -08:00
Prakhar Pratyush
087abb4314 composebox: Show 'Enter a topic (skip for general chat)' placeholder.
Use a more instructive placeholder instead of "Topic" when
topic is not mandatory in a realm.

Updated placeholder:
'Enter a topic (skip for general chat)'.
2025-02-26 14:03:24 -08:00
Prakhar Pratyush
2b4d2f15f2 compose_recipient: Early return in on_hidden_callback if no item click.
Previously, the topic / direct message recipient input box was always
focused when the compose select recipient dropdown got closed, even if
the user clicked elsewhere. This resulted in unwanted trigger of
onFocus event listener etc.

This adds an early return to ensure focus updates only when an item
is clicked.
2025-02-26 14:03:22 -08:00
Prakhar Pratyush
9a29320d61 composebox_topic_typeahead: Add support for empty string topic.
This commit adds support to show `realm_empty_topic_display_name`
value in the composebox topic typeahead for empty string topic.

The item is italicized.

The 'New' label is not shown for empty string topic.
2025-02-26 13:59:03 -08:00
Karl Stolley
dfb03251b0 compose: Correctly restore general-topic drafts. 2025-02-26 13:59:03 -08:00
Karl Stolley
a3a43c2f8b compose: Handle fading with general chat.
This commit also attempts to fix a bug, present in main, where a
draft restored directly to the compose box loses its original topic
upon switching to other topic narrows.

Co-authored-by: Prakhar Pratyush <prakhar@zulip.com>
2025-02-26 13:59:03 -08:00
Karl Stolley
4723492e12 compose: Suppress 'general chat' with open recipient widget. 2025-02-26 13:59:03 -08:00
Karl Stolley
562bfd5671 compose: Handle topic-box focus and blur. 2025-02-26 13:59:03 -08:00
Karl Stolley
30b1ae7111 compose: Correctly focus when replying to general chat. 2025-02-26 13:59:03 -08:00
Karl Stolley
1bc53831c7 compose: Conditionally render placeholder for general chat. 2025-02-26 13:59:02 -08:00
Prakhar Pratyush
29fb5ff934 compose: Update textarea placeholder with general chat. 2025-02-26 13:59:02 -08:00
Karl Stolley
cae48d3faa compose: Rename placeholder update function for clarity. 2025-02-26 13:59:02 -08:00
Karl Stolley
81b6879464 compose: Match topic input text color to channel. 2025-02-26 13:59:02 -08:00
apoorvapendse
ea3e89cdd9 composebox_typeahead: Add support for empty string topic in textarea.
This commit adds support for empty string topic in compose textarea
typeahead.
2025-02-26 13:59:02 -08:00
Alya Abbott
d731f0d7a8 typeahead: Clarify that silent mention hint currently applies. 2025-02-26 13:38:16 -08:00
roanster007
b61fb243f7 typeahead: Re render header html for every update in user string.
Previously, the typeahead's header html used to be updated only
once -- after it is shown.

This caused stale state in compose box typeaheads -- when user
starts with an `@`, the typeahead is shown for the first time,
and the header html is rendered. Then when next character is
`_` (silent mention), the header html is no longer updated since
it is already updated once when `@` is used.

This is fixed by updating the typeahead everytime the user string
is updated.
2025-02-26 13:38:16 -08:00
apoorvapendse
8b9ba36465 copy_and_paste: Split copy and paste.
Note that the puppeteer tests only tested
copying whereas the node tests only tested
pasting, which is why the puppeteer tests
for pasting and node tests for copying are
absent after this split.
2025-02-26 13:15:50 -08:00
harshbansal8705
803988d206 sidebar_ui: Fix positioning of unread dot on left sidebar toggle button.
This commit fixes the inconsistent positioning of the unread dot
on the left sidebar toggle button. Instead of using fixed pixel
values, the position is now defined using a relative percentage,
ensuring consistent alignment.

The unread dot's dimensions are also expressed in ems for better
scaling and alignment at different font-sizes. And an unnecessary
(and confusing) 0 was removed from the templates.

Co-Authored-By: harshbansal8705 <harsh@harshbansal.in>
2025-02-26 13:13:51 -08:00
Aman Agrawal
6fc9762f5d left_sidebar: Change icon.
We use a different icon whose dashed line version is visible when
left sidebar is visible and solid line version is visible if
left sidebar is hidden.
2025-02-26 13:13:51 -08:00
Aman Agrawal
52e8b1e1a3 navbar: Move userlist-toggle to be the right most icon. 2025-02-26 13:13:51 -08:00
Karl Stolley
f212f78331 help_center: Update presentation of user circles. 2025-02-26 13:12:32 -08:00
Maneesh Shukla
606d1e9691 presence_data: Fix last_active_time for users with no last_active_time.
There's a rare possibility for a user to have no last_active_time. In
such a case, we always want to fall back to date_joined for displaying
"Last active" in the UI.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2025-02-26 12:51:57 -08:00
Saubhagya Patel
23ad52f867 css: Remove margin-top from move messages count if empty.
This commit makes sure that the top margin is unset
from the move messages count paragraph if it is
empty, fixing the layout in the move topic modal.
2025-02-26 12:37:29 -08:00
evykassirer
47d92cf749 navbar: Remove too-wide fixed width for right portion.
This width should be set for .column-right at wider screens,
which it already is in another CSS rule, so this style was a
duplicate. The duplicate was causing issues because it was
overriding the `width:auto` that comes into play at narrower
screens when the buddy list isn't always visible. When the
header right column is too wide, it covers up the search button
and makes it not hoverable or clickable anymore. This fixes
that.
2025-02-26 10:37:11 -08:00
evykassirer
b5dc33be89 search: Fix bug where icon wasn't displaying on narrow screens. 2025-02-26 10:37:11 -08:00
Tim Abbott
2c8d74735a postprocess_content: Drop invalid inline image elements.
Some checks failed
Code scanning / CodeQL (push) Has been cancelled
Zulip production suite / Ubuntu 22.04 production build (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:bookworm, true, false, Debian 12 (Python 3.11, backend + documentation), bookworm) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:jammy, false, true, Ubuntu 22.04 (Python 3.10, backend + frontend), jammy) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:noble, false, false, Ubuntu 24.04 (Python 3.12, backend), noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm, --test-custom-db, Debian 12 production install with custom db name and user, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy, , Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble, , Ubuntu 24.04 production install, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-7.0, 7.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-8.0, 8.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy-6.0, 6.0 Version Upgrade, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-9.0, 9.0 Version Upgrade, noble) (push) Has been cancelled
These shouldn't exist without bugs in the Markdown processor, but at
least some ancient messages in chat.zulip.org seem to have them.
2025-02-25 22:40:36 -08:00
Shubham Padia
d18593b5be settings: Rename Filter x to Filter for channel and group settings. 2025-02-25 22:02:07 -08:00
apoorvapendse
395a0240f8 copy_and_paste: Remove redundant math rule.
We have made considerable progress in implementing
KaTeX copy and paste :)
2025-02-25 21:39:26 -08:00
apoorvapendse
7bc3a7a664 copy_and_paste: Fix typo in explanation comment. 2025-02-25 21:39:26 -08:00
apoorvapendse
ff8ffbc2fa copy_and_paste: Reuse execute_copy for clipboard. 2025-02-25 21:39:23 -08:00
apoorvapendse
0eabdfa9ad copy_and_paste: Improve copying within math blocks.
If you select just one expression,
it gets resolved to an inline expression
We just search for the closest .katex-display and
set its contents in the selection range, which is
basically it's immediate `.katex` child.

In case the focus and anchor belong to different
katex-displays, we restore the original selection
to prevent triggering the inline selection which
would end up selecting only one of the n expressions
you selected.
2025-02-25 18:21:07 -08:00
Apoorva Pendse
37b5d539a0 copy_and_paste: Fix copy pasting LaTeX using navigator.clipboard.
We use getRangedAt(0), since we don't support multiple selections.
So only the HTML/text of the first selection is considered.
See: https://stackoverflow.com/questions/23934656/how-can-i-copy-rich-text-contents-to-the-clipboard-with-javascript/71850835#71850835

Fixes:
https://chat.zulip.org/#narrow/channel/9-issues/topic/pasting.20LaTeX/with/2099736.
2025-02-25 18:21:07 -08:00
Saubhagya Patel
f9825142c8 settings: Add frontend to change allow_edit_history to integer field.
This commit implements the frontend of migrating the
`allow_edit_history` setting to `message_edit_history_visibility`.
This allows organizations, to have an intermediate setting to
view only the "Moves" history of the messages.

Fixes #21398.

Co-authored-by: Shlok Patel <shlokcpatel2001@gmail.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>
2025-02-25 18:18:23 -08:00
userAdityaa
d9589eba2c banner: Aligned the username icon for topic header.
This commit fixes the alignment of the user emoji
in the topic header. Previously, the icon in the
user's name was slightly cut off at the top. This
issue was resolved by setting the line height to 19px.
2025-02-25 15:54:47 -08:00
evykassirer
e903c018ec user_status: Convert margin to padding for taller hover highlight. 2025-02-25 15:54:14 -08:00
evykassirer
1899ac9766 user_status: Scale emoji with user's font-size. 2025-02-25 15:54:14 -08:00
Karl Stolley
1f8b2b9046 stars: Placehold container width in local echo. 2025-02-25 15:53:26 -08:00
evykassirer
23bbaf0578 user_profile: Override default width of input, to avoid overflow. 2025-02-25 14:09:47 -08:00
Sahil Batra
d29ac45b99 streams: Remove unused code for can_add_subscribers_group label.
Text shown in parentheses with label for can_add_subscribers_group
was removed in befe49c293.
2025-02-25 13:17:15 -08:00
Sahil Batra
166d9282b8 streams: Use can_subscribe_group setting for checking permission.
This commit adds code to use can_subscribe_group setting in webapp.

Fixes part of #33417.
2025-02-25 13:17:15 -08:00
evykassirer
c1c321fd34 settings: Scale zulip icons with font size. 2025-02-25 13:16:07 -08:00
evykassirer
63fe461bb4 subscriptions: Align header icon with flex.
This will help with keeping the icon centered when we update
it to change size with font-size settings.

This CSS technically also applies to user groups but I don't
think there are any icons used there.
2025-02-25 13:16:07 -08:00