Commit Graph

60345 Commits

Author SHA1 Message Date
Shubham Padia e9d0e1d30d css: Use flexbox for .stream-row and .group-row.
Before this, we were having each direct child div for both the classes
as inline blocks. It is better to just have `display: flex` on the
parent element instead. There is a slight change in appearance which has
been confirmed in
https://chat.zulip.org/#narrow/stream/6-frontend/topic/Subscription.20list.20slight.20look.20change/near/1906254
2024-08-13 22:36:35 -07:00
Shubham Padia b619fbb7a7 css: Remove unused css for top-bar & bottom-bar for subscriptions.css.
These were added in ae7fe85ec5, and
should have been deleted in 333b8b095c.

Having those rules did not make any difference to the subscription and
user group list items.
2024-08-13 22:36:35 -07:00
Shubham Padia 52240e09ff css: Use classname for .thanks-page instead of div.
Having the `div` selector there affects the performance. See
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719
for more details.
2024-08-13 22:36:35 -07:00
Shubham Padia a48ce954aa rendered_markdown: Remove unused .data-container div css.
Having that css there or not did not make any visual difference.
2024-08-13 22:36:35 -07:00
Shubham Padia 996a091bd9 css: Use class_name for .client-logos div.
Having the `div` selector there affects the performance. See
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719
for more details.
We've introduced a new class called `.client-logos-div`.
In `hello.ts` we just manually append the name of this new class for the
logo changing logic since that felt more readable than adding the class
programmatically.
2024-08-13 22:36:35 -07:00
Shubham Padia f0e484ea07 app_components: Remove unused div selector css.
Having the styling there or not did not make any difference visually to
either of the drafts, scheduled messages or edit history overlays.
2024-08-13 22:36:35 -07:00
Alex Vandiver 8e1582d82e support: Reject attempts to approve sponsorship for deactivated orgs. 2024-08-13 20:29:02 -07:00
evykassirer 1806c390c1 search: Navigate results with up/down when input is focused.
What was happening:

* Focus being in the search input text box made Up/Down be handled
  by the browser and move the cursor. This is default browser behavior,
  and not useful to us (you can use home/end for the same goal, but
  also one just doesn't put much text in that input given the pills
  system).
* We probably don't want to push keyboard focus out of the search box
  after completing a search, since that would make it annoying to type
  a new search term or whatnot.

The fix is to just make the existing Up/Down keyboard handler apply
even if the search input is focused.

More context here:

https://chat.zulip.org/#narrow/stream/9-issues/topic/Can't.20navigate.20search.20results.20using.20the.20keyboard.20.2331291/near/1913535
2024-08-13 19:09:20 -07:00
Shubham Padia 5ffb75387a typeahead: Change color for the right hand side option label.
Fixes
https://chat.zulip.org/#narrow/stream/101-design/topic/UI.20redesign.3A.20new.20topic.20indicator.20in.20typeaheads/near/1908770.
We could have made this change specific to the option label for
composebox typeahead only, but I don't see a scenario where all the
other colors are the same for another typeahead but the right option
label color is different. Currently, the option_label is only used in
composebox typeahead, so visually this commit will only affect that
typeahead.
2024-08-13 18:28:32 -07:00
Shubham Padia 10da3e3626 typeahead: Give appropirate name to option label container.
The class was named `typeahead-option-label` for the element containing
the actual option label. We renamed it to
`typeahead-option-label-container` to give it a more appropriate name.
2024-08-13 18:28:32 -07:00
Varun Singh d8dd682944 echo: Convert module to TypeScript. 2024-08-13 09:37:35 -07:00
Varun Singh 3dd8a4c6d5 echo: Fix incorrect check for message `topic`.
The actual check should be for `falsy` (to handle empty string)
and not undefined, since topic is an empty string for
private messages.
2024-08-13 09:37:35 -07:00
Varun Singh 2e12d3cd25 user: Drop `is_mirror_dummy` field from 'user' object. 2024-08-13 09:37:35 -07:00
Varun Singh 126d4fb137 echo: Remove support for zephyr mirroring. 2024-08-13 09:37:35 -07:00
Varun Singh 3d01ccbbd5 server_events: Parse `message` recieved from server. 2024-08-13 09:37:35 -07:00
Varun Singh 7d0ea7e1e3 server_message: Stop reading `user` field in `reaction` object.
This is now deprecated. We rely on `user_id` post Zulip 3.0
2024-08-13 09:37:35 -07:00
Varun Singh f5d71fa320 server_message: Remove from `EXEMPT_FILES`. 2024-08-13 09:37:35 -07:00
evykassirer 8b19726b82 stream_pill: Use stream id instead of stream name. 2024-08-13 09:04:59 -07:00
Alex Vandiver 6ff2246daa static: Only run CompressionPlugin in production. 2024-08-13 09:01:06 -07:00
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