Commit Graph

59263 Commits

Author SHA1 Message Date
Anders Kaseorg b115d44b6a requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-27 15:31:43 -07:00
Anders Kaseorg 997dbcd5d9 clubhouse: Fix PLR1704 Redefining argument with the local name `action`.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-27 15:31:43 -07:00
Anders Kaseorg 9fdc0eeb8e scim: Fix PLR1704 Redefining argument with the local name `path`.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-27 15:31:43 -07:00
sanchi-t 77c614e072 set_up_stream: Update sorter function.
Make sure that typeahead results are alphabetized.

Fixes #30577.
2024-06-27 15:29:47 -07:00
sanchi-t 1a8997589d set_up_stream: Update typeahead items to 12.
Fixes part of #30577.
2024-06-27 15:29:47 -07:00
Karl Stolley fed0aa6642 inbox: Resize user circles in inbox view. 2024-06-27 15:28:27 -07:00
Karl Stolley d0f5d93f4b inbox: Size unread focus ring without shifting rows. 2024-06-27 15:28:27 -07:00
Karl Stolley 18e5b3ab6b unread_counts: Scale unread counts with UI. 2024-06-27 15:28:27 -07:00
Alya Abbott b9539621d8 portico: Add HostingAdvice.com review to history page. 2024-06-27 15:24:49 -07:00
Aman Agrawal 15195fc08f sub_store: Update first_message_id of stream if we can.
Tested by moving first message in a stream to other stream and
checking for the updated value in console via
`zulip_test.get_sub("verona")`.
2024-06-27 14:59:45 -07:00
Aman Agrawal cffae1439c stream_topic_history: Let server help us with latest msg id for topics.
If we already have latest data for topics, we shouldn't pass on the
opportunity to update the latest message id for existing topics.
2024-06-27 14:59:45 -07:00
Aman Agrawal d2d479ba61 stream_topic_history: Fix wrong topic order when moving messages.
Fixes #27500

It is hard to reproduce the bug but this should fix any bugs
involving topic order when moving messages since we are updating
the data again from the server.
2024-06-27 14:59:45 -07:00
Aman Agrawal d80dba75c5 stream_topic_history: Remove the concept of historical topics.
It is hard to maintain the concept of `historical` topics locally,
thus, we remove them entirely to simplify what we can do here.

This commit can introduce bugs when are addressed in the next commit.
2024-06-27 14:59:45 -07:00
Aman Agrawal d381a358d0 message_events: Remove message from message_store on deletion.
We did not remove the deleted messages from message_store
previously. This commit adds the code to remove the deleted
messages from message_store.

Co-authored-by: Sahil Batra <sahil@zulip.com>
2024-06-27 14:59:45 -07:00
sanchi-t 281ce39a0d template_stub: Remove the requirement to mock templates.
We will now just run the actual template if not mocked, such that code
that ends up rendering a template incidentally does not need to mock
templates.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2024-06-27 11:58:59 -07:00
Tim Abbott a3feecac62 docs: Add mock_template documentation to docs.
Previously, this content was only available in an error message, and
provided less context.
2024-06-27 11:58:59 -07:00
Aman Agrawal edb02fcc98 giphy: Fix focus outline left vertical line not visible. 2024-06-27 09:19:23 -07:00
Aman Agrawal f27488adc9 giphy: Upgrade giphy to implement TODO.
Upgraded to use the tabindex support provided by giphy itself.
2024-06-27 09:19:23 -07:00
Sahil Batra d60075a8cf settings: Make the label for disabled checkboxes less faded.
This commit updates the CSS to makes the label for disabled
checkbox less faded such that it is faded enough to figure out
that the setting is disabled but the text is also visible clearly.
2024-06-27 09:18:39 -07:00
Aman Agrawal 39bcb6bd8b typeahead: Remove all sources of white space inside `strong` element.
We are using `white-space: pre` which doesn't condense whitespaces,
so we need to remove any unintentional whitespaces here.
2024-06-27 09:18:23 -07:00
Anders Kaseorg c31cebbf68 mypy: Remove some unused ignore_missing_imports overrides.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 23:01:49 -07:00
Anders Kaseorg 63c65e6ecd install-transifex-cli: Upgrade Transifex CLI from 1.6.13 to 1.6.14.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 21:34:18 -07:00
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