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.
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>
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.
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.
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>
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>
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>
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.
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
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.
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>
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>
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>
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.
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>
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>
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.
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.
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
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.
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.
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.