Commit Graph

60325 Commits

Author SHA1 Message Date
Alex Vandiver 2840e68548 static: Pre-compress with zopfli, for better compression.
Zopfli[^1] performs very good, but time-intensive, zlib compression.
It is hence only suitable for pre-compressing objects, not on-the-fly
compression.

Use a webpack plugin to write pre-compressed versions of JS and CSS
assets using Zopfli, and configure nginx to serve those assets when
`Accept-Encoding: gzip` is provided.

This reduces the size of the JS and CSS assets on initial pageload
from 1422872 bytes to 1108267 bytes, or about a 22% savings.

[^1]: https://github.com/google/zopfli
2024-08-13 09:01:06 -07:00
Alex Vandiver b89d47a147 avatar: Stop adding &s=50 to Gravatar and Zulip avatar requests.
This parameter is unused for Zulip avatars, and results in a smaller
(pixel-wise) Gravatar than we use for Zulip "small" avatars.  Omitting
the `s=50` parameter results in a 80x80 image, which is closer to the
100x100 image that Zulip thumbnails avatars to.  Ironically, using the
default (larger) Gravatar dimensions also results in _smaller_
responses (in bytes) from Gravatar.
2024-08-13 08:57:08 -07:00
Karl Stolley 87a0fa0c8c right_sidebar: Avoid vdots appearing beneath Simplebar scroll. 2024-08-13 08:55:31 -07:00
Karl Stolley 480d68143e right_sidebar: Left-align subheads with headings, user row highlights. 2024-08-13 08:55:31 -07:00
Karl Stolley 710abd1cf5 right_sidebar: Allow user rows to use fuller width of right sidebar.
This change is in line with @terpimost's redesign.
2024-08-13 08:55:31 -07:00
Karl Stolley 70fd334b2f right_sidebar: Refactor user search to match left sidebar approach. 2024-08-13 08:55:31 -07:00
Karl Stolley c4dfa7890e right_sidebar: Add minor lefthand padding called for by Vlad's design. 2024-08-13 08:55:31 -07:00
Karl Stolley 557038416c right_sidebar: Rework righthand gutter, header to match Vlad's design.
Fixes #27574.
2024-08-13 08:55:31 -07:00
Alex Vandiver 16dffeb941 migrations: Fix missing Literal() calls in 0564. 2024-08-13 08:04:13 -07:00
Aman Agrawal 970dd30f96 compose: Fix restoring big drafts freezes the app.
We are using `.val` to set compose box content which is very fast vs
`setFieldText` which is very slow due to it doing a lot of
forced repaints. The major downside of using `val` here is that
user will not able to perform `undo` operation on this which doesn't
seem something user would want to do here.

Note that this effects compose content restored from drafts,
scheduled messages and on reload.
2024-08-13 07:53:30 -07:00
Alex Vandiver 84be0a300b audio: Re-convert ding.mp3 from original source.
Similar to zulip.mp3 in the previous commit, this file is corrupted
and only playable in some browsers.

Re-download it from the source[^1], and convert it to MP3 via
`ffmpeg`.

[^1]: https://freesound.org/people/InspectorJ/sounds/411089/ per docs/THIRDPARTY
2024-08-12 12:55:55 -07:00
Alex Vandiver 9e2db6047f audio: Restore un-corrupted zulip.mp3 file.
This file's bytes changed in ba46dc83c6, corrupted by some unknown
process; its bytes begin:
```
00000000: efbf bdef bfbd efbf bd64 0000 0000 0000  .........d......
00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000020: 0000 0000 0000 0000 0000 496e 666f 0000  ..........Info..
00000030: 000f 0000 000f 0000 1a1e 0011 1111 1111  ................
00000040: 1122 2222 2222 2222 3333 3333 3333 4444  ."""""""333333DD
00000050: 4444 4444 4455 5555 5555 5555 6666 6666  DDDDDUUUUUUUffff
00000060: 6666 7777 7777 7777 77ef bfbd efbf bdef  ffwwwwwww.......
00000070: bfbd efbf bdef bfbd efbf bdef bfbd efbf  ................
00000080: bdef bfbd efbf bdef bfbd efbf bdef bfbd  ................
00000090: efbf bdef bfbd efbf bdef bfbd efbf bdef  ................
```

This is not an MP3 file (which should begin with the bytes `fffb`) nor
an MP3 encapsulated in ID3 (which would begin `4944 33`).  This left
it playable by some browsers, but not others like Safari.

Restore the version from before ba46dc83c6, which is universally
recognized as an MP3 file.
2024-08-12 12:55:55 -07:00
Prakhar Pratyush e7f2a0958a custom_profile_fields: Send event on commit in notify_realm...fields.
Earlier, we were using 'send_event' in
'notify_realm_custom_profile_fields' which can lead to a situation,
if any db operation is added after the 'send_event' in the action
functions using it, where we enqueue event but the action function
fails at a later stage.

Events should not be sent until we know we're not rolling back.

Fixes part of #30489.
2024-08-12 12:16:14 -07:00
Prakhar Pratyush bae6188d92 user_groups: Add transaction.atomic decorator to add_user_group view.
The database operations in 'access_user_group_for_setting' and
'check_add_user_group' used in 'add_user_group' view should be
collectively atomic.

This commit adds transaction.atomic decorator for that purpose.
2024-08-12 12:16:14 -07:00
Prakhar Pratyush 427c59ec68 user_groups: Update delete_user_group codepath to send event on commit.
Earlier, we were using 'send_event' in 'delete_user_grou' codepath
which can lead to a situation, if any db operation is added after
the 'send_event' in future, where we enqueue events but the
function fails at a later stage.

Events should not be sent until we know we're not rolling back.

Fixes part of #30489.
2024-08-12 12:16:14 -07:00
Prakhar Pratyush 66ff646e99 user_groups: Update edit_user_group codepath to send event on commit.
Earlier, we were using 'send_event' in 'edit_user_group' codepath
which can lead to a situation where we enqueue events but the
function fails at a later stage.

Events should not be sent until we know we're not rolling back.

Fixes part of #30489.
2024-08-12 12:16:14 -07:00
Prakhar Pratyush 69a2775e9b video_calls: Update do_set_zoom_token to send event on commit.
Earlier, we were using 'send_event' in 'do_set_zoom_token' which
can lead to a situation, if any db operation is added after the
'send_event' in future, where we enqueue events but the action
function fails at a later stage.

Events should not be sent until we know we're not rolling back.

Fixes part of #30489.
2024-08-12 12:16:14 -07:00
Prakhar Pratyush 0fddda232d drafts: Update do_delete_draft to send event on commit.
Earlier, we were using 'send_event' in 'do_delete_draft' which
can lead to a situation, if any db operation is added after the
'send_event' in future, where we enqueue events but the action
function fails at a later stage.

Events should not be sent until we know we're not rolling back.

Fixes part of #30489.
2024-08-12 12:16:14 -07:00
Prakhar Pratyush 096647fbd5 drafts: Update do_edit_draft to send event on commit.
Earlier, we were using 'send_event' in 'do_edit_draft' which
can lead to a situation, if any db operation is added after the
'send_event' in future, where we enqueue events but the action
function fails at a later stage.

Events should not be sent until we know we're not rolling back.

Fixes part of #30489.
2024-08-12 12:16:14 -07:00
Prakhar Pratyush ed7c399644 drafts: Update do_create_drafts to send event on commit.
Earlier, we were using 'send_event' in 'do_create_drafts' which
can lead to a situation, if any db operation is added after the
'send_event' in future, where we enqueue events but the action
function fails at a later stage.

Events should not be sent until we know we're not rolling back.

Fixes part of #30489.
2024-08-12 12:16:14 -07:00
Prakhar Pratyush 475a25e739 scheduled_messages: Send event on commit in delete_scheduled_message.
Earlier, we were using 'send_event' in 'delete_scheduled_messages'
which can lead to a situation, if any db operation is added after
the 'send_event' in future, where we enqueue events but the action
function fails at a later stage.

Events should not be sent until we know we're not rolling back.

Fixes part of #30489.
2024-08-12 12:16:14 -07:00
Prakhar Pratyush 500fb3d804 scheduled_messages: Send event on commit in edit_scheduled_message.
Earlier, we were using 'send_event' in 'edit_scheduled_messages'
which can lead to a situation, if any db operation is added after
the 'send_event' in future, where we enqueue events but the action
function fails at a later stage.

Events should not be sent until we know we're not rolling back.

Fixes part of #30489.
2024-08-12 12:16:14 -07:00
Prakhar Pratyush b0390ce1ee scheduled_messages: Send event on commit in try_deliver_..._message.
Earlier, we were using 'send_event' in
'try_deliver_one_scheduled_messages' which can lead to a situation
where we enqueue events but the action function fails at a later stage.

Events should not be sent until we know we're not rolling back.

Fixes part of #30489.
2024-08-12 12:16:14 -07:00
Prakhar Pratyush 567615a484 onboarding_steps: Send event on commit in mark onboarding_step as read.
Earlier, we were using 'send_event' in 'do_mark_onboarding_step_as_read'
which can lead to a situation, if any db operation is added after the
'send_event' in future, where we enqueue events but the action
function fails at a later stage.

Events should not be sent until we know we're not rolling back.

Fixes part of #30489.
2024-08-12 12:16:14 -07:00
Alex Vandiver b287efce43 migrations: Purge database of old nagios messages.
This deletes them directly, rather than move them into archival,
because that would be slow, and bloat the archival table in a way
which might interfere with other deletions.
2024-08-12 12:02:04 -07:00
Alex Vandiver 97afd713e0 nagios: Clean up after ourselves.
This prevents building up a large number of messages in the database.
2024-08-12 12:02:04 -07:00
Alex Vandiver 1f045bc794 migrations: Allow zulipinternal bots to delete their own messages. 2024-08-12 12:02:04 -07:00
codewithnick 8786d96fe9 user_group_popovers: Add display message when group is empty.
Previously no message was being shown in the group popover,
when group had no members, this commit intends to fix this
by displaying an approriate message when group is empty.
Fixes #30830.
2024-08-12 11:54:33 -07:00
PieterCK 68c87dbdf8 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.
2024-08-12 11:45:09 -07:00
PieterCK c952e7ae86 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.
2024-08-12 11:45:09 -07:00
adnan-td e95b51098e integration-docs: Update Papertrail the new doc format.
Part of #29592.
2024-08-12 11:43:16 -07:00
adnan-td 164217f7a3 integration-docs: Update PagerDuty to the new doc format.
Part of #29592.
2024-08-12 11:43:16 -07:00
adnan-td 6e08798c02 integration-docs: Update Patreon to the new doc format.
Part of #29592.
2024-08-12 11:43:16 -07:00
adnan-td 83094860b1 integration-docs: Update Pingdom to the new doc format.
Replaced the image to show **Add Integration** with text
instructions.

Part of #29592.
2024-08-12 11:43:16 -07:00
evykassirer 00e74d0de2 search: Move group user remove logic out of input_pill. 2024-08-12 11:37:31 -07:00
Lauryn Menard 96a3d78d86 docs: Update redirecting articles section to note zulip announcements.
When updating the codebase for URL redirects for help center article
renames, we note that the content for zulip update announcements
should keep the old URL/name for the article. It's preferable that
the source code accurately reflect what users received for these
announcments and the redirect will ensure that these links continue
to work.
2024-08-12 11:22:37 -07:00
Lauryn Menard 481fb8e518 help: Rename and redirect allow-image-link-previews article.
Note that the link in zulip_update_announcements.py is not updated
so that the content in the source code reflects what users actually
received in the update announcement message.
2024-08-12 11:22:37 -07:00
Shubham Padia 240e2c87a7 typeahead: typeahead-strong-section should have a font weight of 500.
Fixes https://chat.zulip.org/#narrow/stream/101-design/topic/font.20weight.20in.20typeaheads/near/1911442.
2024-08-12 10:13:15 -07:00
Lauryn Menard d54f747f05 api-docs: Update realm_export event to be clearer about export type.
Clarifies that these events are sent for public data exports of a
realm.
2024-08-12 10:12:08 -07:00
Lauryn Menard 80707d97d9 api-docs: Revise descriptions of RealmExport schema fields. 2024-08-12 10:12:08 -07:00
Vector73 b0bd13207d api_docs: Document "/export/realm" endpoints. 2024-08-12 10:12:08 -07:00
afeefuddin 19b85eb600 user_profile: Convert module to TypeScript. 2024-08-12 09:40:33 -07:00
afeefuddin 243cd7e5fb people: Merge type CrossRealmBot into type User. 2024-08-12 09:40:33 -07:00
afeefuddin fd72b4451a user_profile: Pass undefined instead of an empty object. 2024-08-12 09:40:33 -07:00
afeefuddin 14dbe788ec state_data: Extract custom_profile_field_types_schema from realm_schema. 2024-08-12 09:40:33 -07:00
afeefuddin 706c924e7b user_profile: Pass required parameters in group_edit_url. 2024-08-12 09:40:33 -07:00
afeefuddin 943d70936f settings_profile_fields: Improve parameters of get_external_account_link.
To enhance the readability and operand handling of the
get_custom_profile_field_data function in user_profile, avoid the
unnecessary passing of objects inget_external_account_link.

Instead, pass only the required field_data and value.

Also remove the unnecessary field_type key stored in profile_field in
get_custom_profile_field_data data function.
2024-08-12 09:40:33 -07:00
Bedo Khaled c5f9d27708 docs: Fix typo in sending-messages.md. 2024-08-12 09:32:25 -07:00
Shubham Padia 427e2c5000 dependencies: Upgrade @astrojs/starlight to 0.25.4.
Also ran pnpm dedupe after the upgrade.
2024-08-12 09:30:25 -07:00
Lauryn Menard 4434c871a3 help: Update global time screenshots for icon change. 2024-08-12 09:07:31 -07:00