Commit Graph

5495 Commits

Author SHA1 Message Date
Anders Kaseorg 97ffccb45f reload: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-18 15:31:41 -07:00
Lauryn Menard 52bc47a870 activity: Add view for a remote server's audit logs.
Links to the audit log view via the remote support view in the
remote server information section after the user counts.
2024-09-17 09:34:17 -07:00
Tim Abbott 3514cbd7e8 renumber-migrations: Avoid crashing with squashed migrations. 2024-09-13 18:44:58 -07:00
evykassirer e41e365085 message_list_view: Convert module to typescript. 2024-09-11 14:59:31 -07:00
Alex Vandiver 38053e9c7c emoji: Convert spritesheets to webp.
This provides significant size savings:

| Emoji set   | png size | webp size | webp/png percent |
| ----------- | -------- | --------- | ---------------- |
| google-blob |  1968954 |   1373350 |           69.75% |
| twitter     |  2972820 |   2149672 |           72.31% |
| google      |  3455270 |   2327834 |           67.37% |

Since these are the largest assets that we ship to clients, it is
worth shaving off every byte we can.
2024-09-11 09:03:47 -07:00
Alex Vandiver a2517e1115 build-emoji: Reorganize /srv/zulip-emoji-cache.
This more explicitly splits out the files bound for web/generated/ from
those bound for static/generated/.
2024-09-11 09:03:47 -07:00
opmkumar 719518baba popovers: Add stream-info-popover when channel pill is clicked.
Shows a stream info popover whenever a channel pill is clicked (such
as in the pill widgets for adding subscribers to a channel or
invitations). The stream info popover contains channel icon and name,
channel description and a link to channel settings.

Fixes #30567.
2024-09-10 16:16:53 -07:00
Varun Singh d6c34f64dd tests: Use `make_user` & `make_bot` to create test user & bot. 2024-09-10 16:02:35 -07:00
Aman Agrawal 5b9a2584c5 message_list_data_cache: Cache MessageListData objects.
We start caching MessageListData objects for the narrows which
user has visited. We restore the cached objects if the filters
match. Also, the cached objects are updated based on events. One
major piece is update path the is pending implementation is the
message move code path.
2024-09-10 15:58:15 -07:00
joseph 5d3edf06c8 message_edit: Ask users to delete attachments after editing.
currently, after a user edits a message and removes an reference to the
uploaded file, the uploaded file stays on the storage taking up space.
We want to ask the user to possibly delete the removed attachments if
they are no longer needed. These changes applies a modal that will appear
prompting the user to delete the attachments.

Fixes: #25525.

Co-authored-by: brijsiyag
Co-authored-by: wandrew0
2024-09-06 11:40:51 -07:00
Kenneth Rodrigues dc32396180 endpoints: Remove the has_request_variables decorator.
All endpoints have been migrated to the typed_endpoint decorator,
therefore the has_request_variables decorator and the REQ function are
no longer needed and have been removed.
2024-09-05 16:02:12 -07:00
Anders Kaseorg 91ade25ba3 python: Simplify with str.removeprefix, str.removesuffix.
These are available in Python ≥ 3.9.
https://docs.python.org/3/library/stdtypes.html#str.removeprefix

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-03 12:30:16 -07:00
Anders Kaseorg 8b147d92a8 apt-repos: Use PGroonga binaries on Ubuntu 24.04.
These did not exist when we first added Ubuntu 24.04 support; now they
do.  Fixes #31261.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-08-29 16:04:44 -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 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
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 d67831ba4b run-dev: Remove unnecessary compress=False for aiohttp.
This seems to have been unnecessary since aiohttp 2, and now causes a
type error.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-08-24 19:44:38 -07:00
Tim Abbott f4d98b03d5 migrations: Squash zerver migrations.
This has the impact of making rebuilding the database in a Zulip
development environment, or initializing a new production database,
dramatically faster.

This was generated by merging the output of `manage.py makemigrations`
with an empty migration.

Tested using `tools/rebuild-test-database` before and after this
change, and comparing the output of `pg_dump -d zulip_test` using
Git's diff comparison algorithm. Differences in that SQL dump include:

- The actual generated table contents, due to timestamps and the like;
  this is expected and unrelated to schema.

- Orders of fields within tables, which is not significant in SQL.

- IDs assigned to tables in the ContentType table, which is expected
  and not a problem with how that Django table is designed.

- Names of generated indexes and constraints; modern Django seems to
  abbreviate long names differently for these, and it's not obviously
  possible to configure those used by the `db_index` property. If
  necessarily, likely this can be converged via a migration filled
  with `IF EXISTS` rename operations like the one done in
  zerver/migrations/0246_message_date_sent_finalize_part2.py.

- Names of the ~3 sequences related to renamed tables:
  usertopic/mutedtopic, botconfigdata/botuserconfigdata,
  realmdomain/realmalias. Probably there's no action required here,
  but we could do rename operations if desired.
2024-08-23 17:15:35 -07:00
afeefuddin f013eb1037 message_fetch: Convert module to TypeScript. 2024-08-23 13:34:13 -07:00
afeefuddin 17e2d46760 message_store: Rewrite RawMessage type using Zod.
This commit rework RawMessage and it's related type to use
Zod for parsing the data received from the server.
2024-08-23 13:34:13 -07:00
Varun Singh f148a7a3ed popover_menus_data: Convert module to TypeScript. 2024-08-23 13:10:50 -07:00
Varun Singh 2cf09602df todo_widget: Convert module to TypeScript. 2024-08-23 12:30:27 -07:00
afeefuddin be9d879682 settings_bots: Convert module to TypeScript. 2024-08-21 08:28:40 -07:00
Kenneth Rodrigues 86bf0d3ea3 decorators: Migrate to typed_endpoint.
Modify `semgrep-py.yml` to treat arguments after `*args` as
keyword-only arguments.
2024-08-20 10:15:30 -07:00
Alex Vandiver 64516ab9f4 install-aws-server: Output tsh ssh command, not ssh. 2024-08-20 10:04:40 -07:00
Alex Vandiver a5a898ba21 install-aws-server: Switch to 24.04. 2024-08-20 10:04:37 -07:00
Alex Vandiver 3adedc9545 install-aws-server: Set the name of the root EBS volume. 2024-08-20 10:03:59 -07:00
evykassirer b1198785be message_edit: Convert module to typescript. 2024-08-19 16:33:04 -07:00
Vector73 80969a62e6 settings: Add `can_delete_any_message_group` setting.
Fixes #30717.
2024-08-15 12:03:49 -07:00
Varun Singh d8dd682944 echo: Convert module to TypeScript. 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
afeefuddin 19b85eb600 user_profile: Convert module to TypeScript. 2024-08-12 09:40:33 -07:00
Shubham Padia 72f7a13346 tools: Add option for help center dev server.
Fixes #30451.
In a case that both `--help-center` and `--help-center-dev-server`
flags are passed to `run-dev`, `--help-center` flag will take
precedence without throwing any error.
2024-08-02 18:18:01 -07:00
Shubham Padia 7dfe68e0a2 run-dev: Add option to host help center with starlight.
We also add a script called `build-help-center` that is required
to build the starlight documentation. If the `help-beta/dist` dir
is not present, `run-dev` will show an error message but will not
fail.
2024-08-02 18:18:01 -07:00
Shubham Padia dd9cfb5bdd tools: Add script to convert .md files to .mdx.
This is the tool that we will consistently use for our project to
migrate our help center to use starlight.
We're only doing string manipulation in this tool for now, we will
start to use existing markdown preprocessors whenever appropriate
as we start to add support for different components.
Running the tool again will overwrite the existing files.
2024-08-02 18:18:01 -07:00
roanster007 7b3e163d55 refactor: Rename `huddle` to `direct_message_group` in non api files.
This commit completes rename of "huddle" to "direct_message_group"
in all the non API files.

Part of #28640
2024-07-31 23:25:56 -07:00
Varun Singh 8570cd81b1 message_events_util: Convert module to TypeScript. 2024-07-31 14:33:11 -07:00
Alex Vandiver 7ad773d79d ci: Backport #29443 to 8.0 so it installs. 2024-07-26 14:25:49 -07:00
Anders Kaseorg cd4052cf8a release: Parse version.py using the language it was written in.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-25 13:17:49 -07:00
Tim Abbott 966fe68591 emoji: Fix canonical name for folded_hands emoji.
The more neutral folded_hands is the official name and should make
folks more confortable with using this for thank_you, which is
certainly a more common use in work contexts than pray.
2024-07-24 22:44:33 -07:00
Anders Kaseorg edf34ada63 util: Rename clean_user_content_links to postprocess_content.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-23 13:26:37 -07:00
Mateusz Mandera 8f461b3c03 email_mirror: Change default topic name if subject ends up empty.
If the email subject is something like `Fwd:`, it gets stripped to an
empty string, activating the "(no topic)" override. This however leads
to failure if the organization enables the setting forcing every message
to have a topic. Such emails should still go through, so we should just
change the topic value used.
2024-07-22 22:31:45 -07:00
Niloth P 16abd82fa5 integrations: Remove Solano integration. 2024-07-20 15:44:17 -07:00
Anders Kaseorg 97753fe3b0 emoji_names: Rebuild with CLDR 45, emoji-data 15.1.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-17 22:49:52 -07:00
Anders Kaseorg e0208784ea docs: Update Black and isort references to Ruff.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-17 18:33:21 -07:00
Anders Kaseorg 1fd3f983a5 data_import: Remove int detection from IdMapper.
This seems to have been used only for HipChat.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-17 15:56:00 -07:00
Alex Vandiver ab6b6639e6 migrations: Derive emoji content-type from the bytes. 2024-07-17 11:39:04 -07:00
Prakhar Pratyush 3090247221 process_from_server: Fix message sent in search view not appearing.
Earlier, on sending a new message in a search view it didn't
appear in that view for the sender.

This was because the message event received by the sender
was processed by 'msg_list.view.rerender_messages' which
effectively did nothing because the message is not
rendered in the first place during local echo in that
message list view.

We can't determine locally if the message should be added
to the search narrow. So, we use maybe_add_narrowed_messages
when narrowed to such views.

This fixes the bug and the message appears in the search view.
2024-07-17 11:35:47 -07:00
Alex Vandiver 556b92810b thumbnail: Advertize the thumbnail formats at client registration. 2024-07-16 13:22:15 -07:00