Commit Graph

60112 Commits

Author SHA1 Message Date
evykassirer dd3aeb9478 portico css: Use classname for header text instead of span.
(cherry picked from commit e0b0a3638e)
2024-08-29 10:45:39 -07:00
evykassirer b488d7b6cd integrations css: Use classname for back to list link instead of span.
(cherry picked from commit cc6118efae)
2024-08-29 10:45:39 -07:00
evykassirer 166c9489d5 settings css: Use classname for checkbox label instead of span.
(cherry picked from commit f7a27be0a8)
2024-08-29 10:45:39 -07:00
evykassirer aa0fba7580 landing_nav css: Use classname instead of span for realm name.
(cherry picked from commit 5ed19d1971)
2024-08-29 10:45:39 -07:00
evykassirer 14cd679cc9 css: Use a classname instead of span for overlay plus button.
(cherry picked from commit 9824f76e7d)
2024-08-29 10:45:39 -07:00
evykassirer 81502f28d1 css: Use color-animated-button-text instead of span selector.
(cherry picked from commit 952ca6ae3c)
2024-08-29 10:45:39 -07:00
evykassirer 823f32454a css: Use classname for stream subheader name.
(cherry picked from commit 1b8658670c)
2024-08-29 10:45:39 -07:00
evykassirer 33e10eaa04 css: Use classname instead of span selector for todo checkboxes.
(cherry picked from commit 8427b6f744)
2024-08-29 10:45:39 -07:00
evykassirer 2d5c3f41c2 css: Remove unused span selector in scroll to bottom container.
This rule was originally introduced with a span element in
0eafa6039b but the span has been
since removed.

(cherry picked from commit 90ab7f6287)
2024-08-29 10:45:39 -07:00
Mateusz Mandera df34770524 import_util: Fix file extensions of emoji files downloaded from Slack.
The Slack API when returning the emoji records, returns the record for
its thumbsup_all emoji with the url ending with .png, even though the
file is a gif.

For that reason, we have to make that code correct file extensions based
on the response content-type. Emojis are the smallest set of images to
download, so for simplicity of implementation, we remove the
parallelization of the downloads in favor of just processing them
serially.

(cherry picked from commit 9cad9644e7)
2024-08-29 10:45:39 -07:00
Mateusz Mandera a46b71e7b4 import: Fix export->import of emojis from Slack.
Ideally this would besplit up into two commits, but it's hard to split
into self-contained, atomic chunks now that this segment of the
import/export system is generally kind of broken after thumbnailing
system changes.

1. 3rd party export converters don't make .original image files.
Insteadthey provide a single file, which the import should treat as if
it's .original.

2. 3rd party converters create all the records with is_animated=False.
That's an issue, because without setting that correctly on the
RealmEmoji objects, Zulip doesn't know that it should use the "still"
thumbnail when the emoji is being used in a user's status. Which leads
to incorrectly displaying the user status with the distracting
animation.

(cherry picked from commit 669e0a3e47)
2024-08-29 10:45:39 -07:00
Mateusz Mandera fb1d6f712f import: Export and import .original emoji files correctly.
The export tool was only exporting the already-thumbnailed emoji file,
omitting the original one. Now we make sure to export the .original file
too, like we do for avatars, and make the import tool process it
directly, to thumbnail it directly and generate a still in the case of
animated emojis.

Otherwise, the imported realm wouldn't have the <emoji>.png.original
file that we generally expect to have accessible, and stills for
animated emojis were completely missing.

(cherry picked from commit 5476340b52)
2024-08-29 10:45:39 -07:00
Alya Abbott 33f229de15 help: Tweak keyboard navigation docs for combined and DM feeds.
(cherry picked from commit 97707ae9e2)
2024-08-29 10:45:39 -07:00
Alex Vandiver 85d0080215 do_delete_old_unclaimed_attachments: Cap deletions at batch size.
Since each loop may add more than one file to the `storage_paths`
list, this may result in more than 1000 files being sent to
delete_message_attachments.  Since the S3 backend only supports 1000
elements being deleted at once, we must partition the list into chunks
which are no more than 1000 elements long.

(cherry picked from commit 704423787b)
2024-08-29 10:45:39 -07:00
Alex Vandiver a9692519b3 install: Do not pull in "recommended" packages.
This likely has no effect in this instance, but is good practice.

(cherry picked from commit 7424d4e721)
2024-08-29 10:45:39 -07:00
Alex Vandiver 7ab8be318c create-production-venv: Do not pull in "recommended" packages.
This prevents, among other things, `libvips` from pulling in the
`firefox` package by way of the `nip2` package.

Fixes: #31411.
(cherry picked from commit e8f7e281a7)
2024-08-29 10:45:39 -07:00
evykassirer 6b7b3abc8d message_edit: Fix type of message id for aborting video.
This fixes a bug introduced by 9cf9cec.
2024-08-20 08:03:43 -07:00
Karl Stolley 9d7bb04dfd rendered_markdown: Remove incorrect selector with unused color.
(cherry picked from commit c8ba0f7abf)
2024-08-15 00:11:42 -07:00
Sayam Samal 358b2e0347 rendered_markdown: Remove universal selector for embedded content.
This removes the `.message_embed > *` selector which was expensive, and
instead moves the styles to the specific elements that need them.

(cherry picked from commit 5549e807eb)
2024-08-15 00:11:42 -07:00
adnan-td 4da2c039ff integration-docs: Update Papertrail the new doc format.
Part of #29592.

(cherry picked from commit e95b51098e)
2024-08-15 00:11:42 -07:00
adnan-td bed909c304 integration-docs: Update PagerDuty to the new doc format.
Part of #29592.

(cherry picked from commit 164217f7a3)
2024-08-15 00:11:42 -07:00
adnan-td d1cdc03f23 integration-docs: Update Patreon to the new doc format.
Part of #29592.

(cherry picked from commit 6e08798c02)
2024-08-15 00:11:42 -07:00
adnan-td 4dc8423104 integration-docs: Update Pingdom to the new doc format.
Replaced the image to show **Add Integration** with text
instructions.

Part of #29592.

(cherry picked from commit 83094860b1)
2024-08-15 00:11:42 -07:00
Aman Agrawal 125a6e9421 left_sidebar: Fix user unable to type in DM search input.
This was due to non message list views didn't know that they
shouldn't try to process hotkey when DM search input is in focus.

(cherry picked from commit 1ce9fcdada)
2024-08-15 00:11:42 -07:00
PieterCK de3cc7b5f3 integrations: Update comment related notifications in Jira integration.
Previously, comment related notifications only displayed the issue
title as a plain string. This commit reformats the issue title to
include a link back to the Jira issue.

(cherry picked from commit 68c87dbdf8)
2024-08-15 00:11:42 -07:00
PieterCK b6b6d02904 integrations : Update Jira doc.
Adjusted the Jira documentation for recent changes in their UI
when setting up webhooks, reformatted the note about compatible
Jira version, and added a link to Jira's official webhook guide.

(cherry picked from commit c952e7ae86)
2024-08-15 00:11:42 -07:00
Mateusz Mandera bbabd51e4a auth: Fix re-enabling of SAML/AzureAD in organization settings UI.
This bug was introduced in da9e4e6e54.
validate validate_plan_for_authentication_methods is already called
inside validate_authentication_methods_dict_from_api, conditionally on
settings.BILLING_ENABLED. This additional, redundant call runs
regardless of BILLING_ENABLED, and thus prevents a self-hosted server
from enabling certain backends in the organization settings UI.

The impact of this is limited - in order to encounter this bug, a
self-hosted server would have to first disable the backend in the UI, as
self-hosted realms are created with all backend flags enabled. A backend
doesn't show up in the org settings UI until it is first enabled in
AUTHENTICATION_BACKENDS in settings.py - that's why this is a rare
state. A sequence of steps like this has to be followed to reproduce:
1. Add the backend to AUTHENTICATION_BACKENDS in settings.py.
2. Disable the backend in the org settings UI.
3. Now try to re-enable it, which fails due to the bug.

(cherry picked from commit 114f13e0ee)
2024-08-15 00:11:42 -07:00
Mateusz Mandera 733c5be8a4 test_auth_backends: Remove copied-and-pasted comments.
These makes no sense and were copied from the block at the top of the
test.

(cherry picked from commit 3f472ec664)
2024-08-15 00:11:42 -07:00
Tim Abbott 1810f2e93c docs: Explicitly discuss management commands in Zulip Cloud.
This already seems obvious to many users, but it seems appropriate to
spell out.

(cherry picked from commit 2144904cf5)
2024-08-15 00:11:42 -07:00
Tim Abbott f37fcec06d help: Document change_auth_methods command.
I also added a basic warning to help avoid folks getting into this
state.

(cherry picked from commit e01206d04c)
2024-08-15 00:11:42 -07:00
Mateusz Mandera 78e3892ebb management: Add change_auth_backends command.
A utility command to enable or disable certain authentication backends
for a realm from the command line. Can be helpful e.g. if the
administrator accidentally disables some auth methods in the UI leaving
themselves with none remaining that they could actually use to log back
into the organization.

Example usage:
```
(zulip-py3-venv) vagrant@c32c137f59a0:/srv/zulip$ ./manage.py change_auth_backends -r zulip --show
Current authentication backends for the realm:
Enabled backends:
  Dev
  Email
  GitHub
  GitLab
  Google
  Apple
  SAML
  OpenID Connect
(zulip-py3-venv) vagrant@c32c137f59a0:/srv/zulip$ ./manage.py change_auth_backends -r zulip --disable GitHub
Disabling GitHub backend for realm Zulip Dev
Updated authentication backends for the realm:
Enabled backends:
  Dev
  Email
  GitLab
  Google
  Apple
  SAML
  OpenID Connect
Disabled backends:
  GitHub
Done!
(zulip-py3-venv) vagrant@c32c137f59a0:/srv/zulip$ ./manage.py change_auth_backends -r zulip --enable GitHub
Enabling GitHub backend for realm Zulip Dev
Updated authentication backends for the realm:
Enabled backends:
  Dev
  Email
  GitHub
  GitLab
  Google
  Apple
  SAML
  OpenID Connect
Done!
```

(cherry picked from commit bf7fc5701f)
2024-08-15 00:11:42 -07:00
Prakhar Pratyush dd98f82ebb rocketchat: Fix "OSError: [Errno 36] File name too long" error.
Earlier, we were replacing too long attachment name with random uuid
when the character count of the file name was greater than 255.

This results in "OSError: [Errno 36] File name too long" error in
few cases when the file name has less than 255 characters but more
than 255 bytes (file name with Non-ASCII characters).

This commit updates the code to check the file name's byte size
instead of characters count.

(cherry picked from commit 19d56f77b5)
2024-08-15 00:11:42 -07:00
Prakhar Pratyush 96b90e1245 help: Add a note in "Export your Rocket.Chat data" section.
This commit adds a note to NOT shut down Rocket.Chat server
while creating database dump using mongodump utility because
as this results in bugs like empty instances.bson file and
empty uploaded data after import.

(cherry picked from commit 54492ec7a0)
2024-08-15 00:11:42 -07:00
Prakhar Pratyush 1eec83142c help: Document rocketchat's livechat channels/messages not imported.
We ignore Rocket.Chat livechat channels/messages. It was
implemented in #20195.

This commit documents the caveat.

(cherry picked from commit adae69c65f)
2024-08-15 00:11:42 -07:00
Tim Abbott baad51be3d version: Update version after 9.1 release. 2024-08-02 16:54:44 -07:00
Tim Abbott 1a7996ed45 Release Zulip Server 9.1. 2024-08-02 16:38:50 -07:00
Aman Agrawal 13796b0d10 inbox_ui: Fix row_focus not synced with inbox rows.
Have one inbox row and focus on it. Mark the message as read in
another tab. Press `r` in the first tab will return an error as
the row_focus didn't change but there is no present. So, we
fix it by updating the row_focus if it can get out of bounds
when updating inbox view.

(cherry picked from commit 2011e0df76)
2024-08-02 14:40:13 -07:00
Tim Abbott 60ef07621d i18n: Update translations from Transifex. 2024-08-02 14:40:13 -07:00
Lauryn Menard 264740289b help: Use screenshots for global times examples.
Fixes #31131.

(cherry picked from commit 53e7fc38d6)
2024-08-02 14:40:13 -07:00
Aman Agrawal 6c74726b12 scroll-to-bottom: Fix misclicks to scroll to bottom button.
Scroll to bottom button is visible for a few ms when switching
narrow to Inbox / Recent view while scrolling in message feed.
While we can end the transition faster to completely avoid the issue
for now but this seems like a more permanent and simpler fix
than to fiddle with CSS.

(cherry picked from commit a43c0693b7)
2024-08-02 14:40:13 -07:00
Alex Vandiver 57d4118583 nginx: Adjust default gzip level.
The default compression level is 1; increasing this to 3 takes a small
amount more CPU time (single-digit ms on multi-MB transfers), but
results in a small but noticeable (4-7%) percentage better
compression in JSON content.

Assuming a 25 megabit connection (the current average data rate for
cell phones in the U.S.), a 2MB file which is shrunk an additional 4%
saves approximately 25 milliseconds of transfer time; thus the
additional few milliseconds of CPU-time is well worth the cost.  For
faster connections (e.g. 100 megabit), the tradeoff is more or less a
wash.

(cherry picked from commit 163863c0d1)
2024-08-02 14:40:13 -07:00
Alex Vandiver 85cc589bdb confirmation: Use BigInteger to match other models' "id" field.
Without this, Django builds queries with which compare tables' "id"
fields to `("confirmation_confirmation"."object_id")::bigint`; the
explicit cast prevents the index added in the previous commit from
being used.

(cherry picked from commit 9e02e562bb)
2024-08-02 14:40:13 -07:00
Alex Vandiver e3d1ff1cc2 confirmation: Add an index on content_type, object_id.
This makes lookups of `.confirmation`, or joins through
`confirmation__` as we do in the `/json/invites`, actually fast.  See
https://code.djangoproject.com/ticket/23435

(cherry picked from commit fcb04598f0)
2024-08-02 14:40:13 -07:00
Alex Vandiver aabab08eba invites: Use the realm on the PreregistrationUser, to save a join.
(cherry picked from commit ab1e858eb9)
2024-08-02 14:40:13 -07:00
Alex Vandiver ef4be5f24a migrations: Add missing dependency.
This migration references the "confirmation" app for the first time,
which means we must have migrated at least part of it by this point.

Set the migration to depend on the latest "confirmation" migration at
the time of this migration.

(cherry picked from commit 2bc118892a)
2024-08-02 14:40:13 -07:00
Alex Vandiver 85517d257a docs: Note required OS upgrade in upgrade notes.
(cherry picked from commit cf5accfa7f)
2024-08-02 14:40:13 -07:00
Alex Vandiver 656ca17e14 thumbnail: Resolve a race condition when rendering messages.
Messages are rendered outside of a transaction, for performance
reasons, and then sent inside of one.  This opens thumbnailing up to a
race where the thumbnails have not yet been written when the message
is rendered, but the message has not been sent when thumbnailing
completes, causing `rewrite_thumbnailed_images` to be a no-op and the
message being left with a spinner which never resolves.

Explicitly lock and use he ImageAttachment data inside the
message-sending transaction, to rewrite the message content with the
latest information about the existing thumbnails.

Despite the thumbnailing worker taking a lock on Message rows to
update them, this does not lead to deadlocks -- the INSERT of the
Message rows happens in a transaction, ensuring that either the
message rending blocks the thumbnailing until the Message row is
created, or that the `rewrite_thumbnailed_images` and Message INSERT
waits until thumbnailing is complete (and updated no Message rows).

(cherry picked from commit 6f20c15ae9)
2024-08-02 14:40:13 -07:00
Karl Stolley d34183154f modal_button: Use negative outline-offset to compensate for scaling.
(cherry picked from commit e11cfd7ba8)
2024-08-01 11:24:58 -07:00
Anders Kaseorg 3c7dcce08d users: Reduce date_joined precision to minutes.
Fixes #31188, removing a lot of useless high-entropy data from the
/register response.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 8f1a97f168)
2024-08-01 11:24:58 -07:00
Alex Vandiver efed087741 lightbox: Disable controls on video previews in lightbox.
Setting any value for a boolean attribute (like "controls") enables
it.

(cherry picked from commit 2d0468bde5)
2024-08-01 11:24:58 -07:00