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