Commit Graph

57412 Commits

Author SHA1 Message Date
Sayam Samal ba64900373 popovers: Simplify popover menu top and bottom padding. 2024-04-11 15:57:24 -07:00
Sayam Samal f5bedd9501 hotkeys: Show Level 2 Shift key symbol for Shift key in popovers. 2024-04-11 15:57:24 -07:00
Sayam Samal 4105a38c1f popovers: Add minimum width to popover hotkey hints. 2024-04-11 15:57:24 -07:00
Sayam Samal dcb6252e57 popovers: Update popover hotkey hint colors. 2024-04-11 15:57:24 -07:00
Sayam Samal 19077fa1f6 actions_popover: Update icons for message actions menu options. 2024-04-11 15:57:24 -07:00
Sayam Samal 299aa7c39f popovers: Add hotkey hints support via a new handlebar template. 2024-04-11 15:57:24 -07:00
Sayam Samal 36e709c934 hotkeys: Rename adjust_mac_tooltip_keys to adjust_mac_hotkeys. 2024-04-11 15:57:24 -07:00
Sayam Samal 4b0e6ae3d8 actions_popover: Use the new "popover-menu" theme.
Fixes part of #28699.
2024-04-11 15:57:24 -07:00
Sayam Samal 422230e82d popovers: Add consistent tippy arrows which support all placements.
Added `tippy.js/dist/border.css` along with some custom CSS override,
to add arrows which inherit the border color and width of the popover,
while also supporting all placements.

Also consolidates the CSS styling of the popovers to the `tippy-box`
element, which is the recommended way to theme the element according to
https://atomiks.github.io/tippyjs/v6/themes/#creating-a-theme.
This further helps in unifying the styling of the popover and the arrow,
and prevents inconsistencies such as shadow of the popover being casted
onto the arrows.
2024-04-11 15:57:24 -07:00
Sayam Samal 6bf9c2bdfc popovers: Rename "navbar-dropdown-menu" theme to "popover-menu" theme.
Also renames the navbar dropdown related CSS terms, to their equivalent
popover related terms to accompany the name change of the theme.
2024-04-11 15:57:24 -07:00
Evy Kassirer 1fe66a238f
build_emoji: Make sure emoji names are supported.
Fixes #19398. (All the other parts were completed a while ago).
2024-04-11 15:36:20 -07:00
Shubham Padia c44450c054
settings_users: Reverse order of roles in role filters.
Fixes #29687.
2024-04-11 15:35:01 -07:00
Alex Vandiver a853b8849f install: Actually add --puppet-classes argument.
7187146422 only added it to the internal parsing and the help, not
the getopt invocation which would make the command accept the
argument.
2024-04-11 15:34:00 -07:00
tnmkr 536f2e09e2 invite_user_modal: Always show scrollbar.
We now always show the scrollbar in invite modal body if it is scrollable.
This avoids confusion and makes it clear that some options are out of view.

Fixes #29393.
2024-04-11 14:41:38 -07:00
Mateusz Mandera c9ca4e68e5 scim: Add config option to disable initial streams for guests.
When an organization (without open ability for anyone to join) invites a
guest user, the invitation prompts allows them to choose whether the
guest should be added to default streams or not. This is useful, because
since we don't have per-role default streams configs, they may want
default streams to be for full Members.

SCIM provisioning doesn't have this control, since a newly provisioned
user gets created via a direct do_create_user call, thus adding them to
the organization's default streams, with no workaround possible aside of
just getting rid of default streams in the organization.

To make provisioning guests in such an organization usable, we add a
simple config option to create them with no streams. It's configured by
adding
```
"create_guests_without_streams": True
```

to the config dict in settings.SCIM_CONFIG.
2024-04-11 12:28:26 -07:00
rht c77ed52fa9
slack import: Refer the archive file as a file or dir. 2024-04-11 12:05:56 -07:00
roanster007 0be93b8519 stream_settings: Fix error on stream setting update when compose closed.
Previously, when stream settings were updated, without opening the
compose box, assertion error were thrown.

This error was a result of a regression in compose_recipient, due to an
extra assert statement added during its typescript migration in
25ff0d4418.

This is fixed by removing the statement.
2024-04-11 11:28:55 -07:00
sujal shah dd91157993 integration: Split 'opened_or_update_pull_request' event type.
Modified the 'get_zulip_event_name' function to
differentiate between 'opened' and 'updated' actions
for pull requests within the 'pull_request' event type.
Created separate event types for 'opened_pull_request' and
'updated_pull_request'. Updated the 'EVENT_FUNCTION_MAPPER'
dictionary to include handlers for these new event types.
Adjusted the'get_opened_or_update_pull_request_body' function to handle
both 'opened' and 'updated' actions appropriately.

Fixes #29594.
2024-04-11 11:23:08 -07:00
Karl Stolley 7291f0a919 info_density: Set font size, line height vars in dev. 2024-04-11 10:25:03 -07:00
Varun Singh 9ad7a9f0be data: Restrict parameter type to not be undefined.
Since the type of request_method(AjaxRequestHandler) has
been extended in the previous commit.Consequently the 'data'
field of 'request_method' has to be typed such that it
satisfies this change.

Because request_method's type can also be 'typeof patch' which
does not accept undefined 'data' field, I haved 'omit'-ted
'undefined' from 'data's type in function signature to satisfy
TypeScript.

Now ,in support of the changes I have made to two different function
sign(namely setting_ui.do_settings_change,dialog_widget.submit_api_request)
I am stating some points about data field inside these respective
function signs.

1.settings_ui.do_settings_change: For this 'data' was actually never
undefined. Each function call has a 'data' object passed( with one
or more fields).

2.dialog_widget.submit_api_request: For this case many function calls
actually didn't have 'data' field (ie.'data' was undefined).
BUT,for those cases it was defaulted to '{}'(see function sign).
So effectively 'request_method' didn't recieve an undefined 'data' for
this case too. I have removed the defaulting and passed '{}' in the
function calls for those cases, which effectively does the some job,
but satisfies the type.

For both these cases 'data' field isn't undefined and hence an Omit,for me
makes sense.
2024-04-11 10:08:45 -07:00
Varun Singh 9b9ea01dfa channel: Use TypeScript unions for 'AjaxRequestHandler'.
Type AjaxRequestHandler is used for typing request methods
(like channel.get, channel.post etc.)Use cases include
'request_method' parameter in settings_ui.do_settings_change
and dialog_widget.submit_api_request.

Problem with the type definition:
The current type definition( ie. 'typeof call' ) satisfies every
'request_method' type EXCEPT channel.patch request.One can notice
the difference b/w 'call' and 'patch' function in channel.ts .

Hence,We need to expand the AjaxRequestHandler type.I have unioned it
with 'typeof patch' is account for the case when 'request_method'parameter
is of type channel.patch.

Discussion:
https://chat.zulip.org/#narrow/stream/6-frontend/topic/setting_ui.20do_settings_change/near/1754557
2024-04-11 10:08:45 -07:00
Varun Singh b6473deca0 zod: Consistently use named imports. 2024-04-11 09:47:28 -07:00
Varun Singh 4985363bd7 poll_widget: Rename type to be more relevant. 2024-04-11 09:47:28 -07:00
Varun Singh 2d4bed4ab4 state_data: Fix alphabetical order. 2024-04-11 09:47:28 -07:00
Alex Vandiver d834f1fc01 unarchive_stream: Prevent unarchiving a stream in the wrong realm. 2024-04-11 09:41:41 -07:00
Lauryn Menard 01b59c5aa2 message-type: Add support for "channel" as value for type parameter.
For endpoints with a type parameter to indicate whether a message is
a direct or stream message, adds support for passing "channel" as a
value for stream messages.

Part of stream to channel rename project.
2024-04-11 09:40:25 -07:00
Alya Abbott d24dadb52f help: Add "Find administrators" help page. 2024-04-11 09:37:29 -07:00
Alya Abbott a7ae454f52 help: Document role filter for Users list. 2024-04-11 09:37:29 -07:00
Alex Vandiver 87fb703e5b kandra: Log and timestamp autossh output.
By default, autossh writes to syslog; setting AUTOSSH_DEBUG is the
only way to produce output to STDERR.  Timestamp that and log that to
the logfile, making the logs perhaps useful.
2024-04-11 09:34:43 -07:00
evykassirer a8d261a68f dropdown_widget: Fix DropdownWidgetOptions.
Addresses this comment
https://github.com/zulip/zulip/pull/29611/files#r1559751399
2024-04-11 09:32:19 -07:00
Anders Kaseorg 36aa0177bd Revert "apt-repos: Disallow libmagic1 1:5.45-2 (Ubuntu 24.04) again."
This reverts commit 13e28fc3ac.
2024-04-10 16:07:25 -07:00
Anders Kaseorg 0d1ed06762 requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-10 15:32:37 -07:00
Shubham Padia 3f6ceba39a settings_users: Add role filter to user list.
Fixes #18617.
- The role filter is added to both active and deactivated user
list. The original plan was to introduce a multi select checkbox
dropdown for the roles, but since that component is not ready yet,
we will use the dropdown component for the first iteration.
- To accomodate multiple filters, we have used an approach
similar to the one in recent_view_ui.js where we use dropdown
callback function and on("input") event on text search to set the
filter value in memory. The predicate functions uses these filters.
- We have also changed the default message when there are no
users to show to reflect `filters` instead of `current filter`.
2024-04-10 13:45:06 -07:00
Sahil Singh 6c2535fe46 bots: Avoid multiple active bots with the same name.
Creating a bot with a name that is already in use
will raise an error. However, by deactivating
the existing bot, creating a new bot with the
same name, and then reactivating the original bot,
it is possible to have multiple bots with the same name.

To fix this, we check if the bot name is already
in use in the active bots list. If it is,
an error will be raised, prompting either the
name of the existing bot to be changed or
the bot to be deactivated.

Co-authored-by: Sujal Shah <sujalshah28092004@gmail.com>
2024-04-10 13:14:25 -07:00
Alya Abbott 0007673d9f help: Clarify warning about not applying authentication methods. 2024-04-10 13:10:44 -07:00
Mahhheshh 68646cacfc message_edit_history: Add loading spinner.
Adds a loading spinner to the message history overlay,
improving the user experience by providing visual feedback while the
message edit history is loading.
2024-04-10 13:10:12 -07:00
evykassirer 16bf8d3df6 views_util: Convert module to typescript. 2024-04-10 12:19:52 -07:00
evykassirer 9366d42f14 dropdown_widget: Pass current value to get_options to avoid hacky this. 2024-04-10 12:19:52 -07:00
evykassirer c449bb35e2 narrow_title: Fix filter type. 2024-04-10 12:19:52 -07:00
Vector73 2734a9483b api_documentation: Document "/invites/multiuse" endpoint.
Adds "/invites/multiuse" endpoint to the API documentation.

Creates a shared schema for the invite_as and invite_expires_in_minutes
parameters that are the same for the "POST /invites" endpoint.

Also, updates the response documented for the "GET /invites" endpoint
to match the information in the "POST /invites" and "/invites/multiuse"
documentation.
2024-04-10 11:29:14 -07:00
Mahhheshh 619f85fac7 message_edit_history: Set cursor to default on hover. 2024-04-10 11:25:31 -07:00
N-Shar-ma 30b68214d3 settings: Do not scroll to save button when typing in textarea / input.
In an unsaved state, when focus is in a textarea or an input of type
text, we don't yet scroll the save button into view to not interrupt the
user's typing. When the input / textarea loses focus, we scroll then if
needed, triggered via the `change` event.
2024-04-10 11:18:17 -07:00
afeefuddin 61966e9d6e compose_tooltips: Convert module to TypeScript. 2024-04-10 11:17:20 -07:00
Lauryn Menard 39c5855b88 hash-util: Use NarrowTerm type from state_data.
Replaces the Term type in hash_util.ts with the NarrowTerm type
that is defined in state_data.
2024-04-10 11:15:27 -07:00
tnmkr 2f88b810e0 renumber-migrations: Skip migration 0501.
Security fix cf8b9ad needed migration
`zerver/0501_delete_dangling_usermessages` on the 8.x branch (3db1733).
This resulted in two migrations numbered 0501, due to which this tool
always got stuck on 0501.
2024-04-10 11:15:00 -07:00
Anders Kaseorg 15cec69995 check-openapi: Modernize yargs usage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-08 16:50:56 -07:00
Anders Kaseorg 7d6c5beb19 message-screenshot: Fix commander@12 usage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-08 16:45:47 -07:00
Alex Vandiver f4d109c289 puppet: Fix arrow alignment. 2024-04-05 09:18:04 -07:00
Alex Vandiver 235e2eefc8 puppet: Switch from top-level fact variables to facts dict, again.
These were somehow missed in 57f8b48ff9.
2024-04-05 09:18:04 -07:00
N-Shar-ma 7072794871 css: Make pills' content collapse according to width available.
We set `min-width: 0` on all nested flex containers for pills, not just
the pills label, which allows the label content to collapse as much as
needed with ellipsis when overflowing.

Fixes: #27205.
2024-04-05 09:14:37 -07:00