Commit Graph

8596 Commits

Author SHA1 Message Date
Lauryn Menard
4f60a95065 help: Add "View Zulip mobile app version" section.
Adds a section to "View Zulip version" article for viewing the
mobile app version, and adds the mobile app installation guide
to the related articles section.

Part of #34748.
2025-06-16 09:48:15 -07:00
Aman Agrawal
c1e3081860 people: Use safePrase to parse error response.
This avoids parsing error when the error response is not in the
expected format.
2025-06-16 09:15:27 -07:00
Karl Stolley
c5f0a5daa1 status_modal: Correct light-mode background color. 2025-06-16 09:13:41 -07:00
Maneesh Shukla
5ba7c2bddb settings-banner: Fix bugs in the rendering of the desktop notification banner.
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-10.0, 10.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-9.0, 9.0 Version Upgrade, noble) (push) Has been cancelled
This commit adds the `banner-wrapper` class to the parent container of the
banner.

Added `margin-bottom: 10px` to the banner to improve its appearance.

Placed the event listener at the correct location with the $container
element so that it binds only once. Previously, it was being bound
every time the settings page was loaded, causing multiple event listeners
to be attached to the same element.

Additionally, the banner was not rendering when opening
Org settings > DEFAULT USER SETTINGS directly,
and this has been fixed by ensuring the banner is rendered correctly.
2025-06-14 21:34:25 -07:00
Lauryn Menard
59a55e6d88 corporate: Update Android APK note.
Updates APK fine print on /apps for Android to link to both the
Flutter app and legacy React Native app.

Part of #34748.
2025-06-13 22:17:17 -07:00
Anders Kaseorg
ff04cafc40 onboarding_steps: Fix abnormal initialize calling convention.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-06-13 22:05:34 -07:00
Karl Stolley
4dff3dfba6 selects: Improve concord with custom, native selects.
This commit cleans up the data URIs for the custom
chevron icons, and sets the same color as used on
select text.

Additionally, the background-image size now scales as
expected, so that browser-native <select> elements
have chevrons that much more closely resemble those
of button-based selects for our custom widgets.
2025-06-13 16:53:46 -07:00
Karl Stolley
9e2ffe7fd5 inputs: Set default text-color explicitly.
This removes the previous slightly-lighter text shade
in light mode, and gets away from the trickiness of
`color: inherit` in dark mode.

While we could probably go with inheritance
everywhere, simply by removing the color: value on
these element, setting an explicit color variable on
the inputs here builds better confidence as to what
the color value will ultimately be.
2025-06-13 16:53:46 -07:00
apoorvapendse
378dc7a97d typeahead_helper: Cache diacritic-less names for performance.
This code path now uses the full name with removed diacritics cache,
just like the right sidebar buddy list search.

This fixes a major performance issue with trying to mention users in
organizations with 10,000s of total users.

Fixes:
https://chat.zulip.org/#narrow/channel/9-issues/topic/Mention.20typeahead.20performance/with/2157415.
2025-06-11 15:14:34 -07:00
apoorvapendse
cb0a598481 people: Extract name diacritics removal logic.
This is done as a prep commit to use this new function in
`query_matches_person` to introduce caching on the diacritic-less full
name.
2025-06-11 15:14:34 -07:00
apoorvapendse
1bcf05b13d typeahead: Remove diacritics only for valid queries.
Where a valid query is a string whose lowercase version
contains only ASCII lowercase letters.

@timabbott said:
>Note that the query being ascii is important
to how the comparisons are done, so that queries
with diacritics are handled properly to match
the exact diacritics used, for example.
2025-06-11 15:14:34 -07:00
apoorvapendse
e0c786c7a0 typeahead: Extract matching logic into a new function.
This is a non-functional change done as a part of
a series of commits to eventually cache and use
diacritic-less full names instead of computing them
every time.

The eventual aim is to pass cached diacritic-less
full names directly to
`query_matches_string_in_order_assume_canonicalized`
when the query is plain ascii.
2025-06-11 15:14:34 -07:00
Saubhagya Patel
b82bc1a738 settings: Add button to reset channel notifications to default.
This commit adds a "Reset to default notifications" button in the
Notifications menu, to the right of the channel name, for which a
user has selected custom notifications and a confirmation
dialog to confirm this action.

Fixes #19860.
2025-06-11 15:08:25 -07:00
Saubhagya Patel
a925511a11 settings: Update unmute icon in Personal settings > Notifications.
This commit contains the following changes:
- Updates the unmute stream icon in Personal settings
  > Notifications to use the `icon-button-brand` CSS class.
- Adjusts the tooltip delay for the unmute icon.
- Removes unused CSS.

Prep commit for #19860.
2025-06-11 15:08:25 -07:00
Shubham Padia
7eb9c9deef Groups: Can perform any join, leave, add, remove for deactivated group.
Fixes #33804.

We still do not allow permission settings to be set to deactivated
groups.
2025-06-11 14:58:14 -07:00
Karl Stolley
74b0d8ff61 rendered_markdown: Correct presentation of nested lists.
To properly increment counters, and display lists of the
correct type when nested, we need to use child selectors
and not the previous, overly generic descendant selectors.
2025-06-11 14:56:35 -07:00
Prakhar Pratyush
4e43c2f32d list_util: Narrow event type to JQuery.KeyDownEvent only.
The `inside_list`, `go_down`, and `go_up` function defined
in `list_util.ts` is used in `hotkey.js`.

We made changes in 45e91daa14
to use `keydown` only in `hotkey.js`.

The event type of those three functions should be
`JQuery.KeyDownEvent` only.

This commit fixes that.
2025-06-11 10:18:31 -07:00
Prakhar Pratyush
c98bc0bd01 web: Replace the deprecated keypress event with keydown.
Unlike the deprecated `keypress` event, the `keydown` event is fired
for all keys, regardless of whether they produce a character value.

Our handlers only care about whether Enter key was pressed or not,
so even though the handlers will be executed for modifier keys
like `Option`, `Ctrl`, etc there is no change in the behaviour
practically.
2025-06-11 10:18:31 -07:00
Sahil Batra
1e67b1d23f settings: Do not show channel folder UI in production.
This commit hides channel folder widgets in production
till we are ready to launch this feature.
2025-06-10 11:51:58 -07:00
Sahil Batra
32287a084b channel-folders: Add UI to create new channel folder.
This commit adds a button besides the folder dropdowin in
stream settings UI which can be used to create a new folder.
2025-06-10 11:51:58 -07:00
Sahil Batra
7c01e61e5a streams: Add UI to add or remove stream from a folder.
This commit adds UI to add a stream to a folder while
creating them and also for adding/removing an existing
stream from a folder.
2025-06-10 11:51:58 -07:00
Sahil Batra
403b73e1a6 channel_folders: Add support for channel folders in webapp.
This commit adds code to handle channel folders data in
webapp.
2025-06-10 11:51:58 -07:00
Sahil Batra
e643d7e6fd dropdown-list-widget: Allow customization for "Disable" option.
We currently always show fa-ban icon and "Disable" text for
"Disabled" or "None selected" option in dropdown-list widget.

This commit adds code to provide an option for not showing the
fa-ban icon and having the option text be something other than
"Disable". This will be used in channel folder dropdown widget
where we want to have "None" text in the option without icon.
2025-06-10 11:51:58 -07:00
Sahil Batra
647eab4f58 subscriptions: Remove unnecessary ".stream-creation-body" selector.
We do not need ".stream-creation-body" selector for this block
of CSS properties, since we apply these CSS properties to all
the required elements using ".stream-permissions" and
".advanced-configurations-container" selectors.
2025-06-10 11:51:58 -07:00
Sahil Batra
9498213455 subscriptions: Remove unnecessary CSS.
We do not have any dropdown widget buttons in right panel
of groups and streams UI, neither in creation form nor in
stream and group settings UI.
2025-06-10 11:51:58 -07:00
Aman Agrawal
55d9ea95fb inbox_ui: Use list widget to render topics for channel view.
Rendering all the topics of a channel can be very expensive, so we
use list widget to progressively render the items.
2025-06-10 11:49:05 -07:00
Aman Agrawal
9cabf9705a message_feed_bottom_whitespace: Rename for general use.
Renamed file name to be used in other views.
2025-06-10 11:49:05 -07:00
Aman Agrawal
331bb09cdd message_feed_bottom_whitespace: Rename variable for general use.
Rename so that the loading indicator an be used by other views
as well.
2025-06-10 11:49:05 -07:00
Aman Agrawal
bc55c831ea recent_view: Extract function to check when to render more items.
This will be used in inbox channel view for rendering topics list.
2025-06-10 11:49:05 -07:00
apoorvapendse
ed2cdb9435 message_overlay_ui: Remove restore X tooltip function.
We got rid of the only two calls for
`initialize_restore_overlay_message_tooltip`
in the previous commits.
That is why it is safe to get rid of its
definition.

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-06-10 11:08:35 -07:00
apoorvapendse
a27e1aea96 scheduled_messages: Clarify the editing UI.
Fixes: #34380.
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-06-10 11:08:35 -07:00
apoorvapendse
3cd0f87d47 draft_overlay: Clarify the editing UI for drafts.
Co-authored-by: Sayam Samal <sayam@zulip.com>
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-06-10 11:08:35 -07:00
Shubham Padia
3dc54a10d7 filter: Do not set anchor as first_unread for starred messages view.
Fixes
https://chat.zulip.org/#narrow/channel/9-issues/topic/Starred.20messages.20view.20performance/near/2184251.
Anchor for starred messages was `first_unread` and the query to find
first_unread in a user's starred messages can turn out to be expensive.
This commit ensures that we default to newest instead since first_unread
is not of important for the starred messages view.
By excluding starred messages from using `first_unread`, it will default
to newest based on the logic in message_view.ts.
2025-06-09 16:21:09 -07:00
Aman Agrawal
55835bffd3 message_view: Fix error on pressing scroll to latest button.
Reproducer:
* Navigate to a channel using `near` link with no recent history
  such that `all_messages_data` has no history cached for it.
  The data for this channel narrow is not added to `all_messages_data`
  to keep the history of `all_messages_data` contiguous.
* Press scroll down button, you will see an error.

Fixed by checking if the message list data is empty before narrowing
and asking server for messages if that's the case.
2025-06-09 15:52:09 -07:00
Lauryn Menard
b19cdac072 demo-orgs: Rename do_convert_demo_organization frontend function.
Renames the function called to open the web app modal to convert
a demo organization to a permanent organization to instead be
show_convert_demo_organization_modal, as "do_" functions in the
codebase typically means it's called after any checks/dialogs.
2025-06-09 15:36:04 -07:00
Saubhagya Patel
5f164582a4 settings: Add channel notifications customization in Personal settings.
This commit adds an option to change the notification settings
of a channel from default to custom in the Notifications menu
of Personal settings.

Fixes #19849.
2025-06-09 13:50:55 -07:00
Saubhagya Patel
1471e9b828 css: Add class decorated-stream-name-dropdown-widget.
This commit introduces a class
`decorated-stream-name-dropdown-widget`. The class extracts
the styles applied to channel dropdowns in commit:
9ae704510f org_settings: Correctly display long channel names,
so they can be reused at other instances.
2025-06-09 13:50:55 -07:00
Saubhagya Patel
6e38b56405 css: Set white-space: nowrap for channel dropdowns in org_settings.
This commit ensures that long channel names, including those
containing multiple words, are properly abbreviated in the channel
dropdown widgets in organization settings.

Follow up to commit:
9ae704510f org_settings: Correctly display long channel names,
which handled long single-word channel names.
2025-06-09 13:50:55 -07:00
Saubhagya Patel
45f38795e9 settings: Add push_notifications_disabled in notification checkboxes.
This commit adds a variable `push_notifications_disabled` to the
checkboxes used in the notifications table in Settings > Notifications.
The variable is used to control the mobile push notifications
disabled tooltip.
2025-06-09 13:50:55 -07:00
Maneesh Shukla
c41a96a954 trash-icon: Replace remaining fa-trash icons with zulip-icon-trash and update buttons.
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-10.0, 10.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-9.0, 9.0 Version Upgrade, noble) (push) Has been cancelled
Fixes: #34378.
2025-06-08 17:12:27 -07:00
Evy Kassirer
d1023660da search_pill: Prevent adding duplicate search pills.
We shouldn't show duplicate suggestions in the typeahead, but
duplicate pills were still possible by typing a term twice in
the search bar and pressing enter after each one, and this
commit prevents that from putting duplicate pills in the search
bar.
2025-06-07 22:59:14 -07:00
Evy Kassirer
f0210fd6e8 search_suggestion: Prevent duplicate terms in default suggestion. 2025-06-07 22:59:14 -07:00
Evy Kassirer
fa03c42009 search: Show correct description string for public channels.
Previously, typing "channels: public" would show "Channels public"
in the typeahead, which was especially confusing because we'd show
"All public channels" until the term was completely typed out.
2025-06-06 18:04:48 -07:00
Tim Abbott
bbeede1e52 people: Optimize is_person_active.
Calling settings_data.user_can_access_all_other_users on every call to
this function could be expensive when using this function in loops
over every user in the organization.

After the previous commit, those calls are still somewhat expensive
for guest users.
2025-06-06 10:53:03 -07:00
Tim Abbott
446ba1b538 settings_data: Optimize user_can_access_all_other_users.
This fixes an important issue where this function being called in a
loop can consume as much as 1ms per iteration for users who are in a
lot of groups.
2025-06-06 10:53:03 -07:00
Prakhar Pratyush
9b43e5e3b3 empji_picker: Remove the usage of deprecated keypress event.
This commit removes the deprecated `keypress` event.

Now, we use the `keydown` event.

Earlier, we used `keypress` because it allowed us to distinguish
between lowercase and uppercase characters using `event.which`.

For example:
* For 'r':
  * keypress.which = 114
  * keydown.which = 82
* For 'R':
  * keypress.which = 82
  * keydown.which = 82

As shown, `keydown.which` cannot distinguish between 'r' and 'R',
which is why `keypress` was helpful.

Now, modern browsers support `event.key` on `keydown`, which directly
gives 'r' or 'R' as needed. This makes `keypress` unnecessary, and
we can safely rely on `keydown` with `event.key` to get the exact
character.

An earlier commit in this PR #34825, in which we replaced
the `event.which` with `event.key` plays a major role as a prep
commit to help removing `keypress` event in this commit.
2025-06-06 09:26:42 -07:00
Prakhar Pratyush
46b6436b19 emoji_picker: Replace deprecated e.which with e.key.
The `keydown` and `keypress` event handlers defined in
`emoji_picker.ts` were using `event.which`, which is deprecated.

This commit makes changes to use `event.key` instead.
2025-06-06 09:26:42 -07:00
apoorvapendse
080346c0e0 copy_messages: Expand selection for math expressions and blocks.
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-10.0, 10.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-9.0, 9.0 Version Upgrade, noble) (push) Has been cancelled
With this we introduce selection expansion when
the selection spans across multiple inline expressions
or expressions within mutliple math blocks.

This makes the selection consistent with what is pasted
while also fixing some bugs encountered in cases such as:
1. Focus present in an inline math expression and
anchor present in a different inline math expression
and vice-versa.

2. Focus present in a math block and anchor present
in a different math expression outside that math block
and vice-versa.

3. When selecting expressions within a math block, the
first expression wasn't retained in the past because
of the selection not containing <annotation>.

Fixes #33676.
Also fixes
https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.93.82.20pasting.20LaTeX/near/2159869
and other related issues.

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-06-05 17:42:07 -07:00
Maneesh Shukla
015bd7e6c9 custom_profile_fields: Add "Alphabetize choices" button.
This commit adds a "Alphabetize choices" button for SELECT also known as
"List of options" type custom profile fields. The
options themselves can get out of order from either user text input, or
from list modifications like addition or drag.

We follow case-insensitive alphabetization such that "vim" comes before
"VS Code". This is similar to how we alphabetize elsewhere like stream
lists.

Fixes: #28607.

Co-authored-by: Tanmay Kumar <tnmdotkr@gmail.com>
2025-06-05 17:11:05 -07:00
Maneesh Shukla
bb8bda0bf7 settings_profile_fields: Refactor to use variables.
Fixes part of #28867.

Co-authored-by: Tanmay Kumar <tnmdotkr@gmail.com>
2025-06-05 17:11:05 -07:00