Commit Graph

60415 Commits

Author SHA1 Message Date
Alex Vandiver 3efc5ae1fd docs: Update docs about number of uwsgi processes that are run. 2024-08-29 12:12:34 -07:00
Alex Vandiver 0c07c6531c thumbnail: Enqueue thumbnails when we render a spinner.
Thumbnails are usually enqueued in the worker when the image is
uploaded.  However, for images which were uploaded before the
existence of the thumbnailing worker, and whose metadata was
backfilled (see previous commit) this leaves a permanent spinner,
since nothing triggers the thumbnail worker for them.

Enqueue a thumbnail worker for every spinner which we render into
Markdown.  This ensures that _something_ is attempting to resolve the
spinner which the user sees.  In the case of freshly-uploaded images
which are still in the queue, this results in a duplicate entry in the
thumbnailing queue -- this is harmless, since the worker determines
that all of the thumbnails we need have already been generated, and it
does no further work.  However, in the case of historical uploads, it
properly kicks off the thumbnailing process and results in a
subsequent message update to include the freshly-generated thumbnail.

While specifically useful for backfilled uploads, this is also
generally a good safety step for a good user experience, as it also
prevents dropped events in the queue from unknown causes from leaving
perpetual spinners in the message feed.

Because `get_user_upload_previews` is potentially called twice for
every message with spinners (see 6f20c15ae9), we add an additional
flag to `get_user_upload_previews` to suppress a _second_ event from
being enqueued for every spinner generated.
2024-08-29 12:11:51 -07:00
Alex Vandiver df91cdf333 thumbnail: Backfill ImageAttachment rows.
We previously used the file extension to determine if we should
attempt to inline an image.  After b42863be4b, we rely on the
existence of ImageAttachment rows to determine if something is an
image which can be viewed inline.  This means that messages
containing files uploaded before that commit, when (re-)rendered, will
be judged as not having inline'able images.

Backfill all of the ImageAttachment rows for image-like file
extensions.  We are careful to only download the bytes that we need in
the image headers, to minimize bandwidth from S3 in the event that the
S3 backend is in use.  We do _not_ produce thumbnails for the images
during this migration; see the subsequent commit.

Because this migration will be backported to 9.x, it is marked as only
depending on the last migration in `9.x`, with a subsequent merge
migration into the tip of `main`.
2024-08-29 12:11:51 -07:00
Lauryn Menard d796deddf8 activity: Add invoiced through information to plan activity view.
Expands the header information on the plan activity view to include
the license ledger that was set as invoiced_through when the last
billing cycle generated an invoice.

Also, updates the name of the header information for the next
invoice date to match what's show in the support view for the plan.
2024-08-29 12:00:38 -07:00
Lauryn Menard e86c02cd67 corporate: Revise string method for LicenseLedger objects.
Includes the license counts, date and renewal information as well
as the id field, so that print debugging and displaying these
objects is easier and more useful.
2024-08-29 12:00:38 -07:00
sujal shah 333eedb351 stream_settings: Add text in the left panel.
Display "No channels match your filter" in the left panel
when no matches are found for filter queries in
"Subscribed", "All channels" and "Not subscribed" tabs.

Fixes #18332.
2024-08-28 14:23:46 -07:00
sujal aafcd43038 stream_settings: Show disabled create stream button and text.
Now user who don't have permission can see disabled stream create
button with message.
2024-08-28 14:23:46 -07:00
Lauryn Menard d1e7c082b3 activity: Add header area to user activity view. 2024-08-28 14:12:36 -07:00
Lauryn Menard d54ca85de2 activity: Add view to see the ledger entries for a customer plan.
Adds a link to the plan ledger view in the current plan information
shown in the support views. Link is not shown if the plan is 100%
sponsored, e.g., the Community plan.

Adds a formatted header area to the activity table template so
that it's easy to add useful information to these activity views.
2024-08-28 14:12:36 -07:00
Alex Vandiver 704423787b 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.
2024-08-28 13:57:57 -07:00
Varun Singh 3d6dcf8fe5 compose_fade: Remove duplicate `AllVisibilityPolicies` type. 2024-08-28 11:02:26 -07:00
Varun Singh 51ff57f1bf settings_config: Rename type`ColorSchemeDetails` to `ColorSchemaValues`. 2024-08-28 11:02:26 -07:00
Jaimin Godhani 243b57154b settings: Rename user_display_settings to user_preferences.
Fixes part of zulip#26874.
2024-08-28 11:01:02 -07:00
adnan-td e23d863981 narrow_banner: Fix message view banner for dm with deactivated user.
Previously the empty view banner for DM with any recipients
contained "Why not start the conversation".

For deactivated users/bots, we are now not displaying it.
2024-08-27 15:58:29 -07:00
adnan-td 120cfa8987 narrow_banner: Refactor recipient_user in direct message. 2024-08-27 15:58:29 -07:00
Sayam Samal ccb65795d9 user_card_popover: Display bot role conditionally in user card. 2024-08-27 15:52:39 -07:00
Sayam Samal 96a105b315 bots: Display bot role in lowercase in user card and user profile modal. 2024-08-27 15:52:39 -07:00
Sayam Samal 051221002a user_profile_modal: Display detailed bot role in the "Role" field.
The "Role" field previously only displayed "Bot" for the  non-system
bot users, this commit adds the detailed bot role to the "Role" field
in the format "Bot ({role})".
2024-08-27 15:52:39 -07:00
Sayam Samal 4cdd484755 user_card_popover: Display bot owner user card popover as an overlay.
This commit displays the bot owner card as an overlay in the middle of
the screen, like we do for mobile screen sizes where the reference
elements are hidden.

This also hides the bot user card when it's bot owner card is opened.
2024-08-27 15:52:39 -07:00
Sayam Samal adbfb35bb7 user_card_popover: Display bot's role in bot user card popover.
As a follow-up to the previous commit which repositions the bot owner
field, this commit adds the bot's role in the format "Bot ({role})" to
the previous position of the bot owner field in the bot user card.
2024-08-27 15:52:39 -07:00
Sayam Samal 5590c704ca user_card_popover: Reposition bot owner field and display as user pill.
This commit repositions the bot owner field from below the bot’s name to
align with the user fields, providing more space for the newly added
bot owner user pill.
2024-08-27 15:52:39 -07:00
Lauryn Menard 8ace23ffa9 docs: Update help center links for stream to channel rename.
Fixes the URLRedirects for "help/about-streams-and-topics" and
"help/streams-and-topics" to go to "/help/introduction-to-topics"
since "help/channels-and-topics" has been redirected to that URL.
2024-08-27 13:30:28 -07:00
Lauryn Menard 480aa39126 docs: Update links to help center article on previews. 2024-08-27 13:30:28 -07:00
sujal shah 8cc4252062 settings: Convert name to pills in custom emoji section.
previously, author names are displayed in plain text, now
they are converted to pills.

Fixes #30990.
2024-08-27 13:22:34 -07:00
Pratik Chanda 64a9f83473 compose_box: Fix order of group pm recipient pills on focus.
Earlier when compose box was opened or narrowed to pm, the recipient
pills were sorted according to user email strings instead of their
full names which was inconsistent with compose box placeholder text,
recipient row and message header.

This commit fixes the behaviour by introducing a `sort_email`
function to sort emails according to their full names and display
sorted pills.

Fixes: zulip#27375.

Co-authored-by: richardshaju <richardshaju66@gmail.com>
2024-08-27 13:21:16 -07:00
Pratik Chanda c180b25a68 drafts: Fix order of group pm recipients in draft overlay.
Earlier in drafts overlay, the order of pm recipients for the draft
was sorted differently to that of the pm group title.

This commit fixes the behaviour by sorting the drafts pm recipients
using `make_strcmp`.

Fixes part of zulip#27375.

Co-authored-by: richardshaju <richardshaju66@gmail.com>
2024-08-27 13:21:16 -07:00
Pratik Chanda eeae434625 left_sidebar: Fix order of group pm recipients in left sidebar.
Earlier in left sidebar, the recipient names were not sorted
consistently with the message header of the pm.

This commit fixes the behaviour by sorting the recipient names in
left sidebar with `make_strcmp`.

Fixes part of zulip#27375.

Co-authored-by: richardshaju <richardshaju66@gmail.com>
2024-08-27 13:21:16 -07:00
Pratik Chanda 54a7cefede message_store: Fix order of group full names of pm recipients.
Earlier, in group direct message, the full names of group pm recipients
were sorted incorrectly which is used for tooltip on hovering over
recipient row and text placeholder of collapsed compose box. That
resulted in different order of recipient names.

This commit fixes the behaviour by using the `make_strcmp` to sort
the names to show in the tooltip and collapsed compose box.

Fixes part of zulip#27375.

Co-authored-by: richardshaju <richardshaju66@gmail.com>
2024-08-27 13:21:16 -07:00
Pratik Chanda 465b40e7ae filter: Fix order of group direct message recipients on message title.
Earlier, when narrowed to a group direct message, the header title
was sorted with respect to its email instead of their names. This
would result in message header and recipient row having different
order of recipients.

This commit fixes the behaviour by changing the order of the names
passed for the group message header using `make_strcmp`.

Fixes part of zulip#27375.
2024-08-27 13:21:16 -07:00
Pratik Chanda 9f94e6c58d message_header: Fix order of group direct message recipients.
Earlier, the order of recipients in recipient row of group direct
message weren't in the same sorting pattern as that of message
title which would result in inconsistent order of recipient names.

This commit fixes the behaviour in `private_message_header` in
recipient row to sort the names using `strcmp`.

Fixes part of zulip#27375.

Co-authored-by: richardshaju <richardshaju66@gmail.com>
2024-08-27 13:21:16 -07:00
opmkumar b9425d4d10 left sidebar: Improve how starred message count is hidden.
Fixes #30898.
2024-08-27 13:08:29 -07:00
Karl Stolley cd88f4421b left_sidebar: Better handle bracket with resolved topics. 2024-08-27 13:03:55 -07:00
Karl Stolley de69424a81 left_sidebar: Extend bottom bracket for show all topics control. 2024-08-27 13:03:55 -07:00
Karl Stolley 2374c8a8c0 left_sidebar: Add grouping border to channel and topics. 2024-08-27 13:03:55 -07:00
Karl Stolley 65cd772e24 left_sidebar: Adjust gridded rows to match Vlad's design. 2024-08-27 13:03:55 -07:00
Karl Stolley a22aa41367 left_sidebar: Update left sidebar padding for new design.
This also moves the 2px of reduced lefthand padding to the overall
width of the left sidebar, which will keep the left sidebar at its
same width (in other words, the message area will not shift any
further to the left, either).

Fixes #27565
2024-08-27 13:03:55 -07:00
Alex Vandiver 7424d4e721 install: Do not pull in "recommended" packages.
This likely has no effect in this instance, but is good practice.
2024-08-26 20:52:59 -07:00
Alex Vandiver e8f7e281a7 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.
2024-08-26 20:52:59 -07:00
Lauryn Menard 44e73eecc1 support: Add basic information about realm.
Adds non-form section to Zulip Cloud support view with some basic
realm information: organization type, plan type, non-guest user
count and guest user count.

Uses a shared template for the basic realm data and adds a shared
support context dict for variables that are used in both remote
and Zulip Cloud support views.
2024-08-26 20:52:38 -07:00
Lauryn Menard 349954e4fc support: Add database query test of single realm and remote realm views.
Gives a baseline of current database queries for these single realm
or remote realm support views, so that as we add features to these
views, we can better manage how those changes impact the performance
of our support views in general.
2024-08-26 20:52:38 -07:00
Anders Kaseorg ed63a40184 install-transifex-cli: Upgrade Transifex CLI from 1.6.14 to 1.6.16.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-08-26 14:17:05 -07:00
Anders Kaseorg b0170fc306 install-shfmt: Upgrade shfmt from 3.8.0 to 3.9.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-08-26 14:17:05 -07:00
Anders Kaseorg 2f8734aee0 install-node: Upgrade Node.js from 20.15.1 to 20.17.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-08-26 14:17:05 -07:00
Kenneth Rodrigues 00a54099a2 analytics: Migrate to @typed_endpoint. 2024-08-26 08:57:49 -07:00
Aman Agrawal 3ea3f48338 test_stripe: Normalize fixtures for upgrade_by_card_to_plus_plan. 2024-08-26 08:37:27 -07:00
Lauryn Menard 7af87c7e14 realm-settings: Get max invites for realm plan type helper.
There are a few places where we want to set the max invites for a
realm to the default for a realm's plan type, so this creates a
helper function that can be used consistently to get that default
value.
2024-08-26 08:29:50 -07:00
evykassirer 3dd0ef6bf9 message_list_view: Calculate date divider variables before assignment.
This is part of a bigger refactor to calculate message container
attributes just from the message, so that we can create the message
container all at once instead of piecewise, to be able to convert
to typescript.
2024-08-26 08:14:57 -07:00
evykassirer fa4d5bec2c message_list_view: Use clearer variable name for clear_message_date_divider. 2024-08-26 08:14:57 -07:00
evykassirer 3266eda3e9 message_list_view: Calculate group display date with a pure function.
Where "pure function" means that the group's value isn't changed
in this function.

This commit also modifies the function to just take a message.

This is part of a bigger refactor to calculate message list group
attributes and creating the group all at once instead of piecewise.
This is necessary to convert this module to typescript, since a
partially formed group is hard to type.
2024-08-26 08:14:57 -07:00
evykassirer b8bda635b7 message_list_view: Only pass message to same_day.
This is part of a bigger refactor to calculate message container
attributes just from the message, so that we can create the message
container all at once instead of piecewise, to be able to convert
to typescript.
2024-08-26 08:14:57 -07:00