Commit Graph

56797 Commits

Author SHA1 Message Date
Anders Kaseorg e46c3bf116 dev-vagrant-docker: Upgrade docker-systemctl-replacement to 1.5.8066.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-04 15:34:10 -05:00
Aman Agrawal a97ac07a13 sponsorship: Add basic plan option for self hosted orgs.
Fixes #29068
2024-03-04 10:01:18 -08:00
Anders Kaseorg aaa6f16538 web: Use Zod z.discriminatedUnion more.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-02 15:39:04 -05:00
Anders Kaseorg a03a26151c onboarding_steps: Depluralize OnboardingStep type name.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-02 15:39:04 -05:00
Anders Kaseorg f39675f061 rows: Make errors fatal in id, local_echo_id.
This lets us simplify their types and remove dead error-handling code.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-02 07:30:44 -08:00
Anders Kaseorg 398c63566e rows: Fix get_message_id type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-02 03:50:11 -05:00
Anders Kaseorg 6f50ed4ca3 user_status_ui: Fix input_field() type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-02 03:48:26 -05:00
Varun Singh bda6470951 user_status_ui: Convert module to TypeScript. 2024-03-01 18:02:20 -08:00
Varun Singh 063287d459 user_status_ui: Extract repetitive conditional logic into a function.
The function 'emoji_status_fields_changed' separates the conditional
logic into two parts. Now, we compare 'selected_emoji_info' and
'old_emoji_info' only when both of them have the fields necessary for
comparison.This helps with upcoming type inference and we no longer have
to write same conditional logic twice.
2024-03-01 18:02:20 -08:00
Varun Singh 70c14d0d3f user_status_ui: Refractor to satisfy '.trim()' function.
'.val()' function returns 'string','string[]' and 'number' type
whereas '.trim()' only accepts a 'string' type argument.
2024-03-01 18:02:20 -08:00
Varun Singh da18350b5b user_status_ui: Replace logical OR with null coalescing operator.
While || targets null, undefined, false, NaN, 0, -0, 0n, "",
and document.all, ??(null coalescing) specifically targets
null and undefined,which we are looking for here.
2024-03-01 18:02:20 -08:00
Varun Singh 0a7bdfaa1c user_status_ui: Add missing argument. 2024-03-01 18:02:20 -08:00
Anders Kaseorg 066ea3ebf9 install: Support Ubuntu 24.04.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 17:38:08 -08:00
Anders Kaseorg 59b0548433 timezone: Only look up canonical time zones from the system.
Legacy time zone aliases were removed from the Debian tzdata package
in tzdata 2023c-8.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040997

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 17:38:08 -08:00
Anders Kaseorg 119900120e requirements: Patch pip 20 to run on Python 3.12.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 17:38:08 -08:00
Anders Kaseorg 55954c9819 build-pgroonga: Upgrade PGroonga from 3.1.0 to 3.1.8.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 17:38:08 -08:00
Tim Abbott c1269f1038 docs: Better document backup/export tool tradeoffs.
- More consistent export/import vs backup bullets at the top.

- Remove misleading documentation regarding the `zulip_org_id` reuse
  problems. This documentation was written for Zulip 2.1.0 in
  c6fe6cf0a4 and largely made obsolete
  in d800ac33a0 (Zulip 5.0).

- Light editing for readability/crispness.

Fixes #28925.
2024-03-01 16:17:20 -08:00
nimishmedatwal 3d30fcd10a onboarding: Improve placeholder message for dm with yourself.
Fixes #29078
2024-03-01 16:09:54 -08:00
evykassirer c60cc07605 drafts: Convert module to typescript. 2024-03-01 15:49:53 -08:00
evykassirer e26b4bbd3e drafts: Reimplement handlers for buggy drafts using zod. 2024-03-01 15:49:53 -08:00
evykassirer bd4da24086 drafts: Create formatted draft all at once.
Instead of partially creating it and then adding
more attributes, this commit creates the return
value (formatted draft) in a single assignment.
This is needed for typescript work, in an upcoming
commit.
2024-03-01 15:49:53 -08:00
evykassirer e8d5241c0d drafts: Return updatedAt timestamp in snapshot_message.
It was always being set after the fact, and it will
be easier to manage types for the conversion to
Typescript if we just set this when setting the
rest of the data for the draft message.
2024-03-01 15:49:53 -08:00
evykassirer 97c46a7375 stream_data: Allow undefined stream_id in get_color.
Sometimes get_color is called with undefined
stream ids. This change makes more clear
what was already happening, and allows
for smoother conversion of other files
to typescript, including an upcoming
conversion of the drafts module, which
can call `get_color` with a draft with
undefined stream_id.

This keeps the color logic contained in
the `get_color` function, which seems
cleaner than the alternative of exporting
DEFAULT_COLOR to be used wherever sream_id
might be undefined.
2024-03-01 15:49:53 -08:00
evykassirer 8784fd9944 drafts: Remove unused localstorage version.
It's been present since 1929cc5 and clearly is intended
to be part of a never-implemented format conversion
system. We can add a version if/when we actually need
such a feature.
2024-03-01 15:49:53 -08:00
evykassirer 34b6be668e util: Add test coverage for lower_same. 2024-03-01 15:49:53 -08:00
Tim Abbott 1efe8ba74b team: Link to page explaining methodology. 2024-03-01 14:57:46 -08:00
Tim Abbott 3c708edb2c team: Add more repositories and rename tabs.
Based on an audit of all repositories in the zulip organization.
2024-03-01 14:57:46 -08:00
Lauryn Menard 666041e480 remote-support: Show deactivated servers in search results.
The remote support view now returns results for deactivated remote
servers with those results sorted to the end and formatted to
visually stand out.

Forms to change sponsorship and discount fields on the customer
for the remote server or realm are not shown, but the data stored
on the customer object is shown, including any sponsorship request
information (if the customer had a sponsorship request pending when
it was deactivated).

Forms to schedule a plan are also not shown for deactivated servers
and their associated remote realms.

Forms and information for any current plan or scheduled plan, for
either the deactivated remote server or its associated remote
realms, are shown so that support staff can update those plans if
necessary.
2024-03-01 14:11:19 -08:00
Prakhar Pratyush a513489f38 corporate: Fix invoicing of plans on free-trial with changed schedule.
Earlier, the 'next_invoice_date', 'invoiced_through', and
'invoicing_status' fields in 'do_change_schedule_after_free_trial'
were not set correctly.

It resulted in invoicing the ENDED plan and the ledger we create
in this function.

Multiple invoices were created depending on the number of times the
billing frequency was changed for customers who started free-trial
& changed their billing frequency.

This commit sets those fields correctly leading to create only one
invoice.
2024-03-01 10:47:55 -08:00
Alex Vandiver 3480d204de reload-clients: Log how many reload events were actually sent. 2024-03-01 09:31:20 -08:00
Alex Vandiver 2d59e07e58 reload-clients: Only sleep between batches.
This avoids an unnecessary sleep at the end of all of the Tornado
shards.
2024-03-01 09:31:20 -08:00
Lauryn Menard 26e305e27d remote-support: Show remote realm matches if deactivated.
As a follow-up to commit d66b7ad853, where we send internal emails
when an active paid plan is on a locally deleted remote realm, we
need search queries in the remote support view to return results
for these deactivated remote realms, instead of excluding them.
2024-03-01 09:30:31 -08:00
Anders Kaseorg 7b1bb984b3 ruff: Fix RUF022 `__all__` is not sorted.
This is a preview rule, not yet enabled by default.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 09:30:04 -08:00
Anders Kaseorg dbb20d636d ruff: Fix E721 Use `is` and `is not` for type comparisons.
This is a preview rule, not yet enabled by default.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 09:30:04 -08:00
Anders Kaseorg 0e71f52e86 ruff: Fix E203 Whitespace before ','
This is a preview rule, not yet enabled by default.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 09:30:04 -08:00
Anders Kaseorg 869d9d9a79 ruff: Fix RUF025 Unnecessary dict comprehension for iterable.
This is a preview rule, not yet enabled by default.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 09:30:04 -08:00
Anders Kaseorg 3b114c516c ruff: Fix PLR2044 Line with empty comment.
This is a preview rule, not yet enabled by default.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 09:30:04 -08:00
Anders Kaseorg 87992b8b29 ruff: Fix PERF403 Use a dictionary comprehension instead of a for-loop.
This is a preview rule, not yet enabled by default.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 09:30:04 -08:00
Anders Kaseorg 82a9fd927b ruff: Fix E226 Missing whitespace around arithmetic operator.
This is a preview rule, not yet enabled by default.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 09:30:04 -08:00
Anders Kaseorg d748ec8d52 ruff: Fix PLW0108 Lambda may be unnecessary.
This is a preview rule, not yet enabled by default.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 09:30:04 -08:00
Anders Kaseorg 553f268b04 ruff: Fix RUF027 Possible f-string without an `f` prefix.
This is a preview rule, not yet enabled by default.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 09:30:04 -08:00
Anders Kaseorg 865febb307 ruff: Fix RUF021 Parenthesize when chaining `and` and `or` together.
This is a preview rule, not yet enabled by default.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 09:30:04 -08:00
Anders Kaseorg f618971668 ruff: Enable more rules.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 09:27:48 -08:00
Anders Kaseorg 2655fe7182 ruff: Fix TCH005 Found empty type-checking block.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 09:27:48 -08:00
Tim Abbott c0e88ad0ea docs: Fix broken Markdown links from recent reorganization.
Introduced in 2b95068406.
2024-02-29 18:11:55 -08:00
Anders Kaseorg 13115c8180 Revert "copy_and_paste: Fix formatting of code pasted from VS Code."
This reverts commit 4a1423b34a.
2024-02-29 20:44:43 -05:00
Anders Kaseorg 570f3dd447 python: Reformat with Ruff formatter.
https://docs.astral.sh/ruff/formatter/

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-29 17:07:16 -08:00
Anders Kaseorg c85b2edbd4 requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-29 16:24:43 -08:00
Aman Agrawal c6d0a3c098 apps: Minor tweaks to apps page.
Co-authored-by: Alya Abbott <alya@zulip.com>
2024-02-29 16:18:12 -08:00
David Rosa 3fda29afad help: Document "Zulip update announcements" setting.
Documents the new organization setting for posting Zulip updates.

See #28604.
2024-02-29 15:17:32 -08:00