Commit Graph

60741 Commits

Author SHA1 Message Date
Varun Singh 7302499485 message_list_hover: Convert module to TypeScript. 2024-09-20 18:24:49 -07:00
Varun Singh afa741f248 message_list_hover: Replace use of non-existent `status_message` field.
The `Message` object does not contain any `status_message` field.
We instead use boolean state `is_me_message`.
2024-09-20 18:24:46 -07:00
Aman Agrawal cbb73bc82f accounts_accept_terms: Check if imported user wants marketing emails. 2024-09-20 18:17:53 -07:00
Anders Kaseorg d18959b1b6 tests: Remove unused sloppy_$ flag.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-20 16:47:12 -07:00
Sayam Samal 9c5978e85b copy: Use redesigned copy button in codeblocks of /help docs.
Fixes #28700.
2024-09-20 15:44:20 -07:00
Sayam Samal 4afdb33906 copy: Use redesigned copy button in bot settings UI.
This commit just replaces the old fa copy icon with the custom Zulip
copy icon. Since all the bot related icons in Personal/Settings/Bots
uses different colors, this commit avoids only changing the copy icon
colors, since that would result in an unintended standout.
2024-09-20 15:44:20 -07:00
Sayam Samal 79e8cb60db copy: Use redesigned copy button in copy invite link alert. 2024-09-20 15:44:20 -07:00
Sayam Samal a743bb0eb6 copy: Use redesigned copy button in rendered codeblocks. 2024-09-20 15:44:20 -07:00
Sayam Samal 6c7b61e6f2 copy: Use redesigned copy button in the About Zulip modal. 2024-09-20 15:44:20 -07:00
Sayam Samal b57a261035 user_profile: Fix faulty custom profile field copy buttons.
This bug was introduced in 7232ff6, which while adding the
copy-to-clipboard support for the custom profile field links, removed
the ClipboardJS reference to the ".copy-custom-field-url" class.
2024-09-20 15:44:20 -07:00
Sayam Samal a74aaca8fc copy: Use redesigned copy button in user profile modal. 2024-09-20 15:44:20 -07:00
Sayam Samal 2e4e017a18 copy: Use redesigned copy button in view original message UI.
This commit also updates the copy icon in the related /help docs.
2024-09-20 15:44:20 -07:00
Sayam Samal a95c6a610e copy: Indicate successful copy by displaying a check icon momentarily. 2024-09-20 15:44:20 -07:00
Sayam Samal 3f79af12ac copy: Redesign copy button in user card popover.
This commit serves as the base for standardizing the look and feel of
the copy button throughout the UI.

Changes:
    - Replaces the old fa-copy icon with the new Zulip custom copy icon.
    - Standardizes the hover/active states for interactivity.
    - Defines two variants of the copy button, one which is just the
      icon and the other which is squared off like a traditional button.
    - Removes the `.popover-menu-icon` classes from the copy buttons,
      as that class is made to be used with popover menu option icons.
2024-09-20 15:44:20 -07:00
Alex Vandiver e125ad823d exports: Add a separate bucket for realm exports.
This allows finer-grained access control and auditing.  The links
generated also expire after one week, and the suggested configuration
is that the underlying data does as well.

Co-authored-by: Prakhar Pratyush <prakhar@zulip.com>
2024-09-20 15:43:49 -07:00
Alex Vandiver c1e8ecd08f uploads: Cache boto client in the module and be writable.
The `get_signed_upload_url` code is called for every S3 file serve
request, and is thus in the hot path.  The boto3 client caching
optimization is thus potentially useful as a performance optimization.
2024-09-20 15:43:49 -07:00
Alex Vandiver 1a7b3ef7ed upload: Use get_export_tarball_url in upload_export_tarball. 2024-09-20 15:43:49 -07:00
Alex Vandiver 4cf835d9dd upload: Remove common cache from get_export_tarball_url.
This is not called in the hot path like get_avatar_url is.
2024-09-20 15:43:49 -07:00
Alex Vandiver a5bf452202 upload: Realm is not Optional in upload_export_tarball.
af4eb8c0d5 marked the base class and local backend as non-Optional,
but left the S3 backend as Optional for some reason.

Remove it.
2024-09-20 15:43:49 -07:00
Alex Vandiver 91ac5c3c8b export: Log before the compression step, which can be slow. 2024-09-20 15:43:49 -07:00
Pratik Chanda 41cd04a071 composebox_typeahead: Remove own user suggestion if recipients present.
Earlier, in compose recipient, if user adds own user pill in recipient,
DM message list would fade even though it was the correct view.

This commit prevents user from adding own user pill in DM recipient if
other recipients are already added.

Fixes: zulip#31629.
2024-09-20 15:31:09 -07:00
Pratik Chanda bc623369c3 compose_recipient: Remove own user pill if other recipients are added.
This commit removes own user pill from recipient box if other
recipients are added.

Fixes part of zulip#31629.
2024-09-20 15:31:09 -07:00
Alya Abbott 8230f394fb help: Use better example subdomain in inviting users instructions. 2024-09-20 15:30:43 -07:00
Alya Abbott b93a0b3f91 help: Minor tweaks to moving to Zulip guide. 2024-09-20 15:30:43 -07:00
Tim Abbott 51d0dfb504 docs: Tweak some documentation around send_event. 2024-09-20 15:28:18 -07:00
Prakhar Pratyush a7f48e260c docs: Rename 'send_event' to 'send_event_on_commit'.
This commit updates the doc to rename the 'send_event' function
to 'send_ecent_on_commit'.

This is required as we no longer have the send_event function
and we prefer to use 'send_event_on_commit' in most cases and
'send_event_rollback_unsafe' in a few.
2024-09-20 15:20:18 -07:00
Prakhar Pratyush e763d065a3 django_api: Rename 'send_event' to 'send_event_rollback_unsafe'.
This commit renames the 'send_event' function to
'send_event_rollback_unsafe' to reflect the fact that it doesn't
wait for the db transaction (within which it gets called, if any)
to commit and sends event irrespective of commit or rollback.

In most of the cases we don't want to send event in the case of
rollbacks, so the caller should be aware that calling the function
directly is rollback unsafe.
2024-09-20 15:20:18 -07:00
Yaswanth Kosuru 8e71806958 tooltips: Change tooltip for channels subscribe/unsubscribe button.
Previously, the tooltips for the subscribe and unsubscribe buttons
were static, showing the same tooltip regardless of the button's
state. This update improves the user experience by introducing
dynamic tooltips that reflect the current state of the button.

Changes include:
- Added multiple HTML tooltip templates for different button states
  subscribed, unsubscribed.
- Updated JavaScript to select and render the appropriate tooltip based on
  the button's state.
- Modified `data-tool-tip-id` prop to use state-specific tooltip
  templates.

Fixes zulip#31500.
2024-09-20 15:17:31 -07:00
Pratik Chanda 967243b2db composebox_typeahead: Move wildcard string to secondary in @-mention.
Earlier, in typeahead suggestions for wildcard mention, we rendered
wildcard string as primary text inside parentheses.

This commit separates the wildcard string as secondary_text to
be rendered without parentheses using styles like channel description.

Fixes: zulip#31245.
2024-09-20 15:16:21 -07:00
Pratik Chanda c84ff59dc9 composebox_typeahead: Add info field to slash command as secondary text.
Earlier, in typeahead suggestions for slash command, we render
supplementary info as primary text inside parentheses.

This commit separates the supplementary info as secondary text to
be rendered without parentheses using styles like channel description.

Fixes part of zulip#31245.
2024-09-20 15:16:21 -07:00
Pratik Chanda f3432b731f composebox_typeahead: Replace parentheses around pronouns with comma.
Currently, we show pronouns inside parentheses just after name in
@-mention typeaheads.

This commit changes it by removing parentheses and adding comma if
more info is present after pronouns. The pronouns also have the same
styles as that of the user emails.

Fixes part of zulip#31245.
2024-09-20 15:16:21 -07:00
Anders Kaseorg 203315958b test-js-with-node: Keep running after some tests fail.
This lets us collect all failures rather than the first failure in
each process.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-20 15:13:26 -07:00
evykassirer 52440c1cff unread_ops: Convert stream ids to integers before sending request to server.
This bug was introduced in #31299, which replaced the channel name
with a string id. It's still valid to send the channel id to the
server, but it shouldn't be a string, it should be a number.
(See https://zulip.com/api/construct-narrow#channel-and-user-ids)

In the future, we hope to update NarrowTerm to allow for integer
operands for channel terms.
2024-09-20 14:55:50 -07:00
Anders Kaseorg 57c39fc257 stream_data: Simplify ApiGenericStreamSubscription type.
The removed alternative is a subtype of NeverSubscribedStream and thus
already included.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-20 14:46:32 -07:00
Alex Vandiver 86d5ee5bdf tus: Document new API level for TUS endpoints. 2024-09-20 12:16:13 -07:00
Lauryn Menard 4bd4534450 billing: Enforce manual license management for guest role changes.
Adds a check for changing an existing guest user's role before
calling do_update_user in the case that a realm has a current
paid plan with manual license management.
2024-09-20 12:02:39 -07:00
Lauryn Menard 7861c1ba63 billing: Enforce manual billing renewal licenses for new users.
In addition to checking for available licenses in the current
billing period when adding or inviting new non-guest users, for
manual billing, we also verify that the number of licenses set
for the next billing period will be enough when adding/inviting
new users.

Realms that are exempt from license number checks do not have
this restriction applied.

Admins are notified via group direct message when a user fails
to register due to this restriction.
2024-09-20 12:02:39 -07:00
Lauryn Menard 73cb08265c billing: Extract helper for getting manual license management plans.
Prep commit for expanding these checks for the number of licenses
set for the next billing period (renewal licenses) and for changing
guest users' roles.
2024-09-20 12:02:39 -07:00
Lauryn Menard 137f4fccde billing: Highlight manual license management errors for admins.
In the billing portal UI for manual license management, limit
decreasing the number of licenses for the next billing period to
be less than the currently used licenses. If the customer is exempt
from license number checks, then this limit is not applied.

Also, visually highlight manual license management errors so that
the billing admin is aware of potential issues.

As of these changes, current licenses can be under the seat count
when a guest user is changed to a non-guest user. And next billing
period licenses can be under the seat cout when a user joins with a
currently available, purchased license after a billing admin has
decreased the number of licenses set for the next billing period.
2024-09-20 12:02:39 -07:00
Lauryn Menard b02cf53d5e billing: Validate license management at end of billing cycle.
For plans where we're enforcing correct manual license management,
before we create the renewal entry for the licenses ledger at the
end of a billing cycle, we should check that the current count of
billed licenses is not higher than what the renewal license count
would be.

Co-authored-by: Aman Agrawal <amanagr@zulip.com>
2024-09-20 12:02:39 -07:00
Lauryn Menard 900a7fa3ac billing: Remove settings tab from billing urls.
In commit 89003dcb25, we removed the tabs from the billing page.
2024-09-20 12:02:39 -07:00
Aman Agrawal ea4e48afa7 filter: Add function to check if we can show the next unread button.
These function will be used when we add `Next unread conversation`
button below message list.
2024-09-20 11:54:18 -07:00
Aman Agrawal 0fb63eeddf filter: Rename local variable.
`term_types` is consistently used to store return value of
sorted_term_types in the file.
2024-09-20 11:54:18 -07:00
Aman Agrawal 56d4bad92b filter: Fix filter variable not updated as per new terms. 2024-09-20 11:54:18 -07:00
Karl Stolley 3d875bd140 integration_events: Restore checkbox in events modal. 2024-09-20 11:53:01 -07:00
Aman Agrawal a35c8a08de message_edit: Attach keydown to $form instead of textarea.
This allows any event handlers that are attached to textarea
like typeahead to handle the keypress and stop propagation if
they successfully handle it.

This fixes a bug where message edit form gets saved on enter keypress
instead of selecting the active item in the message edit typeahead.

Introduced in 0696e234bd.
2024-09-20 09:50:38 -07:00
Mateusz Mandera 18fbb5d146 retention: Limit number of ids passed to db in delete messages query.
If do_delete_messages (and friends) are called for a massive number of
messages, the giant list of message ids is passed to Postgres even
though chunk_size makes all but the first chunk_size of message ids
useless.
2024-09-20 09:31:21 -07:00
Mateusz Mandera ed7c330548 retention: Rename run_archiving_in_chunks to run_archiving. 2024-09-20 09:31:21 -07:00
Prakhar Pratyush 86194efe7b realm_export: Add a new endpoint to fetch private data export consents.
This commit adds a new endpoint `export/realm/consents` to
fetch the consents of users for their private data exports.

Fixes part of #31201.
2024-09-20 09:10:32 -07:00
Inge ffbf2aaaff right-sidebar: Others collapsed by default
"Others" will on default be collapsed. If it is expanded it will be preserved when switching view.

Fixes #31628
2024-09-20 09:09:03 -07:00