Commit Graph

62802 Commits

Author SHA1 Message Date
Vector73
91ddfdadd6 saved_snippets: Move "Saved snippets" button to compose control buttons.
This is follow-up of #31359 that moves "Saved snippets" button from
"send_later" popover to message formatting buttons and adds support
to use saved snippets in message-edit UI.

Fixes #31830.
2025-01-30 09:46:32 -08:00
Maneesh Shukla
c69b119666 loading_spinner:Add spinner in the Set status button. 2025-01-30 09:25:53 -08:00
Alya Abbott
278004f174 help: Document hovering over long channel descriptions to view them. 2025-01-30 09:24:17 -08:00
Alya Abbott
bf22ac9763 help: Update doc on linking to channels and topics within Zulip. 2025-01-30 09:23:50 -08:00
apoorvapendse
c5b3c62e10 compose: Complete only stream on stream+topic typeahead with ESC.
This serves as a way to escape the subjectively annoying
requirement of having to press Tab/Enter twice to complete
a stream typeahead, in cases where you only want
to mention a stream.

Consider you write `#des` and then press `Tab`
This will put `#**design>` in the textarea and
add trigger the topic typeahead menu.

Now if you continue writing text right after the ">"
like `#**design>my sample text` and press ESC key, it
will be converted to `#**design** my sample text`.

This provides convenience of not having to press Tab
twice in order to mention stream and write some text
or just a stream mention using the Tab + Esc combination.
2025-01-29 17:55:54 -08:00
apoorvapendse
ee104ab141 compose: Prompt topic typeahead after selecting stream.
Enable a consecutive topic typeahead after a user selects a stream via the
typeahead menu. Previously, users had to manually enter ">" after selecting
a stream.

Before, encountering ">" returned "topic_jump," which prevented the
topic list from triggering since "topic_jump" indicated the topic was
selected. The implementation is changed to slice the token and process it
in get_candidates to trigger the appropriate typeahead.

Adjustments include changes to regexes for accurate triggering of stream or
topic typeaheads based on the presence of ">" in the current token.

Removes hint for stream mentioning use of ">"
for topic suggestions, although that feature is
still functional.

The hideAfterSelect() function in composebox_typeahead.ts was modified.
This prevents closing the typeahead when a stream is completed.

The TopicSuggestion type is updated to show stream typeahead suggestion
as the first option in the topic list with a privacy icon and no description
in case when no character follows the '>' i.e. when the token ends with '>'.

The edge where stream and topic have the same name is also handled with
the help of a flag.

Add stream as the prefix to topic suggestions in the typeahead.
To make this happen, changes are made in the related handlebars
template.

Update topic list stream option label.
This changes the option label for stream in the topic
list from (mention channel) to (link to channel) as per
https://zulip.com/help/link-to-a-message-or-conversation.

Tests are updated, and a new test is added to validate the behavior.
Test coverage is added for the new `render_stream_topic` method.

Fixes: #32184.
2025-01-29 17:25:19 -08:00
Apoorva Pendse
21500eddcf top_navbar: Render long stream description on hover.
This commit adds support to render long descriptions
on hovering over the narrow description.

Hides the title and associated privacy icon below
a particular screen to create more room to show
the extended description.

Sets a fixed width in case of bigger screens
for word-wrap to work.

Fixes #14729.
2025-01-29 17:02:37 -08:00
Aman Agrawal
043af2a247 navigate: Fix user unable to read top / bottom of long messages.
If the user is navigating via keyboard and the top / bottom of
the message is not visible, we scroll instead of selecting the
next message to allow user to completely see that message.
2025-01-29 16:47:00 -08:00
Karl Stolley
a21b89ab98 left_sidebar: Reduce intensity of DM group and bot icons. 2025-01-29 16:35:41 -08:00
Karl Stolley
8a76be7122 inbox_view: Place 3-dots group DM icon. 2025-01-29 16:35:41 -08:00
Karl Stolley
3295580e79 recent_view: Place 3-dots group DM icon. 2025-01-29 16:35:41 -08:00
Karl Stolley
ef8865fc2f left_sidebar: Place 3-dots group DM icon. 2025-01-29 16:35:41 -08:00
Abhay Upadhyay
f7ac7b885a narrow: Handle use of -is:dm with channels:public.
Made maybe_negated a required parameter in
check_not_both_channel_and_dm_narrow so that it doesn't raise error
when -is:dm is called with channels:public or
when -channels:public is called with is:dm
Fixes #33033
2025-01-29 16:26:36 -08:00
Apoorva Pendse
053125ec97
user_profile: Fix left overflow clipping for deactivated icon. 2025-01-29 15:51:25 -08:00
Anders Kaseorg
ac19e90f40 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-29 15:04:09 -08:00
Anders Kaseorg
23a2a31e7e stylelint: Fix declaration-property-value-no-unknown.
‘bold’ is a font-weight, not a font-style.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-29 15:04:09 -08:00
Anders Kaseorg
ca1d11b772 styles: Remove ineffective portico navbar transition.
The invalid duration ‘0.2’ is ignored by browsers.  Clearly ‘0.2s’ was
intended.  But since this transition also violates
no-low-performance-animation-properties, let’s remove it without a
behavior change.  Someone can rebuild it with an efficient
implementation later.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-29 15:04:09 -08:00
Anders Kaseorg
8f173b0fdf styles: Replace deprecated word-break: break-word with overflow-wrap.
Addresses a new declaration-property-value-keyword-no-deprecated
Stylelint rule.

https://developer.mozilla.org/en-US/docs/Web/CSS/word-break#break-word
https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-29 15:04:09 -08:00
Anders Kaseorg
997d77f0dd styles: Convert Sass-style variables to CSS custom properties.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-29 15:04:09 -08:00
Apoorva Pendse
ed0f5bd6ed message: Remove failure message for disabled read receipts.
This removes the "Failed to load read receipts." prefix
in the read receipt overlay in case of organizations
that have disabled their read receipts.

Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/Why.20the.20failure.20message.20on.20disabled.20read.20receipts.2E
2025-01-29 15:02:14 -08:00
Pratik Chanda
2bd88254a1 tooltip: Fix unread count for home view tooltip includes muted messages.
Earlier, unread_count in home view tooltip was set to total unread
messages while we normally exclude muted messages from unread_count.

This commit changes this by setting it to `home_unread_messages`.
2025-01-29 15:01:15 -08:00
Lauryn Menard
ee8cb9c926 reload: Check server_settings before initiating a reload.
In order to avoid races with the user's device connecting to a
network after unsuspending, we ping the server settings endpoint
for a success response before initiating the reload of the app.

Fixes #33118.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2025-01-29 15:00:23 -08:00
Lauryn Menard
078ce89380 util: Extract helper function for backoff of retries on error response.
Extracts message_fetch and get_events algorithms for calculating the
exponential backoff into a shared helper function.

These match the algorithm that were designed for the Python API, except
that we use a ratio of 2 rather than sqrt(2) in the message_fetch code
path.
2025-01-29 15:00:23 -08:00
Lauryn Menard
79224b0149 puppeteer-navigation: Use more specific view selector.
Updates the selector for the channel narrow and combined feed
in this puppeteer test to be more specific than the message feed
container, which is what the check for the direct message view
already does in this test.
2025-01-29 15:00:23 -08:00
Lauryn Menard
7b95441bfe help: Update add a custom emoji instructions for modal form. 2025-01-29 14:56:51 -08:00
Alex Vandiver
4dfb285b5b message_summary: Reorganize settings and secrets.
This allows arbitrary litellm-supported backends.
2025-01-29 14:55:35 -08:00
Alex Vandiver
69524b48b5 message_summary: Switch to orjson. 2025-01-29 14:55:35 -08:00
Alex Vandiver
816dde5b9a message_summary: Factor out into the actions package. 2025-01-29 14:55:35 -08:00
Aman Agrawal
b9483e3f5f move_topic_to_stream_widget: Show dropdown below stream button. 2025-01-29 14:54:24 -08:00
Shubham Padia
48405b704e user_group: User user object instead of email to add creator pill. 2025-01-29 12:36:10 -08:00
Shubham Padia
41c68fad2c stream: Allow non-admins to create channel without subscribing to it.
Fixes #33125.
We now add a creator pill on the channel create screen. For the rule to
not allow non admins to create a channel without subscribing to it, the
rule was most probably introduced to prevent creating a private channel
that you can't access and creating a public channel and then not being
able to find it. Those concerns aren't valid anymore with the new group
permissions system and UX changes respectively.
See
https://chat.zulip.org/#narrow/channel/101-design/topic/Rework.20UX.20for.20adding.20everyone.20to.20a.20channel.20or.20group.20.2333127/near/2064926
for more details.
2025-01-29 12:36:10 -08:00
Shubham Padia
274fdc5908 input_pill: Add disabled flag to make a pill disabled.
A disabled pill cannot be removed. It will not have the `x` sign inside
it's pill. Pressing backspace on the pill will not remove it. But it
will still be possible to shift focus on the disabled pill using the
backspace button.

We decided to keep disabled not as a property of `item` and instead of
the pill via `InputPill`. This means that a pill is disabled and not an
item. Also, since the item types vary so much between user, user group,
channel and other pills, adding disabled to `InputPill<ItemType>` makes
it much more simpler to add this capability to wherever needed one by
one.

We also need to pass this property to `generate_pill_html` so the
respective functions can respect that property and render the pill
accordingly.

While this feature is not in use at the immediate moment, we've kept it
around since it is likely to be useful in the future.
2025-01-29 12:36:10 -08:00
Karl Stolley
861917d2c5 left_sidebar: Allow condensed nav icons to scale. 2025-01-29 10:15:55 -08:00
Karl Stolley
ab58a2c656 left_sidebar: Allow masked unreads to scale. 2025-01-29 10:15:55 -08:00
Karl Stolley
d71161dc83 left_sidebar: Remove out-specified font-size selector.
The comment here is also no longer true, as of the 2024 sidebar
redesign (all vdots take the same size).
2025-01-29 10:15:55 -08:00
Karl Stolley
938fcfb698 left_sidebar: Remove unused class selector block. 2025-01-29 10:15:55 -08:00
Alya Abbott
50ff629ac5 help: Update permissions docs for group-based permissions.
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
2025-01-28 18:37:21 -08:00
whilstsomebody
09214c91b6 stream_popover: Disable confirm move button for empty topic name.
When mandatory topic is true, empty topic name  is not allowed.
For more information, see
<https://chat.zulip.org/#narrow/channel/9-issues/topic/Confirm.20move.20button.20stays.20enable.20when.20topic.20input.20is.200.2E/near/1989468>
2025-01-28 18:18:29 -08:00
sanchi-t
9921b116e8 css: Refactor theme colors for settings.
This change moves the light and dark theme colors for
`settings` to CSS variables.
2025-01-28 17:55:00 -08:00
Aditya
22c300439f polls: Fix transition issue for "Add" and "New" option in dark theme.
Resolved a transition issue in the polls UI when switching between dark and light modes. This fixes visual inconsistencies and ensures smoother transitions, improving the overall user experience.

Fixes #30628.
2025-01-28 17:54:16 -08:00
ritwik-69
20fef7576d compose: Fix placeholder disappearance bug.
This commit resolves an issue where the placeholder in the
composing message to the recipient text box would disappear
unexpectedly.

Fixes: #32912
2025-01-28 17:53:10 -08:00
Aditya Kumar Kasaudhan
bd1bf5a851 compose: Fix Cmd + Return to send messages in preview mode on Mac.
Previously, Cmd + Return did not send messages in preview mode when
configured by the user.

This commit fixes the logic to allow sending messages in preview
mode with Cmd + Return as per user configuration.

Fixes: #32960.
2025-01-28 17:51:08 -08:00
Alex Vandiver
af4fa75b66 puppet: Upgrade version of aws tool. 2025-01-28 17:43:08 -08:00
Maneesh Shukla
faa8b0d4a5 user_groups: Allow adding a user to groups via user profile.
Fixes: #32488.
2025-01-28 15:19:21 -08:00
Maneesh Shukla
e33fe6779b user_group: Rename invite_user_group_picker_pill.ts to user_group_picker_pill.ts.
Fixes part of #32488.
2025-01-28 15:13:19 -08:00
Maneesh Shukla
3ce9c558b2 user_groups: Add search input to the user group.
Fixes part of #32488.
2025-01-28 15:13:19 -08:00
Maneesh Shukla
18e5ede3c3 user_groups: Change the data-empty value.
Fixes part of #32488.
2025-01-28 15:13:19 -08:00
evykassirer
39319cee34 message_header: Specify font-size and line height on content div.
This is helpful for info density, because `em` values change
depending on the font-size of the HTML element, and we want to
be able to reference `em` sizes for the placement of the message
header container when it's sticky.

This commit should have no functional changes because
`message-header-contents` is the only child of `message_header`
and doesn't itself use font size or line height.

This commit also changes the line height to unitless
https://chat.zulip.org/#narrow/channel/6-frontend/topic/navbar.20sticky.20header.20with.20em/near/2054561
2025-01-28 14:50:43 -08:00
Prakhar Pratyush
ab123d3160 attachments: Restrict users access to attachment without message access.
This commit adds hardening such that if the invariant "no usermessage
row corresponding to a message exists if the user loses access to the
message" is violated due to some bug, user can't access the attachment
if they are not subscribed.
2025-01-28 13:59:08 -08:00
Prakhar Pratyush
621eb1f610 prior_mention_user_ids: Exclude user who no longer has message access.
This commit updates the 'get_mentions_for_message_updates' function to
use the generic 'event_recipient_ids_for_action_on_messages' function
to determine users having access to the message and perform an
intersection with the mentioned users to filter out the users who
no longer can access the message.

It helps to add hardening such that if the invariant "no usermessage
row corresponding to a message exists if the user loses access to the
message" is violated due to some bug, it has minimal user impact.
2025-01-28 13:59:08 -08:00