Commit Graph

54518 Commits

Author SHA1 Message Date
Aman Agrawal 3adddaa643 billing: Move next payment info below card details. 2023-11-10 05:17:52 +05:30
Aman Agrawal 68a117d490 billing: Modify next payment info. 2023-11-10 05:17:52 +05:30
Aman Agrawal e72df84396 billing: Change formatting for showing card info. 2023-11-10 05:17:52 +05:30
Aman Agrawal ebc7cbaf39 billing: Reformat structure of HTML to update licenses manually.
This inclues a major change to allow users to update number of
licenses in the current billing period.
2023-11-10 05:17:52 +05:30
Aman Agrawal 3ad2cb8c9c billing: Show automatic license count in new style. 2023-11-10 05:17:52 +05:30
Aman Agrawal 2f532e49d1 billing: Add field to show billing frequency. 2023-11-10 05:17:52 +05:30
Aman Agrawal c41a8317cf billing: Convert plan name to new style. 2023-11-10 05:17:52 +05:30
Aman Agrawal 89003dcb25 billing: Remove tabs. 2023-11-10 05:17:52 +05:30
Aman Agrawal 5b97eb0445 billing: Modify title. 2023-11-10 05:17:52 +05:30
Aman Agrawal b5b7fc9957 billing: Use navbar used in login/help pages. 2023-11-10 05:17:52 +05:30
Alex Vandiver 7c8eacfa12 queue: Increase paging thresholds for deferred_work queue.
This queue is used to things which definitionally may take longer than
a request, so paging after 60s is rather aggressive.  This is
especially true because this queue has a very long tail of very slow
tasks -- p99 of task time in this queue is 8.5s, while p99.9 is 197s.

Raise the paging threshold to 15 minutes.  While there are
semi-user-facing tasks which use this queue (primarily marking
messages as read), those being delayed for minutes is already a real
possibility if they are stuck behind a large realm export -- and this
is not a situation which should necessarily page, since it is not
solvable by the administrator.
2023-11-09 13:51:00 -08:00
Tim Abbott 6af9a91b9d docs: Improve billing testing docs.
You don't need to run any other test suites for this, so this should
be a lot faster.
2023-11-09 12:04:14 -08:00
Lauryn Menard 6a53005074 corporate: Update generated stripe fixtures for test_stripe.
Generated with both parellel=1 and generate-stripe-fixtures params
on test-backend locally.

Note that the previous series of commits need these test fixtures
to pass CI. If those are changed, then this commit should be updated
or dropped and replaced with a commit that updates the fixtures
based on the new changes.
2023-11-09 12:03:33 -08:00
Lauryn Menard 717d40475e corporate: Use the stripe checkout session metadata for free trials.
Instead of using the data from the stripe.SetupIntent for processing
an initial upgrade for the free trial session types, use the metadata
from the stripe.checkout.Session that was returned.

The metadata is the same for both the checkout session and the setup
intent.
2023-11-09 12:03:33 -08:00
Lauryn Menard c09bfc136e corporate: Update generate stripe fixtures to not use test cc numbers.
Updates generate stripe fixtures to use test credit card strings from
Stripe, instead of creating fake stripe.PaymentMethods for the tests
with the test credit card numbers provided by Stripe.
2023-11-09 12:03:33 -08:00
Lauryn Menard 1f28837bd7 corporate: Update create_stripe_customer to not attach payment method.
According to stripe's documentation for attaching payment methods to
customers (see https://stripe.com/docs/api/payment_methods/attach),
payment methods should be attached to customers through a SetupIntent
or PaymentIntent, which is what we do as we process new customers
and accounts.

Updates create_stripe_customer so that it is clear that the payment
method should not be added when we directly create a new  stripe
customer.
2023-11-09 12:03:33 -08:00
Lauryn Menard 4dd6f105a0 coporate: Change statement descriptor for Zulip Cloud Credit.
There is a 22 char limit on the stripe.Invoice.statement_descriptor
field. The current value for that field in this error case, "Zulip
Cloud Standard Credit" is 27 chars.

Updates the value for this error case to be "Cloud Standard Credit".
2023-11-09 12:03:33 -08:00
Aman Agrawal 757675db80 rows: Use message under / next to sticky header for narrowing / info.
Fixes #27489

For sticky message headers, we should not use the `first_message_in_group`
for narrowing to the topic since can be out of view for the user.
2023-11-09 10:04:58 -08:00
David Rosa 6fb1af00f1 help: Document "Load more" recent conversations.
Adds a new section with a short intro and instructions that explain
how to load more conversations.

Fixes #27253.
2023-11-09 06:36:10 -08:00
Anders Kaseorg cc1e6c3e4b emoji_names: Rebuild with CLDR 44.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-09 06:35:26 -08:00
Anders Kaseorg dadf035366 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-08 16:11:15 -08:00
Anders Kaseorg 9b83dc1b79 stylelint: Fix declaration-block-no-redundant-longhand-properties.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-08 16:11:15 -08:00
Anders Kaseorg dcdbb39c31 install-node: Upgrade Node.js from 18.18.0 to 20.9.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-08 16:11:15 -08:00
Mateusz Mandera 1312c7ccd7 zilencer: Add mechanism to update RemoteRealm when Realm is changed.
This requires a migration to allow RemoteRealmAuditLog.remote_id to be
NULL, and to add a RemoteRealmAuditLog.remote_realm.
2023-11-08 15:54:22 -08:00
Mateusz Mandera 76e0511481 zilencer: Add new model RemoteRealm and send the data to the bouncer.
Add the new model for recording basic information about Realms on remote
server, to go with the other analytics data. Also adds necessary changes
to the bouncer endpoint and the send_analytics_to_push_bouncer()
function to submit such Realm information.
2023-11-08 15:54:22 -08:00
Lauryn Menard e72a9fb814 docs: Update API and contributor documentation for new macro.
Updates API and contributor documentation for writing integrations
for the new `generate-integration-url.md` macro. Removes all
refrences to `create-bot-construct-url.md`, which was removed in
the previous commit.
2023-11-08 14:19:05 -08:00
Tim Abbott 0d525cf644 integrations: Recommend new integration URL tool.
Fixes part of #25976.
2023-11-08 14:19:05 -08:00
David Rosa 0c4ef58acd help: Document new help menu.
Updates help center docs to reflect the new dedicated help menu.

- Adds `keyboard_tip` to document the `?` keyboard shortcut.

Fixes #27384.
2023-11-08 14:17:13 -08:00
roanster007 273081d0a6 lightbox_view: Fix media title update on change in title.
Presently in a session when an image or video title is updated,
the same change is not reflected in the lightbox view of
them, until a new session is made.

This is because the metadata of the media is stored in Map
for the session with the preview_src as keys, and hence,
when title is changed the preview_src being same, the title
change is not reflected inside lightbox view.

This is fixed by modifing the asset_map (cache map) keys
from preview_src to an array of preview_src, and the media
title. Hence, when title is modified now, the keys won't map
to the existing value, and hence new metadata would be
shown.
A new function get_asset_map_key_for_media() introduced
to get the corresponing metadata from this asset_map
by passing in the prview_src and media elements.

Fixes #21311
2023-11-08 14:10:51 -08:00
Karl Stolley e8fe6f873e left_sidebar: Register mark-all-read handlers on all home views. 2023-11-08 14:04:58 -08:00
Alex Vandiver fb80ecd9c3 upgrade-zulip: Defer cache-filling to just outside the critical period.
Filling caches needs to happen close to when the server is restarted,
as the gap opens us up to race conditions with user modifications.  If
there are migrations, however, it must happen within the critical
period after the migrations are applied.

Move the call to fill the caches to within the `shutdown_server`
function, so that we push it as close to the server shutdown as
possible.
2023-11-08 11:00:00 -08:00
Alex Vandiver acb4e9e783 cache_helpers: Show item and DB query counts. 2023-11-08 11:00:00 -08:00
Aman Agrawal f6516cba89 personal_menu: Add opacity hover effect on clear status button. 2023-11-08 10:19:24 -08:00
Aman Agrawal 66276d88ef personal_menu: Add different colors for status text. 2023-11-08 10:19:24 -08:00
Tim Abbott 807de37561 analytics: Fix misplaced zilencer import statement. 2023-11-08 10:00:13 -08:00
N-Shar-ma eca6738b00 compose: Always retain link formatting when pasting just a link.
We add anchors to the list of enclosing elements we don't strip away.
2023-11-08 09:51:33 -08:00
roanster007 dc492867af user_mention: Fix mentions of deactivated users.
Previously, when a deactivated user was mentioned, he wasn't
rendered as a Pill. This is because the dataset for validating mentions
only included active users, which is fixed by removing that filter.

To allow only silent mentions of them, an extra is_active property
added to FullNameInfo class, which is populated from the query,
which tells if user is deactivated. This is used to convert any
mentions of them to silent mentions in the backend markdown.

Fixes #26857
2023-11-08 09:48:31 -08:00
evykassirer c3bee2038a message edit: Use a default error message for failed edits.
Bug reported here:
https://chat.zulip.org/#narrow/stream/464-kandra-js-errors/topic/Error.3A.20The.20partial.20.40partial-block.20could.20not.20be.20found/near/1673466

The reported issue was for a message edit request, and it was
happening because `channel.xhr_error_message` can return the
empty string sometimes, and `render_compose_banner` shows the
banner text if it exists and otherwise tries to render a
`@partial-block`. Unfortunately the empty string acts as falsy
in the template, leading to the partial block error.

This commit adds a default error message that was removed
in 96680e95fb.

It also adds a check to not show an error banner at all if
`readyState` is 0, which means the request was cancelled.
2023-11-08 09:47:32 -08:00
Mateusz Mandera 3cafdbdc1e counts: Add function compute_max_monthly_messages for remote servers.
This calculates the largest amount of messages sent within a month for
the last 3 months. The query is targeted for the specific use-case in
this function - for finding the count for a specific server. For
calculating this in bulk for a large number of remote server an
adapted, bulk query will be needed - rather than running this one in a
loop, which would likely be very inefficient.
2023-11-08 09:45:49 -08:00
Sahil Batra 617d2d509c users: Update format_user_row to return a TypedDict.
This commit updates format_user_row to return a TypedDict.

This commit is a prep commit for feature of restricting user
access such that code can be easy to read and understand when
we add that feature.
2023-11-08 09:22:26 -08:00
Sahil Batra 2ab71fb67d users: Update user_profile_to_user_row to return a TypedDict.
This commit updates user_profile_to_user_row to return a TypedDict
and also updates the return type of get_realm_user_dicts to be a
TypedDict.

This commit is a prep commit for feature of restricting user
access such that code can be easy to read and understand when
we add that feature.
2023-11-08 09:22:26 -08:00
Sahil Batra deb8431a47 users: Rename get_raw_user_data to get_users_for_api.
This is a prep commit for adding feature of restricting
user access to guests such that we can keep the code
easy to read and understand when that feature is added.
2023-11-08 09:22:26 -08:00
David Rosa a568f0cf16 help: Document deleting multiple drafts via checkboxes.
- Splits section for deleting drafts into deleting a single draft
  and deleting multiple drafts via checkboxes to document new
  feature.

Fixes #26888.
2023-11-08 09:18:12 -08:00
Aman Agrawal 3a7ce432e5 popovers: Fix topic visibility popover in sticky header not working.
The popover didn't open since sticky_header is part of message feed
and we were hiding popovers if `elements_at_reference_position`
had `sticky_header`. Now, we just don't do that check if the
reference is part of sticky_header.
2023-11-08 09:17:25 -08:00
ecxtacy f2deb8da46 settings-ui: Change `<select>` style using custom chevron-down icon.
Align the `dropdown-widget` and `<select>` UIs.
Removed default `<select>` tag styles with `appearance: none` css.
Added custom chevron-down icon with `background-image` attribute
to the `<select>` tag.

The svg icon is used in a CSS variable with a data URI.
The CSS variable is used to set different colors for dark and light
theme.

Tweaked by tabbott to scope selectors appropriately and also delete a
10px font-size in one settings dropdown widget.

Fixes #26859.
2023-11-07 16:55:34 -08:00
ecxtacy 0c1f340934 settings-ui: Replace chevron-down fa-icon with svg icon.
Fixes part of #26859.
2023-11-07 16:55:34 -08:00
ecxtacy 952c5e1865 icons: Add chevron-down svg icon for dropdowns. 2023-11-07 16:55:34 -08:00
Greg Price 7a0ebc0d18 push_notifs: Log an error if ios_app_id missing on any APNs token. 2023-11-07 16:19:42 -08:00
Greg Price f109e3b598 push_notifs: Backfill ios_app_id on bouncer. 2023-11-07 16:19:42 -08:00
Greg Price 052eddbac8 push_notifs: Drop illusory ios_app_id param on unregister at bouncer.
This parameter appeared here on the function definition,
but because it lacked a `REQ` call it didn't actually connect
to any parameter passed in the HTTP request.

It doesn't make any sense on this endpoint anyway -- presumably
it was copy-pasted from its "register" counterpart -- so just cut it.
2023-11-07 16:19:42 -08:00