Commit Graph

58094 Commits

Author SHA1 Message Date
Prakhar Pratyush ac2152fdfd onboarding: Replace channel messages in new organizations.
As a part of improving onboarding experience, this
commit updates the channels and messages initially
available in new orgs.

Fixes #29297.
2024-05-09 14:05:35 -07:00
Prakhar Pratyush 7ea66dbec5 onboarding: Mark channel name for translation.
Mark the channel name of the initial channel created during
realm creation for translation.

It doesn't mark the topic names and description for translation
because we are planning to remove these topics and update the
description as a part of improving the onboarding experience.
2024-05-09 14:05:35 -07:00
Prakhar Pratyush 61e606f656 onboarding: Remove 'core team' private channel.
We no longer create the 'core team' private channel when
a realm is created.

Earlier, "New user announcements" channel was set to the
"core team" channel. Now it is disabled by default.

populate_db still creates the 'core team' channel to
represent a private channel.
2024-05-09 14:05:35 -07:00
Prakhar Pratyush 6baf981aa5 test_import_export: Fix a flaky test due to random reactions added.
The reactions added to messages in the test database are
random in nature, so there is a possibility of any number
of reaction records in the exported user data.

The test now verifies the reaction which was added in the test
itself.

Earlier, the test was assuming the reaction added in the test
is the only record in the exported data.

That would result in a flaky behavior. This commit fixes the
flaky behavior.
2024-05-09 14:05:35 -07:00
Prakhar Pratyush 20fbba6375 test_realm: Fix a flaky test due to random message populated.
The messages populated in the test database are random in nature,
so there is a possibility of any number of messages in
'new_stream_announcements_stream' in 'test_merge_streams'.

Earlier, the test was assuming of exactly one message in that
stream.

That would result in a flaky behavior. This commit fixes the
flaky behavior.
2024-05-09 14:05:35 -07:00
Prakhar Pratyush fd335c06eb test_message_fetch: Fix a flaky test due to random message populated.
The messages populated in the test database are random in nature,
so there is a possibility of more than one resolved topic
messages returned by 'self.get_and_check_messages()' query
in 'test_get_messages_for_resolved_topics'.

That would result in a flaky behavior. This commit fixes the
flaky behavior.
2024-05-09 14:05:35 -07:00
Alya Abbott c1a5b47f41 docs: Add updating /history to release checklist. 2024-05-09 12:40:21 -07:00
Alya Abbott eeaacda4d2 portico: Update /history for 2023. 2024-05-09 12:40:21 -07:00
Tim Abbott 2bf5139d23 tools: Update some exclusion rules. 2024-05-09 12:40:21 -07:00
evykassirer 08c916b337 recent_view_ui: Remove unused second argument to destroy_indicator. 2024-05-09 12:35:49 -07:00
evykassirer 67a15320ad recent_view_ui: Rename list_widget import to match convention. 2024-05-09 12:35:49 -07:00
evykassirer d7cab7c1d4 list_widget: Remove undefined from create's return type. 2024-05-09 12:35:49 -07:00
Alex Vandiver 55c2ad82df version: Update version and changelog following 8.4 release. 2024-05-09 19:07:58 +00:00
Alya Abbott a40210bcbb help: Update suggested text for linking to Zulip. 2024-05-09 11:22:44 -07:00
Aman Agrawal 4efc760c70 recent_view: Fix filter input focused on load.
Since there are no rows to set focus in recent view before initial
fetch, we were falling back to set focus on input filter after
rendering recent view.

Waiting for initial fetch to complete helps us set focus on the
table easily while recent view is also open for user to play with
if the load takes longer.
2024-05-09 11:02:12 -07:00
Mateusz Mandera 9406bfbc0a analytics: Store realm disk space used as a CountStat.
Fixes #29632.

The issue description explains this well:

We currently recalculate `currently_used_upload_space_bytes` every file
upload, by dint of calling `flush_used_upload_space_cache`  on
save/delete, and then immediately calling
`user_profile.realm.currently_used_upload_space_bytes()` in
`notify_attachment_update`.  Since this walks the Attachments table,
recalculating this can take seconds in large realms.

Switch this to using a CountStat, so we don't need to walk significant
chunks of the Attachment table when we upload an attachment.  This will
also give us a historical daily graph of usage.
2024-05-09 10:54:44 -07:00
Mateusz Mandera 4c4a443002 models: Add (realm, create_time) index for the Attachment table. 2024-05-09 10:54:44 -07:00
Mateusz Mandera 224ea3aaed retention: Add .restored_timestamp to ArchiveTransaction.
This is just generally useful for tracking and debugging.
2024-05-09 10:54:44 -07:00
N-Shar-ma 74cdd6148e compose: Fix bug in preview where image at the end would be misaligned.
The `margin-bottom` was removed for the last element in the preview in
e55f5a1b59 to remove vertical shifts when
toggling preview mode, but it is not needed for image / video previews,
so now `margin-bottom` is not set to 0 for the last inline preview.
2024-05-09 10:48:02 -07:00
Alex Vandiver a1a14527db migrations: Update 0516 to handle invites with non-default streams.
We update the existing migration, because any deployment which had
invitations with non-default streams in this state cannot have
proceeded past this migration yet.
2024-05-09 09:41:36 -07:00
Sahil Batra 3f80bc1b41 groups: Allow setting anonymous group to settings while editing.
This commit adds support to set can_mention_group setting to
anonymous group while editing groups.
2024-05-08 18:20:14 -07:00
Sahil Batra 23fdb73353 groups: Allow setting anonymous group to settings while creation.
This commit adds support to set can_mention_group setting to
anonymous group while group creation.
2024-05-08 18:20:14 -07:00
Sahil Batra 206014f263 groups: Update group objects to pass anonymous groups data for settings.
This commit updates code to handle the can_mention_group field
correctly if the setting is set to an anonymous user group.
2024-05-08 18:20:14 -07:00
Sahil Batra 6b68d7e80d user_groups: Update access_user_group_for_setting.
This commit updates access_user_group_for_setting
to support setting anonymous user groups for
different settings.

There are some lines without coverage as of this
commit, but the next few commits would add tests
covering those.
2024-05-08 18:20:14 -07:00
Sahil Batra ce9f4231c7 groups: Fix queries to get members and sugroups for user group objects.
This commit fixes the queries to get members and subgroups for
user group objects returned by user_groups_in_realm_serialized
to not include the UserGroup objects which are not linked to a
NamedUserGroup object, since the function only returns data for
NamedUserGroup objects.
2024-05-08 18:20:14 -07:00
Anders Kaseorg e0f634ae11 poll_widget: Remove handle_events augmentation of jQuery interface.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-08 17:58:58 -07:00
Vector73 ac4dde24ae realm: Add an alias `realm_url` and deprecate `realm_uri` in the API.
The naming `uri` is deprecated while `url` should be used in order to
satisfy URL standards. For this reason, four endpoints are affected:

* The response content of three endpoints `/server_settings`,
`/register` and `/realm` that contain a field `realm_uri` is
changed to `realm_url`.

* In one of the common fields for all mobile push notifications payloads,
`realm_url` field is now added as an alias to `realm_uri`.

For backwards compatibility, we keep the field `realm_uri` and add
an alias `realm_url`.

Co-authored-by: Junyao Chen <junyao.chen@socitydao.org>
2024-05-08 17:39:15 -07:00
Prakhar Pratyush 00474608c5 zulip_update: Send group DM for realm imported from other product.
When the export is NOT generated by another zulip server,
while importing:
* Set the 'zulip_update_announcements_level' to the latest level
as we don't want to send all the older update messages to them.

* Send a group DM to admins, suggesting them to configure the
stream in order to avoid missing future update messages.

Fixes #29041.
2024-05-08 17:05:59 -07:00
N-Shar-ma cb58752909 widgets: Cache event handler instead of entire jquery for each widget.
In 61b3c698af we stopped restoring widgets
from the cache, so the only purpose of the cache remaining was to access
the event handler patched onto the widget jquery.

Now instead of the entire jquery object, we cache just the event handler
since that's the only thing we need from the cache, and do not patch it
onto the widget jquery object.
2024-05-08 16:47:07 -07:00
Prakhar Pratyush cc793612f0 export: Create REALM_EXPORTED audit log for exports via shell.
Earlier, we were creating RealmAuditLog with REALM_EXPORTED
event_type when export of public data took place via organization
settings panel.

We were not creating the audit log when the export was executed
via shell i.e './manage.py export'.

This commit creates the audit log in that case too. It will
help during import to distinguish readily between imports
from another Zulip server vs imports from another product.
2024-05-08 16:16:37 -07:00
Alex Vandiver cf24d2c25e check_send_receive_time: Use time.perf_counter() for duration timing. 2024-05-08 15:51:20 -07:00
Alex Vandiver f42153f670 check_send_receive_time: Use machine.deploy_type to check "staging".
This brings it in line with other locations (e.g. Sentry) and is less
likely to have accidental false-positives.
2024-05-08 15:51:20 -07:00
Alex Vandiver 8bdf1e4a10 check_send_receive_time: Move "states" to inside where they are used. 2024-05-08 15:51:20 -07:00
Alex Vandiver 04e21044b9 check_send_receive_time: Default --site usefully.
This saves us the time of shelling out to a new python process,
loading all of Django, and printing one value we could just have read
in-process.  It is unclear why we ever did it this way.
2024-05-08 15:51:20 -07:00
Alex Vandiver 16a53d08fd default_settings: Set NAGIOS_BOT_HOST to most likely correct hostname.
Using only EXTERNAL_HOST results in:
```
CRITICAL: Error subscribing to Zulips: Account is not associated with this subdomain
```

Since system bots like the nagios bot are created in
`SYSTEM_BOT_REALM`, default to that subdomain of `EXTERNAL_HOST`.
2024-05-08 15:51:20 -07:00
Alex Vandiver cbc9065ed2 check_send_receive_time: Remove no-longer-used "config" option.
This become unused in 927660a7b6.
2024-05-08 15:51:20 -07:00
Alex Vandiver 2bd60e8562 check_send_receive_time: Print no output on success. 2024-05-08 15:51:20 -07:00
Alex Vandiver 294fd914e1 kandra: Fix cron specification, to run once, not every minute from 7-8. 2024-05-08 12:16:36 -07:00
Vector73 8ab526a25a models: Replace realm.uri with realm.url.
In #23380, we are changing all occurrences of uri with url in order to
follow the latest URL standard. Previous PRs #25038 and #25045 has
replaced the occurences of uri that has no direct relation with realm.

This commit changes just the model property, which has no API
compatibility concerns.
2024-05-08 11:12:43 -07:00
Kenneth Rodrigues 0bef960b34 mark unread: Use more efficient endpoint.
Use the "/json/messages/flags" instead of "/json/messages/flags/narrow"
when we have fully fetched the current view.
Update messages on the basis of id instead of updating the entire
narrow.

Fixes #28945.
2024-05-08 10:58:41 -07:00
Alya Abbott f7f55192a5 portico: Update features table to reflect current storage policy. 2024-05-08 10:18:27 -07:00
Aman Agrawal 806ebdf5ad bootstrap_typeahead: Use `fixed` position for typeaheads.
Since the reference for these typeaheads is has a fixed position
unlike say message controls which move on scroll and need to be
repositioned, we can use `fixed` position for typeaheads too so
there is no jumps when user is trying to scroll when a typeahead
is active.

This basically replaces the commit where where we remove `fixed`
as an argument to `Typeahead` library. We can add it later if
any of our typeaheads don't need to be fixed positioned.
2024-05-08 10:05:27 -07:00
Aman Agrawal d1050376e1 bootstrap_typeahead: Fix compose typeahead overflowing when expanded.
When compose box is expanded, typeahead overlfows the top of the window.
We move the typeahead to the bottom of the screen and let
preventOverflow shift it into the visible area.
2024-05-08 10:05:27 -07:00
Aman Agrawal 4e87f35c7d typeahead: Use tippy to position typeaheads without a specified parent.
Except for search typeaheads which have a specific parent container,
we position typeaheads using tippy.
2024-05-08 10:05:27 -07:00
Aman Agrawal 689489573a bootstrap_typeahead: Remove fixed argument.
Tippy uses a different strategy for positioning items, so this
will not be required.
2024-05-08 10:05:27 -07:00
Karl Stolley 12984c9cef selected_message: Adjust light-mode border to specification.
This introduces the alpha described by @terpimost in #22059.
2024-05-08 09:59:40 -07:00
Karl Stolley 7baf3e5e4d selected_message: Correctly express outline colors as variables. 2024-05-08 09:59:40 -07:00
Aman Agrawal 55e6d2fbd0 message_fetch: Vary how much history we fetch based on date range.
To better make use of server load when fetching message history for
users, we limit how much history we fetch in the initial loading
experience based on how much time in the organization's message
history it corresponds to.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2024-05-08 09:47:05 -07:00
Alya Abbott 4a89b61bbe portico: Tweak quote.
This change has been approved by Kevin.
2024-05-08 09:23:18 -07:00
Alex Vandiver 908a805d3e kandra: Change the remaining check_send_receive_time to use zulip::cron.
This was mistakenly left off of 6e981c18d5.
2024-05-08 09:00:45 -07:00