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.
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.
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.
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>
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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>
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.
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.