Commit Graph

59091 Commits

Author SHA1 Message Date
Anders Kaseorg 95f5d298de install-node: Upgrade Node.js from 20.13.1 to 20.15.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 21:34:18 -07:00
Anders Kaseorg 3dccb72519 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 21:34:18 -07:00
Anders Kaseorg 7d4d4017b3 eslint: Fix unicorn/prefer-array-find.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 20:13:26 -07:00
Anders Kaseorg 4428609ece eslint: Fix unicorn/prefer-includes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 20:13:26 -07:00
Tim Abbott 47db96d730 migrations: Add migration for RealmAuditLog ordering.
Because this might impact how past RealmAuditLog-reading migrations
are processed, I think it's better to this one as an actual Django
migration, even though it has no actual SQL to run.
2024-06-26 17:18:50 -07:00
Lauryn Menard 673a01ea0c realm-deactivation: Send email to owners as part of deactivation.
Creates a new "realm_deactivated" email that can be sent to realm
owners as part of `do_deactivate_realm`, via a boolean flag,
`email_owners`.

This flag is set to `False` when `do_deactivate_realm` is used for
realm exports or changing a realm's subdomain, so that the active
organization owners are not emailed in those cases.

This flag is optional for the `deactivate_realm` management command,
but as there is no active user passed in that case, then the email
is sent without referencing who deactivated the realm.

It is passed as `True` for the support analytics view, but the email
that is generated does not include information about the support
admin user who completed the request for organization deactivation.

When an active organization owner deactivates the organization, then
the flag is `True` and an email is sent to them as well as any other
active organization owners, with a slight variation in the email text
for those two cases.

Adds specific tests for when `email_owners` is passed as `True`. All
existing tests for other functionality of `do_deactivate_user` pass
the flag as `False`.

Adds `localize` from django.util.formats as a jinja env filter so
that the dates in these emails are internationlized for the owner's
default language setting in the "realm_deactivated" email templates.

Fixes #24685.
2024-06-26 16:48:18 -07:00
Alex Vandiver 2eaf098c5d upload: Content-type is always defined. 2024-06-26 16:43:11 -07:00
Alex Vandiver 17fb23746f upload: Move methods into zerver.lib.upload from .base. 2024-06-26 16:43:11 -07:00
Alex Vandiver c826d80061 upload: Factor out common code into zerver.lib.upload. 2024-06-26 16:43:11 -07:00
Alex Vandiver c0d9a95aa8 email_mirror: Fix a misleading variable name. 2024-06-26 16:43:11 -07:00
Alex Vandiver 5cd10ce51d s3: Allow setting a CloudFront URL prefix for avatar and emoji images. 2024-06-26 16:43:11 -07:00
Alex Vandiver 08b24484d1 upload: Remove redundant acting_user_profile argument.
This argument, effectively added in 9eb47f108c, was never actually
used.
2024-06-26 16:43:11 -07:00
Alex Vandiver 41d1b417e7 avatars: Clean up now-irrelevant assumptions.
This x=x hack was removed in 3bd3173b1f.
2024-06-26 16:43:11 -07:00
Alex Vandiver fb929ca218 thumbnailing: Remove unnecessary third return value from resize_emoji. 2024-06-26 16:43:09 -07:00
Alex Vandiver 16f8d12285 requirements: Remove now-unused pillow. 2024-06-26 16:42:59 -07:00
Alex Vandiver 0070b5da78 tests: Switch from PIL to pyvips. 2024-06-26 16:42:59 -07:00
Alex Vandiver b14a33c659 thumbnailing: Switch to libvips, from PIL/pillow.
This is done in as much of a drop-in fashion as possible.  Note that
libvips does not support animated PNGs[^1], and as such this
conversion removes support for them as emoji; however, libvips
includes support for webp images, which future commits will take
advantage of.

This removes the MAX_EMOJI_GIF_SIZE limit, since that existed to work
around bugs in Pillow.  MAX_EMOJI_GIF_FILE_SIZE_BYTES is fixed to
actually be 128KiB (not 128MiB, as it actually was), and is counted
_after_ resizing, since the point is to limit the amount of data
transfer to clients.

[^1]: https://github.com/libvips/libvips/discussions/2000
2024-06-26 16:42:57 -07:00
Alex Vandiver 9fb03cb2c7 upload: Factor out common avatar logic. 2024-06-26 16:38:01 -07:00
Alex Vandiver d92993c972 upload: Factor out common emoji logic. 2024-06-26 16:38:01 -07:00
Alex Vandiver f66b78f6b3 semgrep: Allow zerver.lib.mime_types imports in migrations. 2024-06-26 16:38:01 -07:00
Alex Vandiver 872e2ad2cd models: Enforce an ordering to on audit logs to solve a flaky test.
Multiple events may be created with the same timestamp; we add a
default ordering by "id" such that these have a consistent ordering in
tests (to solve for flaky tests), as well as in the internal API.
2024-06-26 16:38:00 -07:00
N-Shar-ma 9bc1eb4bb9 compose: Allow 3-way compose box resizing with new fixed expanded state.
Apart from the normal (collapsed) and full screen sizes, a new expanded
state with the same size as the maximum a normal compose box can stretch
to when full (40% of the screen height) is now available. Now a user can
expand the compose box without it covering the full screen with a click.
The vertical resize icon in the bottom right corner of the compose box
is rendered useless so has been removed.

All three states can be cycled through by clicking the compose resize
button in the order: collapsed -> 40% of the screen -> full screen. When
a message naturally causes the compose box in its normal state to expand
up to 40% of the screen, clicking the resize button will take it to full
screen state.

Fixes: #29966.
2024-06-26 16:36:52 -07:00
N-Shar-ma b432b269ee refactor: Make compose size related variables & functions more specific.
We divide functionality into that for "full_size" and "expanded", which
are identical for now.

This is a prep commit for adding an intermediate expanded screen size.
2024-06-26 16:36:52 -07:00
Aman Agrawal 5f956cd369 typeahead: Change background of active elements. 2024-06-26 16:31:28 -07:00
Aman Agrawal a8eff69fc2 typeaheads: Reduce left padding for all elements.
This required taking special care of typeaheads with user circle
and making sure long typeaheads wrap correctly.
2024-06-26 16:30:26 -07:00
Aman Agrawal 52ac602acb typeahead: Make them look like dropdown widget.
This attempts to change background color and text color of typeaheads
to be same as dropdown widgets we have in the app.
2024-06-26 16:26:31 -07:00
Sahil Batra 1fac997338 settings: Refactor CSS for "control-label-disabled" class.
We previously had two CSS rules for control-label-disabled
class, one in settings.css and one in subscriptions.css
and the rule in subscriptions.css was being used by all
the elements with that class.

This commit refactors the code to have only single CSS rule
for that class with the value being set to the one used in
subscriptions.css, because that was the one being used and
that also looks better in terms of design, and the CSS is
defined in settings.css since it can be considered more
general file for writing CSS used in organization/personal
settings along with stream settings.

This commit also removes the unused code for
".control-label-disabled.enabled" selector since we no
longer use that selector.
2024-06-26 14:22:47 -07:00
Sahil Batra f7a6d841c8 stream-settings: Fade label of disabled default stream checkbox. 2024-06-26 14:22:47 -07:00
Sahil Batra 28174aecca settings: Fade label for disabled checkbox. 2024-06-26 14:22:47 -07:00
afeefuddin 22a58c739c left_sidebar_navigation_area_popover: Convert module to TypeScript. 2024-06-26 14:08:39 -07:00
Tim Abbott fe46618d6f i18n: Update translation data from Transifex. 2024-06-26 14:06:27 -07:00
adnan-td 4bde1586e4 topic_name: Fix compressing of display topic names.
Fixes part of #30478.
2024-06-26 12:23:32 -07:00
evykassirer 7ae0972c28 typeahead: Hide by default and show container on `show()`.
This avoids a bug (currently only for search) where the page
can be loaded with an empty but visible (half-loaded) search
typeahead.
2024-06-26 12:02:10 -07:00
Karl Stolley b519344dd9 message_controls: Remove unreachable read-receipt styles. 2024-06-26 12:00:21 -07:00
Karl Stolley cedc34bdea widgets: Remove hard-coded 14px font-size. 2024-06-26 12:00:21 -07:00
Karl Stolley 67b8b9e13a settings: Remove font size, unnecessary height from emoji file name. 2024-06-26 12:00:21 -07:00
Pratik Chanda 81abbab0d8 pm_list: Fix duplicate DM row in left sidebar.
When narrowing to a DM with their own user pill in recipient, a
duplicate DM row gets rendered.

This commit fixes this behaviour and doesn't render a separate row
when one's own email is included in recipient.

Fixes regression from zulip#29175.
2024-06-26 10:12:57 -07:00
Pratik Chanda d3fbfeae31 topic_list: Fix duplicate topic rows in left sidebar.
When narrowing to an existing topic name with different casing, left
sidebar renders duplicate topic rows for the existing topic name and
one with the different casing. Since topic names are case insensitive,
it should narrow to the existing row only.

Fixes regression from #29175.
2024-06-26 10:12:57 -07:00
Lauryn Menard d356577c29 api-docs: Add example for BigBlueButton meeting_name parameter.
Also adds a link to the BigBlueButton integration documentation in
the endpoint's main description.
2024-06-26 10:04:09 -07:00
Aman Agrawal ef09051003 css: Move text-error class from bootstrap.
Remove hover and focus CSS for anchor tags since `text-error` elements
which use this CSS right now don't have anchor tag.
2024-06-26 10:03:05 -07:00
Aman Agrawal 2eefe94b94 stream_settings: Add color for success message.
This was incorrectly removed in
98637e3a88.
2024-06-26 10:03:05 -07:00
Aman Agrawal 959bf39320 bootstrap: Remove unused `text-warning` class. 2024-06-26 10:03:05 -07:00
Karl Stolley c0837a6d20 status_emoji: Allow status emoji to scale with text. 2024-06-26 10:02:13 -07:00
Karl Stolley 818094f81d user_circles: Set user circles to scale with text. 2024-06-26 10:01:24 -07:00
Karl Stolley a43ae2a561 user_circles: Address TODO and remove styles. 2024-06-26 10:01:24 -07:00
Karl Stolley 4c1cc4e62e mention_pills: Allow pills to scale with other message text. 2024-06-26 09:51:29 -07:00
N-Shar-ma dcf2c67f2d typeahead: Add non breaking space (\u00a0) to list of word separators. 2024-06-25 22:52:28 -07:00
Aman Agrawal c8379b4f9a message_fetch: Stop infinite fetch for first unread message id.
Found while migrating message_fetch to Typescript in #30509.
2024-06-25 22:51:43 -07:00
Alya Abbott dab639e34e help: Clean up formatting in test notifications documentation. 2024-06-25 17:28:17 -07:00
Alya Abbott b892f8a7a8 notifications: Test notification should say that it's a test. 2024-06-25 17:28:17 -07:00