Commit Graph

58670 Commits

Author SHA1 Message Date
Anders Kaseorg ff23f79550 copy_and_paste: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg e50a115d6f composebox_typeahead: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg a1ca665119 compose_ui: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 6eec89ab96 compose_reply: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg cbffc10e9e compose_fade: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 468da9ed23 compose_actions: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 015e3917ac common: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 5a4b0420d1 buddy_list: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 6cd8c9bb8c bot_data: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 8cec7dd917 bootstrap_typeahead: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 9ad8ca4223 blueslip_stacktrace: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 284beed889 billing/sponsorship: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg c2c2e0b9ea billing/remote_billing_auth: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 01677db59e attachments_ui: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 9b711cda20 tippy: Use namespace import for tippy.js.
Names like “delegate”, “Instance”, “Placement”, “Props”, and
“ReferenceElement” are much too generic to make sense as named
imports.

The downside is that we now need to write tippy.default(…) instead of
tippy(…) (because ES module namespace objects cannot be callable), but
that cost is worthwhile.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:45:46 -07:00
Alex Vandiver 87d36d24c9 droplet: Rebuild droplet image with 22.04. 2024-05-30 11:51:44 -07:00
Alex Vandiver 3ae3aba712 droplet: Upgrade to 4GB of RAM and 2CPUs; 2GB is insufficient. 2024-05-30 11:51:44 -07:00
Alex Vandiver b15c3006a0 droplet: Drop unnecesary duplicate steps.
Pasting into "user data" negates the need to copy the script and run it.
2024-05-30 11:51:44 -07:00
Aman Agrawal 817bffe6b1 message_list: Rename `narrowed` property.
We rename it for clarity so that someone new to the codebase
knows instantly what it is checking.
2024-05-30 11:41:13 -07:00
Aman Agrawal 71341d282e narrow: Remove last remains of was_narrowed_already.
This doesn't seem useful even for sentry logs since they
will already contain the full hash change history.

Rest of it was removed in 240f7b53b2.
2024-05-30 11:41:13 -07:00
roanster007 f905bfdcce api_docs: Update the "Changes" section of narrows to refer changelog.
Previously, the "Changes" sections for narrows in the api_docs
used to mention the entire set of changes for the narrow. This
commit replaces it to rather refer to the changelog at
[Construct a narrow](/api/construct-narrow).

This avoids the risk of the details getting out of sync between
the different descriptions, and reduces the burden for updating
or editing them.
2024-05-30 11:37:13 -07:00
roanster007 7b1a5d84fc refactor: Extract the methods called post narrow message list update.
This commit extracts various methods called post the current
message list is updated in "narrow.js" such as update_unread_banner,
handle_post_view_change, etc. into a separate method --
"handle_post_message_list_change".

This allows us to be able to call these methods independently
in case we need to update the filter and the corresponding
message lists.

This is a preparatory commit to #30114.
2024-05-30 11:37:13 -07:00
Prakhar Pratyush f9fca5b469
remove_single_newlines: Fix regex to parse list syntax correctly.
Earlier, the 'remove_single_newlines' function wasn't working
correctly when '\n' was followed by asterix, hyphen, or number.
Specifically, they were not added as a syntax for ordered or
unordered list in markdown.

For example, see the workaround fix in 330439a83b.

This commit updates the function to replace '\n' with ' ', when
"\n" is not preceded by "\n" and not followed by:
* Another newline (\n)
* A hyphen followed by a space
* An asterisk followed by a space
* A number followed by a dot and a space

We won't have to do fixes like 330439a83b in the future.
2024-05-30 11:32:52 -07:00
Varun Singh 50e0f336f0 settings_streams: Fix error thrown when adding 'default-channels'.
The 'Select channel' dropdown in 'Add default channels' modal is
the LAST dropdown element on the modal and it does not contain
`data-stream-id` attribute.

.attr('data-stream-id') would return undefined for this element
and as a result the returned `Set` would have its last element a
`NaN` --- passing a `NaN` inside 'data' field of 'channel.post' threw
an error.

We tweaked the selector string to selectively map over the elements with
'data-stream-id' attribute.
Also we removed '.toString()' converting stream-id to a string (stream-id is a
'number' type).
2024-05-30 10:53:19 -07:00
Prakhar Pratyush 4deecfa58d zulip_updates: Fix assertion error while sending update messages.
Earlier, for new realm with zulip_update_announcements_stream
set to None, an assertion error was raised in
'is_group_direct_message_sent_to_admins_within_days' because
no 'None' to new level change took place for such realm.

A new realm is on the latest level and a default stream is set.

This commit updates the logic to simply skip sending
update messages as the stream was manually set to None
in such cases.
2024-05-30 10:52:32 -07:00
Aman Agrawal 3e44765e0b upgrade: Inform customer that fixed price plan will not auto-renew. 2024-05-30 10:49:44 -07:00
Anders Kaseorg 4d8e5b5029 5xx: Fix development server preview of 500 error page.
This can be viewed at http://localhost:9991/webpack/5xx.html on the
development server.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 10:49:03 -07:00
Anders Kaseorg 27a993a504 stats: Make sent_data_schema specifically expect human and bot keys.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 10:01:59 -07:00
Alya Abbott 7b51a89847 help: Link to Data Processing Addendum (DPA) from GDPR help page. 2024-05-30 10:01:09 -07:00
Alya Abbott 8f7b111689 portico: Link to sponsorship policies from /for/communities page. 2024-05-30 10:00:37 -07:00
Aman Agrawal e74dd93b52 5xx: Add a comment explaining how CSS is applied to this page. 2024-05-30 09:12:59 -07:00
Aman Agrawal 4811dd3ffd Revert "5xx: Remove css classes and duplicate div tags."
This reverts commit eada57921e.

This does have CSS applied to it via webpack.

See

```
new HtmlWebpackPlugin({
    filename: "5xx.html",
    template: "html/5xx.html",
    chunks: ["error-styles"],
}),
```
2024-05-30 09:12:59 -07:00
Anders Kaseorg 7377d3fab9 topic_generator: Fix types of get_next_stream, get_prev_stream.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-29 23:33:27 -07:00
Anders Kaseorg c20af83770 people: Fix get_custom_fields_by_type type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-29 23:33:11 -07:00
Anders Kaseorg a01d68e838 people: Rename ProfileData type to singular ProfileDatum.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-29 23:33:11 -07:00
Anders Kaseorg ec199082fd types: Move Submessage to submessage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-29 17:47:09 -07:00
evykassirer 48fc0bc750 message_helper: Convert module to typescript. 2024-05-29 16:45:36 -07:00
evykassirer 7364c02ed6 message_helper: Set clean reactions when processing the raw message. 2024-05-29 16:45:36 -07:00
evykassirer 28107eb913 message_helper: Be more explicit about converting subject to topic. 2024-05-29 16:45:36 -07:00
evykassirer 297d393539 message_helper: Only convert subject to topic for stream messages.
There was a stale comment here saying we needed to do this for
private messages too, but `convert_message_topic` only modifies
`message` if its type is "stream".
2024-05-29 16:45:36 -07:00
evykassirer 50f5cf9ad8 message booleans: Return new message instead of mutating a raw message. 2024-05-29 16:45:36 -07:00
evykassirer 59a743de01 reify_message_id: Save id on most up-to-date message object.
Previously we relied on `echo.reify_message_id` to set the new
`id` and `locally_echoed` value, but it was setting this on
the message stored in `waiting_for_id`, which isn't guaranteed
to be the same as the message in the message store. Once
`process_new_message` stops mutating the message it gets and
returns a new message object, this would have caused a bug.
2024-05-29 16:45:36 -07:00
evykassirer bab1dc5d9c message tests: Don't assume process_new_message mutates the message.
We already changed callsites in the codebase to use the message
returned from `process_new_message` instead of assuming the raw
message passed in will be mutated. This fixes a few remaining tests.
2024-05-29 16:45:36 -07:00
evykassirer 61371868ad message_store: Mark optional attributes as optional.
These aren't set when the Message object is first created
and only used within `message_list_view`, so they should be
optional.
2024-05-29 16:45:36 -07:00
evykassirer 26dbb953e0 people: Remove line for type of message that can't exist.
This will help us with a code coverage issue in an upcoming
commit.
2024-05-29 16:45:36 -07:00
evykassirer 854b3868ac message: Remove unused star_status attribute.
Based on git log -S 'starred_status', it’s been unused since
4bf16ca9cc (#22746).
2024-05-29 16:45:36 -07:00
Prakhar Pratyush 1ce7c11705 user_profile: Remove 'onboarding_steps' field.
Removes the 'onboarding_steps' field on 'UserProfile'
model which is no longer used.

It was introduced back in 2013 (b5e22bf), and is no
longer used.

Fixes part of #30043.
2024-05-29 16:12:35 -07:00
Aman Agrawal eada57921e 5xx: Remove css classes and duplicate div tags.
Since this file doesn't link any stylesheet, no CSS is applied to
these classes.

Tested change by pasting the content of it in `link_malformed`
and rendering that template using a malformed email confirmation link.
2024-05-29 09:37:25 -07:00
Aman Agrawal 41df20648d templates: Use the same outer HTML structure.
This will be helpful when refactoring them to use a common template.

No visual changes.

Tested by create email confirmation link and then manipulated it to
get to various states. Force rendered the realm_creation_disabled
template instead of link_malformed template to check it.
2024-05-29 09:37:25 -07:00
Aman Agrawal 0daee09b79 bootstrap_typeahead: Rename parentElement for clarity.
We don't use tippy to position the typeahead if a `parentElement`
is specified. `non_tippy_parent_element` helps us covey that.
2024-05-29 09:35:32 -07:00