Commit Graph

56565 Commits

Author SHA1 Message Date
Aman Agrawal 949379581e billing: Add separate entry point for billing login pages.
We just exclude upgrade.ts from the imports to avoid page_params
being imported which results in an error.

s
2024-02-20 11:51:32 -08:00
shashank-23002 5803d4afec clipboard: Align click to copy button inside spoiler tag.
Fixes: #20712
2024-02-20 10:18:43 -08:00
Aman Agrawal 0c6dfd1e5e message_actions_popover: Select message being moved.
This helps keep the content of this message in the move messages
modal relevant.
2024-02-20 09:29:26 -08:00
Aman Agrawal 4d1bb762be css: Add 25px to content width on right for chevron-down icon.
This fixes chevron-down icon overlapping with content when content
occupies full width of the select element.
2024-02-20 09:29:26 -08:00
Varun Singh c91ca3eca8 message_live_update: Convert module to TypeScript. 2024-02-20 08:30:04 -08:00
Varun Singh 5fd6a819d4 message_lists: Add 'rerender_messages' function to type. 2024-02-20 08:30:04 -08:00
Varun Singh d432b5e36a message_lists: Add 'rerender_view' function to type. 2024-02-20 08:30:04 -08:00
Prakhar Pratyush a20ce627d9 stripe: Add a check to create invoices only for paid plans.
In 'invoice_plan()', the primary way to not create
an invoice for a plan is to not have any new ledger entry.

This commit adds a 'self.on_paid_plan()' check which is
an extra layer of defense to avoid creating any invoices
for customers not on paid plan. It saves a DB query too.
2024-02-20 08:25:49 -08:00
evykassirer 23795ca153 message_edit_history: Convert module to typescript. 2024-02-19 21:39:40 -08:00
evykassirer a8be874f70 state_data: Add realm_allow_edit_history. 2024-02-19 21:39:40 -08:00
Mateusz Mandera 616527e73e zilencer: Exclude realm_locally_deleted in get_human_user_realm_uuids.
Just like deactivated realms should be excluded, so should locally
deleted realms.

In particular, failure to exclude locally deleted realms breaks
handle_customer_migration_from_server_to_realms.
2024-02-19 20:27:24 -08:00
Mateusz Mandera be03dabf76 zilencer: Implement do_reactivate_remote_server utility function.
The inverse of do_deactivate_remote_server. It's just flipping the
.deactivated flag, but we also should have an AuditLog for these events.
2024-02-19 20:26:47 -08:00
Anders Kaseorg cc8a4636ba namespace: Prevent direct mutation of ES modules in tests.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-19 21:20:35 -05:00
Anders Kaseorg 10892f1d60 tests: Fix direct mutation of ES modules again, again.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-19 21:20:35 -05:00
Karl Stolley 29dd61c20c bootstrap: Remove pre styles.
Happily, every last CSS property in these styles is already
described for the places <pre> appears in the Zulip UI:

1. In rendered message markdown
2. In the compose preview
3. In the information overlay (Message formatting)
2024-02-19 18:15:26 -08:00
Tim Abbott 2e1ed4431a corporate: Fix plan precedence issues with expired plans.
RemoteRealm customer takes precedence over RemoteServer
in general. But if an inactive plan is associated with
RemoteRealm and an active plan with RemoteServer, the
ACTIVE plan takes precendence.

Co-authored-by: Prakhar Pratyush <prakhar@zulip.com>
2024-02-19 17:58:49 -08:00
Anders Kaseorg 2c799125ea bundles: Remove unnecessary imports of effect-free modules.
Some of these may have once been necessary to enforce an ordering on
cyclic imports, but we’ve fixed all of those now.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-19 17:55:40 -08:00
Karl Stolley 384e28c8e2 bootstrap: Remove li style.
The `line-height` value is set to `inherit` in zulip.css, rendering
this line moot. `inherit` will always force list items to take
their line height from the nearest ancestor that sets one.
2024-02-19 17:53:50 -08:00
Karl Stolley 6073507230 bootstrap: Remove q styles.
There is no evidence of the <q> (quote) element in use in the
Zulip UI, nor that any of the Python-Markdown syntax generates them
either.
2024-02-19 17:51:10 -08:00
Anders Kaseorg 976987f9a3 webpack: Remove extraneous inclusions of page_params.
Commit a4938d3760 (#28971) fixed the
order-sensitivity of these modules, so it suffices to just import them
where they are used.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-19 15:10:02 -05:00
Aman Agrawal f6b1fe9f36 billing: Remove unused page_params on event_status page.
a4938d3760 introduced assertions
for page_params for which they were used. This caused the
assertion to fail on event_status page making the page not work.
Removed the page_params from running on event_status page to fix it.
2024-02-19 08:41:34 -08:00
Anders Kaseorg e568064f4e page_params: Set and expect state_data = null for spectators.
Fix a ZodError when spectators load the app, introduced by commit
a4938d3760 (#28971).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-19 03:03:58 -05:00
Anders Kaseorg a5c055ae82 state_data: Rename Term type to NarrowTerm.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-17 00:02:38 -08:00
Anders Kaseorg a4938d3760 page_params: Parse page_params and state_data with Zod.
This establishes a runtime check that their types continue to reflect
reality going forward.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-17 00:02:38 -08:00
Alya Abbott 4f1659fe8f billing: Make push notifications error message more clear. 2024-02-16 16:01:53 -08:00
Anders Kaseorg 273453d285 lint: Remove .lock extension from frontend group.
Commit 3a27b12a7d (#24731) migrated
yarn.lock to pnpm-lock.yaml.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-16 18:50:17 -05:00
Sayyed Arib Hussain 8e39123839 message_view_header: Manage no description in message_view_header.
This commit modifies the behavior of the message view header
when a stream's description is empty. Previously, it displayed
"(no description)". With this change, if the user is an admin
or owner (i.e., has permission to update the description), it
will now display a "Add description" link to the settings. If
the user does not have these permissions, it will display nothing.

Fixes #28851

Signed-off-by: Sayyed Arib Hussain <sayyedaribhussain4321@gmail.com>
2024-02-16 15:41:27 -08:00
Tim Abbott 2a59edda53 version: Update version and changelog following 8.2 release. 2024-02-16 15:31:54 -08:00
Anders Kaseorg ac68996ac3 sentry: Avoid early reads from state data.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-16 15:12:42 -08:00
Aman Agrawal 176c15f74b billing: Redirect user to login page if session expires.
If user makes an AJAX request but their session is expired, we
redirect user to the login page.
2024-02-16 14:56:26 -08:00
Aman Agrawal 98868b7f4a billing: Take user to default page if next_page is invalid.
Here invalid is more or less uncommon since there are a lot of
next_page that are valid for a logged in user.
2024-02-16 14:56:26 -08:00
Lauryn Menard 0c17b90fc5 remote-support: Fix last push notification sent field.
Instead of displaying the end of the day interval for the latest
count stat update for push notifications forwarded on the bouncer,
we display the start of the day interval and format it as a date
instead of a date and time.
2024-02-16 14:49:34 -08:00
Lauryn Menard 05b5295f18 remote-activity: Fix broken support links.
In commit 230294c, the logic for creating the support links in the
remote activity chart were broken. Updates the constants so that
the links have the correct server information for the search query.
2024-02-16 14:49:34 -08:00
Prakhar Pratyush d05a3f0cb0 corporate: Send invoice overdue mail also when data never uploaded.
Earlier, during invoicing we used to send a mail to
sales@zulip.com when the last_audit_log_update was
at least one day ago.

There was an assertion that last_audit_log_update
can't be None which is incorrect as such customers exist.

This commit extends the behaviour to send an invoice
overdue email even if the data was never uploaded.
2024-02-16 14:48:31 -08:00
Lauryn Menard 9c7d0c6e5a remote-support: Note if emails were sent for remote server sponsorship.
In cases where a support admin approves a sponsorship for a remote
server without any billing users having been created, note that no
emails were sent in the success message on the support page.

We already do this for remote realms and should be an infrequent
case as ideally most remote servers will submit official
sponsorship requests.
2024-02-16 14:46:59 -08:00
Anders Kaseorg a68c96231f stats: Fix types for upload_space_used, guest_users parameters.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-16 17:39:45 -05:00
Anders Kaseorg b5702422ed page_params: Remove max_message_id from type.
As of commit fd2ad130f9 (#28930) this is
popped in ui_init.initialize_everything now.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-16 17:35:11 -05:00
Sujal Shah c1b749cc0f
docs: Update markdown.js to markdown.ts.
This was missed when it was converted to TypeScript.
2024-02-16 14:22:01 -08:00
Prakhar Pratyush 9648256c3c corporate: Fix next_invoice_date not updated on end_date extension.
Earlier, on extending end_date for legacy plans, next_invoice_date
was not extended which resulted in invoice_plan() run for such
legacy plans before the end_date.

The intended behaviour is that the legacy plan should be invoiced
only once on the end_date to downgrade or switch to a new tier.

This commit adds logic to update next_invoice_date when end_date
is extended via /support.
2024-02-16 08:30:17 -08:00
Sohaib-Ahmed21 d2bc94a724 invitations: Improve text in resend confirmation modal.
Importantly, this clarifies that this is useless for expired invites.

Fixes: #28829
2024-02-15 17:31:31 -08:00
Pratik 4f89a0f605 user_profile: Add "copy link to profile" button in user_profile_modal.
This commit adds a "copy link to profile" button in user_profile_modal.
Clicking on this button copies the user's profile link and displays a
"Copied!" tooltip.
2024-02-15 17:17:38 -08:00
Pratik cad051e5a6 user_profile: Enable dynamic URL generation for "View profile" option.
Clicking on "View profile" option now dynamically generates a URL,
allowing the user profile modal to open. Upon closing the modal,
the URL is reverted back to one that was active before the modal
was opened.

Additionally, It displays a profile access error modal when a user
attempts to either view an inaccessible profile or when an invalid
user id is present in the URL.

Fixes #28445.
2024-02-15 17:17:38 -08:00
Tim Abbott 76e86bc8fa team: Update for zulip-android-legacy repository rename. 2024-02-15 16:52:23 -08:00
afeefuddin a41c39db26 portico-team: Rework repository on team page
Fixes: #28504
2024-02-15 16:52:23 -08:00
Aman Agrawal 16868c39a5 navbar: Restructure navbar items. 2024-02-15 16:18:34 -08:00
sayyedarib 5c993f0479 direct_message: Allow DMs to bots and self regardless of policy.
Previously, in DM disabled org messaging to bot was not working when
starting new conversation and adding bot as recipient because of not
updating on recipient change. And secondly, self messaging was not
allowed.
This commit ensures that the DM to bot and self are allowed irrespective
of dm restrictions.

tests: Verify DMs adhere to DM restriction policy.

Fixes #28412

Signed-off-by: sayyedarib <sayyedaribhussain4321@gmail.com>
2024-02-15 16:13:36 -08:00
Karl Stolley 22b4ec09fa css: Extract CSS variables into own file. 2024-02-15 15:50:25 -08:00
Alex Vandiver ec6f64f7b0 tornado: Perform rolling client restarts after servers are restarted.
Decouple the sending of client restart events from the restarting of
the servers.  Restarts use the new Tornado restart-clients endpoint to
inject "restart" events into queues of clients which were loaded from
the previous Tornado process.  The rate is controlled by the
`application_server.client_restart_rate`, in clients per minute, or a
flag to `restart-clients` which overrides it.  Note that a web client
will also spread its restart over 5 minutes, so artificially-slow
client restarts are generally not very necessary.

Restarts of clients are deferred to until after post-deploy hooks are
run, such that the pre- and post- deploy hooks are around the actual
server restarts, even if pushing restart events to clients takes
significant time.
2024-02-15 15:42:50 -08:00
Alex Vandiver 27d53ecbe1 restart-server: Remove --skip-tornado flag.
This flag was generally used not because we wanted to avoid
restarting Tornado, but because we wanted to avoid increasing load
the server when all of the clients were told to reload.

Since we have laid the groundwork for separately telling Tornado to
tell clients to restart, we remove the --skip-tornado flag; the next
commit will add the ability to skip client restarts.
2024-02-15 15:42:50 -08:00
Alex Vandiver 0079688c49 tornado: Drop WebReloadClientError logic.
The widening of the time between when a process is marked for
reload (at Tornado startup) and when it sends reload events makes it
unlikely-to-impossible that a single `/` request will span both of
them, and thus hit the WebReloadClientError corner case.

Remove it, as it is not worth the complication.  The bad behaviour it
is attempting to prevent (of a reload right after opening `/`) was
always still possible  -- if the `/` request completed right before
Tornado restarted -- so it is not clear that it was ever worth the
complication.
2024-02-15 15:42:50 -08:00