Commit Graph

9735 Commits

Author SHA1 Message Date
Anders Kaseorg
308480dd43 compose_paste: Fix misspelled function name.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-17 14:13:21 -08:00
Balamurugan1962
8511eec1d6 settings_bots: Sort "No owner" bots at the bottom when sorting by owner.
Fixes: #36570.

Modify `sort_bot_owner` to place bots without an owner at the bottom
when sorting by the "Owner" column. This groups bots with owners
together for easier scanning.

The logic first prioritizes moving any bot with "No owner" to the
bottom of the list. Alphabetical name comparison is only applied when
both bots have owners to compare.
2025-11-17 12:27:14 -08:00
Sahil Batra
ad08ae8a3b css: Remove transition for background-color on hovering table headers.
This commit removes transition for background-color on hovering over
table headers with "data-sort" attribute.

This is done so that we can fix the weird behavior of background
color of header being set to a weird value when clicking on a
dropdown widget option rendered over the table header for bots table.

This was likely due to transition being stopped midway by the browser
which resulted in a weird background highlight for the header.

And anyways the transition is brief and appears only on hover, so
removing it does not result in a major change of user behavior.
2025-11-17 11:22:39 -08:00
Sahil Batra
ae601560b3 ui_init: Initialize user_groups before people.
The user_group module must be initialized before people
module, so that can_access_all_users_group setting group
can be used to check whether the user has permission to
access all other users.
2025-11-17 11:04:48 -08:00
Amit Patil
246167858e todo widget: Add support for adding tasks via Enter key press.
This commit adds a unified keydown listener to both the task name (`input.add-task`)
and description (`input.add-desc`) input elements. Pressing Enter triggers the `add_task()`
function, enabling keyboard-based submission of new tasks in the widget.
2025-11-14 12:01:14 -08:00
Therese Selberg
e5c0d06481 popover: Fix too wide popup on narrow viewport.
Fixes #36141.
2025-11-14 10:54:51 -08:00
Shubham Padia
bff08e6bb8 fenced_code: Remove zulip-mobile specific pygments_data check.
We still have to check whether we have a valid lang value or not since
markdown.ts does not pass a lang, and depends on this logic to continue
working the same as before.
2025-11-14 10:19:12 -08:00
Shubham Padia
e7269a1368 shared: Move icons to web/images/icons.
This completes the removal of web/shared.
https://chat.zulip.org/#narrow/channel/6-frontend/topic/web.2Fshared
2025-11-14 10:19:12 -08:00
Evy Kassirer
89dc1bbf67 reload_setup: Fix zod parse error.
Followup to #36085, the type for the old format wasn't written
correctly.

Fixes error: https://chat.zulip.org/#narrow/channel/464-kandra-js-errors/topic/.24ZodError.3A.20.5B/near/2295347
2025-11-13 16:09:37 -08:00
Pratik Chanda
ade60f2571 info_overlays: Use internationalized strings for message_formatting tab.
This commit changes all user facing strings to internationalized
strings in message formatting tab in info overlays.

Fixes: zulip#22875.
2025-11-13 15:58:51 -08:00
Nirvedh Harpal
d1049f3818 left-sidebar: Add expand/collapse all options to filter menu.
This adds two new options to the left sidebar filter menu:

- Expand all sections (zulip-icon-expand)
- Collapse all sections (zulip-icon-collapse)

These appear above the existing "Don't group channels by folder" entry,
and expand/collapse all sidebar sections (Views, DMs, folders, etc.)
at once.

Fixes #35884.
2025-11-13 14:51:24 -08:00
Aman Agrawal
8ee196431d slack_import: Use dashboard instead of drag drop for file uploads. 2025-11-13 14:46:15 -08:00
Aman Agrawal
8e27424996 slack_import: Move slack import file upload logic to separate file.
This helps us remove additional dependency from other pages.
2025-11-13 14:46:15 -08:00
apoorvapendse
4141919c4b copy_messages: Improve language metadata retention.
This fixes the incosistent behavior of copy pasting
content from language code blocks containing the
language in the paste output code block by wrapping
the selection content inside a `.codehilite` that
contains the language metadata, so paste_html
contains that part to ensure consistent paste
behavior.

Report and Discussion: https://chat.zulip.org/#narrow/channel/9-issues/topic/Pasting.20code.20block.20does.20not.20include.20language.20in.20code.20block

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-11-13 14:45:37 -08:00
apoorvapendse
40ceb352f6 compose_paste: Wrap single line content in language block.
We now wrap single liner code content in a language block if the
required metadata is present in the `paste_html`. The inline
markdown paste behavior now only applies to codeblocks that don't
have a language associated with them or miss the language
metatdata in the `paste_html`.

The latter will occur less frequently after change
that will be introduced in the following commit.

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-11-13 14:29:47 -08:00
apoorvapendse
fb7fcebb2c copy_messages: Make language extraction easier to read.
This gets rid of the hard-to-read ternary logic
that was used to extract the language of the code block.

Discussion:
https://github.com/zulip/zulip/pull/35639#discussion_r2263824293.

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-11-13 14:29:47 -08:00
Aman Agrawal
5b22d6e2b8 left_sidebar: Scroll user to top on search.
Also, restore scroll position when input is cleared.

Tested locally that the scroll position is properly restored
in left sidebar search, topic zoom and DM zoom states.
2025-11-13 14:09:50 -08:00
Aman Agrawal
c7ee445879 sidebar_ui: Don't use throttled function on enter keypress.
There is no benefit from throttling `enter` keypress here.
2025-11-13 14:09:50 -08:00
Aman Agrawal
b21ac8936a hash_util: Revert support for incorrectly cased operator in URL.
This commit aims to revert the behaviour of supporting incorrectly
cased operators in URLs introduced in #36554.
2025-11-13 11:38:50 -08:00
Sahil Batra
836b9dbafb settings: Add buttons for common bot actions in the table.
This commit adds code to show a "Download zuliprc" button
for "Generic" bots and "Generate URL for integration" button
for "Incoming Webhook" bots in "Actions" column of the bots
table as they are commonly used actions and would be good
to have it such that they are easy to access.

URL integration button is shown to admins and bot owners and
download zuliprc button is only shown to bot owner which is
same as what we do in "Manage bot" form.
2025-11-13 10:08:33 -08:00
Alya Abbott
fadd80ae60 compose: Make banner for pasting long text more succinct.
Follow-up to #35579.
2025-11-12 17:39:33 -08:00
apoorvapendse
d512e9a7c9 mobile_web: Persist text selection on longtap.
This change enables mobile web users to select text
from messages which lets them do standard text selection
stuff like copy, select + quote, etc.

Previously, this was not possible as long tapping
text content resulted in triggering the reply action
behavior, which included removal of all selection ranges
caused by longtaps.

The possible drawback is not being able long tap a
message in a narrow to reply to the associated
topic/dm.
As an alternative, that can be achieved by a
short tap on the message and then tapping
the composebox.

Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/Cannot.20select.20text.20in.20mobile.20web/with/2277387

Frontend discussion: https://chat.zulip.org/#narrow/channel/6-frontend/topic/Simulating.20text.20selection.20on.20Chrome.20DevTools.20for.20mobile.2E/with/2278441

Design discussion: https://chat.zulip.org/#narrow/channel/101-design/topic/Text.20selection.20UX.20on.20mobile.20web/with/2278584

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-11-12 17:06:46 -08:00
Rajat yadav
750a07fd0b css: Disable view type dropdown for spectators in channel topics list.
Spectators (logged out users) can't use the view-type dropdown in the
'list of topics' view for channels. This adds the missing CSS styling
to make the dropdown appear disabled (grayed out with not-allowed cursor)
for spectators, matching the behavior in recent conversations view.

The CSS rule is placed in app_components.css using a generic selector
(.dropdown-widget-button) to apply the disabled styling consistently
to all dropdown widgets for spectators.

Fixes #36496.
2025-11-12 17:02:22 -08:00
Kislay Verma
4f26c6a6af compose_paste: Show an alternative on pasting large text.
On pasting very large text, the pasting logic takes a long
time to update the UI, (around 10 seconds for 30K characters).
So before actually pasting the text, we offer the user to
rather put the text into a file and upload it.

This builds upon and differs from #35187 in that
there we did paste the text before showing the button
to rather upload the text to a file.

Fixes #35187.
2025-11-12 16:05:22 -08:00
Kislay Verma
ddce29ac50 compose_paste: Extract actual pasting code into a function.
This is a prep to #35187 where we'll use this function
from the compose banner.
2025-11-12 16:05:22 -08:00
Sahil Batra
f2fe1213ef user-profile: Fix re-rendering of widgets when opening modal without hiding.
There was a bug where streams list and groups list were not re-rendered
if show_user_profile was called twice without hiding the modal before
calling it the second time. This happened when user clicks on
"View user profile" option in the user popover opened from one of
the user-type custom profile fields.

This commit fixes the bug by setting the widget variables to undefined
when show_user_profile is called so that the lists are re-rendered
again when the appropriate tab is opened.
2025-11-12 15:31:10 -08:00
kash2104
421c5e46d1 user_profile: Update subscribe_widget instantiation.
The nullish coalescing ?? logic was ineffective
because user_profile_subscribe_widget was always
undefined during setup though the cleanup function
on_user_profile_hide handled it.

This commit replaces the ?? logic with direct instantiation of
user_profile_subscribe_widget.
2025-11-12 15:31:10 -08:00
kash2104
30479667ae profile_settings: Convert timezone picker to dropdownwidget.
Changed timezone options to dropdownwidget in settings/profile.
Fixes #35860.

The implementation captures the previous value
before making the update request and uses
error_continuation to revert back to the
original value.

Also, this commit also sets the width for the
dropdown options list.
2025-11-12 15:31:10 -08:00
kash2104
3650401273 dropdown_widget: Add option for custom placeholder.
This commit introduces search_placeholder_text
in dropdown widget options in order to have
custom placeholder text in timezone dropdown
widget.
2025-11-12 15:31:10 -08:00
Anders Kaseorg
7eaf5447b4 shared: Remove @zulip/shared packaging files.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-12 15:28:14 -08:00
Aman Agrawal
3c3e5fcc1b filter: Separate out canonical and legacy operators.
This will help us clearly define which operators we need to write
logic for.

Especially useful when we will define different operand types for
each operator.
2025-11-12 12:33:38 -08:00
Aman Agrawal
b0b8932e09 hash_util: Lowercase operator before starting to decode.
We don't need to handle this case but doesn't require much from
us to support user giving wrong case to an operator when
typing in the URL.

Found this while testing the related changes in this PR.
2025-11-12 12:33:38 -08:00
Aman Agrawal
2a1fdb21ac filter: Remove unused operators.
They were added by mistaken in 9dd36b4727.
2025-11-12 12:33:38 -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
Sahil Batra
87bf28820f settings: Added missing assert statement.
Added a missing assert statement in else block just
to make sure that the else block is only called for
key === "text_search".
2025-11-12 09:27:26 -08:00
Sahil Batra
3ecce4bddd settings: Rename settings_users.get_bot_status.
This commit renames "get_bot_status" function in settings_users
to "get_bot_status_options" to make it clear what the function
is used for.
2025-11-12 09:27:26 -08:00
Aman Agrawal
5c1429d495 people: Avoid inaccessible users displayed as unknown for guests. 2025-11-12 09:18:54 -08:00
Aman Agrawal
62f4fc501c message_view: Fix CI failure.
Some checks failed
API Documentation Update Check / 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 CI / ${{ matrix.name }} (zulip/ci:trixie, false, false, Debian 13 (Python 3.13, backend), trixie) (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (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:trixie, , Debian 13 production install, trixie) (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
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie-11.0, 11.0 Version Upgrade, trixie) (push) Has been cancelled
Didn't dig into the failure, I expect Evy to investigate further
when they have time.
2025-11-12 10:33:05 +05:30
Evy Kassirer
2a7368e1e6 search: Allow adding users to dm-including pills.
Fixes #33342.
2025-11-11 17:59:31 -08:00
Evy Kassirer
8f65d7d40b search_pill: Add background around user suggestions to match search bar. 2025-11-11 17:10:48 -08:00
Sahil Batra
eabfca6751 bot-settings: Replace fa-refresh icon.
This commit updates the button to regenerate bot API key to
not use fa-refresh icon.
2025-11-11 16:17:27 -08:00
Maneesh Shukla
85ac0bf6d9 styles: Remove the unused css related to sea-green.
The sea-green class was incorrectly used with the todo widget,
as there are no rules for sea-green defined in the codebase except for
sea-green with ".button" as parent class.

Fixes #33130.
2025-11-11 16:17:27 -08:00
Maneesh Shukla
2c24ef7f11 bot-settings: Redesign the buttons in the bot-settings panel.
Fixes #31156.
2025-11-11 16:17:27 -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
59a38eb5ad settings: Consolidate bot management fields into "Manage Bot" section.
This commit consolidates the bot management fields
into a single section called "Manage Bot" in the bot profile card.
It adds three new fields:
1. API key
2. zuliprc info
3. Bot type

Along with this, it also adds the legacy icon support in the
icon_button component.

Fixes part of #31156.

Co-authored-by: Sujal Shah <sujalshah28092004@gmail.com>
2025-11-11 16:17:27 -08:00
Maneesh Shukla
54596e76a4 bot-settings: Create bot_helper for bot settings.
This commit creates a new bot_helper.ts file and functions used
to generate configuration file for bots are moved to that file.
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
Maneesh Shukla
7784a5eb53 settings: Refactor code to handle tabs in user settings.
This commit updates code which handles user settings tab to refactor
and rename functions and variables in such a way that they can be
used for bot settings tabs as well in further commits.

Changes done are:
- Renamed handle_invalid_users_section_url to handle_invalid_section_url
and also updated it such that it can be used for sections other than
"users" as well.
- Renamed get_user_settings_tab to get_settings_tab and also
updated its variable names similarly.
- Updated name for tab variables in activate_section_or_default and
admin.launch functions similarly.

Fixes part of #31156.
2025-11-11 16:17:27 -08:00
Sahil Batra
9e5622bd30 settings: Extract bot template code in a template.
This commit extracts html for bots table in a separate template
view so that we can use the same file for tables in both "Your bots"
and "All bots" tabs.
2025-11-11 16:17:27 -08:00