Commit Graph

57211 Commits

Author SHA1 Message Date
Alex Vandiver 3c2efd236c kandra: Skip prometheus database user creation. 2024-03-29 11:34:18 -07:00
Alex Vandiver da243e9fb7 kandra: Force disks to be set up before kernels are changed. 2024-03-29 11:34:18 -07:00
Alex Vandiver e4883cc2dc kandra: Move PostgreSQL data mountpoint to /srv/data.
We store a lot of other things in `/srv` now, and moving them mid-puppet
confuses things significantly.
2024-03-29 11:34:18 -07:00
Alex Vandiver 93c6fd4746 kandra: Pull instance storage device from nvme information. 2024-03-29 11:34:18 -07:00
adnan-td 87dee7a9b2 invite_user_modal: Replaced email text_area with input_pill.
This makes the widget considerably more attractive, and probably a bit
more usable.

Fixes #29391.
2024-03-29 11:13:03 -07:00
adnan-td 97cbf4e075 input_pill: Renamed removePillFunction to onPillRemove. 2024-03-29 11:13:03 -07:00
Tim Abbott 6be511ed48 invite: Use error status for failed invitation attempts. 2024-03-29 11:13:03 -07:00
Anders Kaseorg 8a7f61fcad test_decorators: Replace some deleted tests.
Commit 807a4428f6 (#29485) deleted the
corresponding tests in TestAuthenticatedJsonPostViewDecorator.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-29 09:39:34 -07:00
Anders Kaseorg 416cba8746 install-shellcheck: Upgrade ShellCheck from 0.9.0 to 0.10.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-29 09:37:38 -07:00
Anders Kaseorg da984d0ab3 install-node: Upgrade Node.js from 20.11.1 to 20.12.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-29 09:37:38 -07:00
Anders Kaseorg 328ac38b0d dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-29 09:37:38 -07:00
Anders Kaseorg 708c3e7182 node_cache: Invoke pnpm via corepack.
This avoids prompting the user that corepack is about to download
pnpm.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-29 09:37:38 -07:00
Anders Kaseorg 2c13d0e43d eslint: Fix @typescript-eslint/no-unnecessary-type-assertion.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-29 09:37:38 -07:00
Anders Kaseorg 26ae533985 eslint: Fix @typescript-eslint/prefer-optional-chain.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-29 09:37:38 -07:00
Anders Kaseorg 4935276aa4 eslint: Fix @typescript-eslint/use-unknown-in-catch-callback-variable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-29 09:37:38 -07:00
Anders Kaseorg 8f07d830f2 narrow_state: Remove unused narrowed_to_search, narrowed_to_starred.
They’re unused as of commit de0db7ad1a
(#28636).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-29 09:37:38 -07:00
Alya Abbott b11bf32f8f help: Document user list in the right sidebar. 2024-03-28 17:33:11 -07:00
Alya Abbott 3a51ac349c help: Add instructions for how to search for messages. 2024-03-28 17:33:11 -07:00
Anders Kaseorg 44e38e8ea7 apt-repos: Disallow libmagic1 1:5.45-2 (Ubuntu 24.04).
This package is replaced by libmagic1t64 1:5.45-3 for the Ubuntu
64-bit time_t transition, but hasn’t been deleted from the archive
yet.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-28 16:47:30 -07:00
Pratik Chanda 0708505acb left_sidebar: Fix DM row highlight linger on narrowing away.
Earlier, DM row remained highlighted when narrowed to different
part of left sidebar other than recent and inbox since on narrow
event, `handle_narrow_activate` wasn't properly handling unnarrow
events. It wasn't calling `update_private_messages` to update the
state of the DM list.

This commit fixes the behaviour by updating the state on narrowing
away from DM rows.

Fixes: zulip#27698.

Co-authored-by: Rinwaoluwa <peterodejobi9@gmail.com>
2024-03-28 14:09:04 -07:00
Pratik Chanda 8c89725fcc views: Fix message_list.current not updating to undefined on narrow.
Earlier when users narrowed to recents or inbox, message_list.current
was updating to last dm row selected for first few filter checks in
'narrow_state' which in turn would set active_user_ids to last dm
row selected. This resulted in DM highlight lingering.
The narrow_state.filter is supposed to return undefined when narrowed
to recents or inbox.

This commit fixes the behaviour by setting 'current' undefined before
filter checks on narrow.

Fixes part of #27698.
2024-03-28 14:09:04 -07:00
afeefuddin da80afd6f4 lightbox: Convert module to TypeScript. 2024-03-28 13:56:56 -07:00
afeefuddin 59c761fe32 lightbox: Pass HTMLElement consistently to parse_media_data. 2024-03-28 13:56:56 -07:00
afeefuddin 97d372c837 lightbox: Use ".append" to append nodes instead of ".html". 2024-03-28 13:56:56 -07:00
afeefuddin ce3e609d90 lightbox: Remove unneeded unit test. 2024-03-28 13:56:56 -07:00
N-Shar-ma 46147cd13c copy_and_paste: Add documentation for keyboard shortcuts for pasting.
Fixes: #29209.
2024-03-28 13:07:34 -07:00
N-Shar-ma 7895b05284 turndown: Enable turndown in production. 2024-03-28 13:07:34 -07:00
Varun Singh c29fbeca94 widgetize: Refactor type for 'extra_data'. 2024-03-28 12:59:58 -07:00
Varun Singh 894756addc submessage: Replace bogus test data with valid objects.
The test data was not the correct representation of submessage's
content field. This caused the zod schema to throw error.

This is a temporary solution and eventually we have to move to an
efficient approach making the test data more representative and
accurate.

Discussion:
https://chat.zulip.org/#narrow/stream/6-frontend/topic/TypeScript.20migration/near/1766122
2024-03-28 12:59:12 -07:00
Varun Singh f1db30418b submessage: Convert module to TypeScript. 2024-03-28 12:59:12 -07:00
Varun Singh a101e161dc submessage: Parse 'events' array data with zod.
The 'events' array in 'get_message_events' is made of objects.
Each object has 'data' field which is of type 'any' because
'JSON.parse' returns 'any'. We need to parse it using zod
to add type-safety.

The reason I am parsing the entire array at once is because,
'events' array is made of objects of two different schema; and
the order matters. The first element is of different schema than
the rest.(.tuple().rest() used is for that purpose).

This validates the entire submessage content before it is passed to
'widgetize.ts'.
2024-03-28 12:59:12 -07:00
Varun Singh 195bb4d13b zform: Move zod schema to avoid dependency cycle.
We need to validate the events array in 'submessage.js' using
zod. One of the schema needed is 'zform_widget_extra_data_schema'
in zform. If we import it inside 'submessage', it creates a
dependency cycle ; zform.js=>transmit.js=>server_events.js=>server_events_dispatch.js.
server_events_dispatch.js=>submessage.js=>zform.js

Hence I have moved the schema inside 'submessage' and imported it
inside 'zform.js'.
2024-03-28 12:59:12 -07:00
Varun Singh 3eb1a11725 zform: Add missing field in zod schema. 2024-03-28 12:59:12 -07:00
Varun Singh 7329100dc7 submessage: Send only relevant 'event' array data.
We sent entire 'events' array to 'widgetize.activate' and then
removed its first element(using .shift()); instead we should
send only relevant data ie. the entire array after the first element.

This also helps us avoid an extra check in node tests.
2024-03-28 12:59:12 -07:00
Varun Singh 2e8b950022 submessage: Remove redundant 'parseInt' statements.
As per 'Submessage' type in 'types.ts' , 'id' field is of type 'number'.
Hence we don't need to parse it.
2024-03-28 12:59:12 -07:00
Sahil Batra 85d0c0d7dd settings: Refactor code to handle authentication methods.
This commit refactors code to handle authentication methods
so that we need not update the type returned for
"realm_authentication_methods" by get_property_value
to be something different than what is the type for
realm object.

This change essentially means that we do not use the value
returned by get_property_value for authentication methods and
directly call realm_authentication_methods_to_boolean_dict.

Follow up to #29264.
2024-03-28 12:12:52 -07:00
Prakhar Pratyush a0cec2c378 stripe: Skip invoice overdue mail for free plans with no next plan.
Earlier, if a free plan (say legacy plan) with no next plan scheduled
was invoiced, we used to send an invoice overdue email if the last
audit log update is stale.

Actually, we don't need this data as the invoice step is just going
to downgrade the current plan. We should not wait for customer to
start uploading data in this case. Skip the email sending step and
invoice the plan to downgrade.
2024-03-28 09:29:23 -07:00
Anders Kaseorg 36b8462796 status_emoji: Remove extra space with Handlebars whitespace control.
This gets rendered into a comma-separated list, and the extra space
was ending up before the comma.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-28 09:11:09 -07:00
Anders Kaseorg f0945518ba inbox: Remove flexbox nonsense from user rows.
There was no reason for this to be a flexbox, and it was interfering
with wrapping of long names.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-28 09:11:09 -07:00
Mateusz Mandera c3caa3ecc8 stripe: Rename @error_handler decorator.
This decorator, among other things, transforms the "event" argument
passed when calling the decorated functions into actually passing
event.content_object.

So e.g. despite having a (before the decorator is applied) signature:

```
def handle_invoice_paid_event(stripe_invoice: stripe.Invoice, invoice: Invoice) -> None:
```

these are called passing an `Event` in the second arg when calling
`handle_invoice_paid_event`:

```
handle_invoice_paid_event(stripe_invoice, event)
```

I found that kind of confusing because the @error_handler decorator
didn't sound like something that would intervene in the arguments like
that. So it feels helpful to rename it something with a less modest
name, that makes it sound like it does more than just pure
error-handling.
2024-03-28 09:10:09 -07:00
Anders Kaseorg db1f69e72f compose_validate: Simplify away extra stream_data lookups.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-28 09:06:48 -07:00
Anders Kaseorg 48e836f01c compose_validate: Explode validation_error into individual functions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-28 09:06:48 -07:00
Anders Kaseorg 807a4428f6 compose_validate: Remove autosubscribe feature.
This was only used in the undocumented narrow_stream mode, and relied
on a deprecated synchronous XHR request.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-28 09:06:48 -07:00
Prakhar Pratyush a7dc7c0734 message: Add function to remove single newline in triple quoted string.
For multiline strings in triple quotes, a '\n' is included
at the end of each line.

Earlier, to skip '\n' we used to add an escape character '\'
at the end of each line.

This commit adds a function to avoid manually adding '\'.
2024-03-28 09:03:59 -07:00
Anders Kaseorg bd4a095fc3 inbox_ui: Sort names, not HTML.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-27 14:22:24 -07:00
Aman Agrawal bec8fccf75 right_sidebar: Hide underline from user-list toggle button in navbar. 2024-03-27 13:29:16 -07:00
Tim Abbott 3847740a2a settings: Sort various enumerations of settings fields. 2024-03-27 12:58:32 -07:00
Karl Stolley 286d44bf33 settings: Add new web information density settings.
Note that these settings are not operative at present, and are only
visible in the settings UI in the development environment.
2024-03-27 12:58:32 -07:00
Tim Abbott 8f0f41e236 pythonrc: Add various frequently handy imports. 2024-03-27 12:49:24 -07:00
Prakhar Pratyush 3add31496f puppet: Add a daily cron-job to send zulip update announcements.
A daily cron job is configured to run the
'send_zulip_update_announcements' management command.
2024-03-27 11:43:08 -07:00