Commit Graph

67 Commits

Author SHA1 Message Date
Alex Vandiver
016a298a45 web: Switch to the new individual_emoji_changes capability. 2026-04-16 20:44:57 -07:00
Sayam Samal
5dc3c39f9f thumbnail: Remove message_lists dependency.
Commit abbb5d2940 added message_lists.ts
as a dependency to thumbnail.ts to support the update_thumbnails method.

However, this caused blueslip errors on showroom pages such as
/devtools/banners because of the import chain templates >
postprocess_content > thumbnail > message_lists, and eventually
page_params.ts, which asserts if the page type is "home", which
fails on showroom pages.

This commit moves the update_thumbnails method to message_live_update.ts
which already has the required dependencies to rerender message views.
2026-03-10 10:01:13 -07:00
Alya Abbott
1fe38a0513 onboarding_steps: Pass update_recipient_row_attention_level as callback.
This removes the direct import of compose_recipient from
onboarding_steps, breaking a dependency cycle that would prevent
compose_tooltips from importing onboarding_steps in a follow-up
commit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:34:18 -08:00
Anders Kaseorg
1ae29272f0 zjquery: Replace misleading “children” option with set_results API.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-03-06 09:02:45 -08:00
Anders Kaseorg
7a5a9c3a8d tests: Use existing zjquery class state.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-03-06 09:02:45 -08:00
Sahil Batra
46fcd76281 settings: Fix lock icon for "Bots" panel in left sidebar.
We previously showed lock icon for "Bots" panel in left sidebar
when user was not allowed to create new bots even when user
could manage other bots. This commit updates that to not show
lock icon when the user can manage bots as the panel is still
useful to that user.

Also updated the tooltip to be more clear about what permission
the user doesn't have.
2026-03-05 10:55:52 -08:00
Sahil Batra
32c1c4bb76 bots: Remove duplicate fields from bot objects in realm_bots.
This commit removes "avatar_url", "bot_type", "email",
"full_name", "is_active" and "owner_id" fields from bot
objects passed in "realm_bots" as user objects in
"realm_users" already has those fields and clients can
get the data needed from it.

Also removes the code to send realm_bot/update events
when changing these fields.
2026-03-03 17:36:43 -08:00
Alya Abbott
abbb5d2940 message_content: Apply media_preview_size to rendering.
Use the realm's meida_preview_size setting to control the max height
of image and video thumbnails. This affects both the CSS (via a custom
property --media-preview-max-height set in thumbnail.ts) and the
JavaScript image sizing logic in postprocess_content.

The CSS variable is set during page initialization and used for both
image max-height and video dimensions. Videos scale proportionally
with a 3:2 aspect ratio. The JS image_box_em value reads from the
same mapping to keep CSS and JS in sync.

When the setting is changed, the event handler updates the CSS
variable and rerenders all message lists so inline image widths
are recalculated, following the same pattern used by
web_animate_image_previews.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:11:16 -08:00
Alya Abbott
6ac8a50db7 settings: Add UI for media_preview_size setting.
Add a dropdown in Organization Settings > Message feed settings for
"Size of images and videos in messages" with Small, Medium, and
Large options. Placed just above the "Show previews" checkbox.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:11:16 -08:00
Tim Abbott
6ebf7c9350 tests: Remove rewires in dispatch.test.cjs.
Replace zrequire of compose_validate with mock_esm, since the only
usage was nooping validate_and_update_send_button_status. The mock
provides that function (and warn_if_guest_in_dm_recipient) as noops
directly, eliminating the override_rewire call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 00:31:50 -08:00
santhoshkumarCodes
28e4769024 people: Rename is_active_user_for_popover helper.
Rename to `is_active_user_or_system_bot` to better reflect its purpose,
as we are also using it in pm_list_data.ts to find whether we are including
deactivated users or system bots in the PM list.
2026-01-27 10:56:55 -08:00
Abhinav Mishra
c51d54ee3a settings: Rename web_home_view value from "recent_topics" to "recent".
This commit renames "recent_topics" to "recent" in the web_home_view,
and performs a data migration for users who have set the default
web_home_view value to "recent_topics".

It process both UserProfile and RealmUserDefault tables,
and uses batched updates for performance. Backward compatibility for
old #recent_topics URLs is preserved in the hash parser and
hashchange handler.

Fixes #25781
2026-01-21 17:01:31 -08:00
apoorvapendse
6273d6f683 node_tests: Remove unused giphy.ts esm mock.
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2026-01-05 18:33:20 -08:00
Vector73
965cadd8af emoji_picker: Add a "Frequently used" section in the emoji selector.
Fixes #21841.
2025-12-17 10:51:51 -08:00
Evy Kassirer
9dab830131 stream_list: Update collapse states when toggling show_channel_folders.
Discussed here:
https://chat.zulip.org/#narrow/channel/9-issues/topic/Collapsed.20channel.20sections.20not.20set/near/2315219
2025-12-15 16:44:11 -08:00
Sahil Batra
38d781b130 channel-settings: Modify the UI for channel privacy.
Fixes #36742.
2025-12-09 12:15:13 -08:00
Sahil Batra
710ddd7d44 settings_users: Move bot related code from to settings_bots.ts.
This commit moves bot related code from settings_users.ts to
settings_bots.ts as we have different panels for users and bots
and we already have code for multiple tabs in settings_users.ts
and separating bots code makes maintaining the code easy.
2025-11-12 09:27:26 -08:00
Maneesh Shukla
2bf3d7458d settings: Redirect Bots in Personal Settings to Org Settings > Bots.
This commit includes the following changes:

- Redirects Personal > Bots to Organization Settings > Bots.

- Cleans up bot_settings.hbs, bot_avatar_row.hbs, and CSS related to
these UIs, along with cleanup of settings_bots.ts.

- Reworks the Puppeteer tests to align with the new changes.

Fixes part of #31156.

Co-authored-by: Sujal Shah <sujalshah28092004@gmail.com>
2025-11-11 16:17:27 -08:00
Maneesh Shukla
825bf2cffa settings: Allow downloading bot config from admin bot panel.
This commit adds code to allow downloading bot config for
all outgoing webhooks bot owned by the user from "Your bots"
tabs in the "Bots" settings panel.

Fixes part of #31156.

Co-authored-by: Sujal Shah <sujalshah28092004@gmail.com>
2025-11-11 16:17:27 -08:00
Maneesh Shukla
06f7ed6f9c bot_settings: Add tabbed view for showing all and your bots.
Previously, there was only one bot section tab. Now it has
been split into two subsections: "All Bots" and "Your Bots."

Also, the action column is now visible for non-admins users also
so that they can manage their own bots.

Fixes part of #31156.

Co-authored-by: Sujal Shah <sujalshah28092004@gmail.com>
2025-11-11 16:17:27 -08:00
Sahil Batra
3cc866a776 settings_users: Rename variables and functions for bots table.
This commit renames variables, functions and element IDs used
for bots table such that the name make it clear that they
are being used for "All bots" table. This commit is a prep
commit for further commits which would add tabbed view in
bots panel with "All bots" and "Your bots" tabs.
2025-11-11 16:17:27 -08:00
Evy Kassirer
7d7d4f58d3 inbox_ui: Make it possible to disable channel folders.
Part of #35951.
2025-11-05 16:19:05 -08:00
PieterCK
daa14bb3c4 message_actions: Add "Report message" action and settings UI.
This adds a new field in the "Organization settings" menu for the
moderation request channel. It only includes private channels as the
dropdown options.

Fixes #20047.

Co-authored-by: Adam Sah <140002+asah@users.noreply.github.com>
Co-authored-by: Alya Abbott <alya@zulip.com>
2025-11-05 11:20:32 -08:00
Aman Agrawal
a89a1893c5 compose: Don't check for posting policy errors without validation.
Since `compose_validate.validate` sets the error messages
for posting policy, it is important that it is called before
we check for posting policy errors.

To fix it, we remove independent calls to
check_posting_policy_for_compose_box and call it after validation.

This also fixes a bug where compose posting policy error is
not displayed when a user is trying to DM a recipient with no
previous message history and the user is not allowed to start
a new DM conversation.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-11-04 17:10:10 -08:00
Vector73
5704abf8b4 settings: Convert language picker to dropdown widget.
Fixes #35861.
2025-11-01 10:51:01 -07:00
Anders Kaseorg
55293f57a8 eslint: Fix unicorn/no-immediate-mutation.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-01 07:24:57 -07:00
Pratik Chanda
dc61ad6071 keyboard_shortcuts: Change selector for home view hotkey in help menu.
This commit changes the selector for home view hotkey shortcut hint in
help menu. This will help in internationalization of the keyboard hints.
2025-10-01 16:54:12 -07:00
Evy Kassirer
66b90d3736 message: Create new LocalMessage to fix type of transmit.send_message. 2025-10-01 16:38:55 -07:00
Kislay Verma
67ca49488f tests: Use make_realm to create type-correct realm objects.
Another step in the direction of improving node tests
and using type-correct organic data as much as possible.
2025-08-28 11:35:07 -07:00
Vector73
92fbe47a3b events: Add support for processing modern presence event in web client. 2025-08-27 17:16:31 -07:00
Sahil Batra
0a8238b993 stream-settings: Live update visibility of folder dropdown.
An error was raised where we tried to live update the folder name
in folder dropdown even when there was no dropdown visible
to the non-admin user in settings page. This was because
"There are no channel folders configured in this organization."
text was shown even when a folder was recently created in the
realm as we did not live update the visibility of dropdown on
creating or archiving a folder.

This commit fixes the bug by live-updating the visibility
of folder dropdown when creating or archiving a folder.
2025-08-14 13:18:31 -07:00
Sahil Batra
1bd089ae99 folders: Live update UI on reordering channel folders.
This commit adds code to live update "Channel folders" panel
and left sidebar on reordering of channel folders.
2025-08-12 11:17:17 -07:00
Sahil Batra
f4cc746ae9 stream-settings: Move update_channel_folder_name.
This commit moves update_channel_folder_name function from
stream_ui_updates.ts to stream_settings_ui.ts to avoid
import cycle in further commits.
2025-08-12 10:31:42 -07:00
Aman Agrawal
78a3ef56e4 left_sidebar: Support filtering all items using the search input. 2025-08-12 00:38:22 -07:00
Kislay Verma
c134cc398f tests: Add library function to create user groups.
This is done to ensure the objects exactly match
the schema/types during tests.

Fixes part of #32326.
2025-08-11 11:57:49 -07:00
Sahil Batra
b746bb5fc1 settings: Show rendered markdown folder description.
This commit adds code to show markdown formatted description
in "Channel folders" panel instead of raw text.
2025-08-08 15:40:31 -07:00
Aman Agrawal
8207eaab55 left_sidebar: Refactor to support user's navigation view preference.
Co-authored-by: Aditya Chaudhary <aditya.chaudhary1558@gmail.com>
2025-08-04 18:33:36 -07:00
Sahil Batra
e70d8c7a80 streams-ui: Reset folder dropdown if selected folder is archived.
This commit adds live-update code to reset the dropdown when user
is changing the folder for a channel or setting the folder for a
new channel and the selected folder is archived.
2025-08-04 13:22:11 -07:00
Lauryn Menard
7a9b78f1f5 settings: Add user setting to ignore channel folders in left sidebar.
Some checks failed
Check feature level updated / check-feature-level-updated (push) Has been cancelled
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 #35573.
2025-08-01 09:18:19 -07:00
Evy Kassirer
033ef953db left_sidebar: Fully rerender stream list when count display policy changes.
Now that there are many counts to update, we may as well just rerender
the whole stream list.
2025-07-29 17:37:29 -07:00
Sahil Batra
3483c1dbcb server_events_dispatch: Handle channel_folder/update event. 2025-07-28 12:52:40 -07:00
Aman Agrawal
4a8d86f151 overlays: Add overlay to display scheduled reminders. 2025-07-02 13:02:45 -07:00
opmkumar
d3a7122b62 left_sidebar: Use personal settings to hide unread summary counts.
This commit adds code to use
`web_left_sidebar_unreads_count_summary` from personal
settings in web app.

Co-authored-by: Akarsh Jain <akarsh.jain.790@gmail.com>

Fixes part of #28759.
2025-06-27 13:50:18 -07:00
Vector73
62c67eae8e settings: Add a new topics_policy realm setting.
Added a new realm setting, `topics_policy` and deprecated
`mandatory_topics` setting as it now replaced by `topics_policy`.

Fixes part of #33549.
2025-06-17 17:05: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
Aman Agrawal
97c69e3038 inbox: Show inbox channel view based on user setting.
Fixes: #29574
2025-05-09 15:13:56 -07:00
Sahil Batra
1af039d87b stream-settings: Fix live update of subscribers UI.
Changes done here are -

- Previously the pill input, "Add" button and tooltip shown
when user did not have permission were not live updated when
updating can_add_subscribers_group and can_subscribe_group
stream level settings or can_add_subscribers_group realm
level setting. This commit fixes that.

- Also, when the UI was live updated to give user permission
to subscribe others, "Add" button was enabled even when
input was empty. This is also fixed in this commit.
2025-05-02 16:23:52 -07:00
Prakhar Pratyush
e95ee707a6 compose: Update topic input box when mandatory_topics setting changes.
Earlier, when `realm_mandatory_topics` setting was getting toggled,
the topic input box in composebox was not being live-updated to
align with the correspondning setting's UX.

This commit fixes that bug by making sure that placeholder and
other UI elements are updated accordingly.
2025-03-20 10:32:31 -07:00
Sahil Batra
c50e8fa406 stream-settings: Move functions to update stream privacy choices.
This is a preparatory refactor to avoid import cycles in future
commits for fixing live update behavior when archiving channels.
2025-03-14 11:29:51 -07:00
Vector73
b31024be47 saved_snippets: Add support for editing saved snippets.
Fixes #33708.
2025-03-13 10:58:36 -07:00