Commit Graph

5553 Commits

Author SHA1 Message Date
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
Varun Singh 884317e407 server_message: Create zod schema to parse message recieved from server.
The commit creates a `server_message.ts` module which
will home our `zod` schema for the messages received
from server. We can then import the schema to parse
the data in needed modules at the API boundaries.
This will also help us write better tests.
2024-07-15 13:55:13 -07:00
Anders Kaseorg 1e9b6445a9 ruff: Fix PLR6104 Use `+=` to perform an augmented assignment directly.
This is a preview rule, not yet enabled by default.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-14 13:49:51 -07:00
Anders Kaseorg b96feb34f6 ruff: Fix SIM117 Use a single `with` statement with multiple contexts.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-14 13:48:32 -07:00
Anders Kaseorg 48202389b8 ruff: Bump target-version from py38 to py310.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-13 22:28:22 -07:00
Anders Kaseorg 3f29bc42b1 ruff: Fix B905 `zip()` without an explicit `strict=` parameter.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-13 22:28:22 -07:00
Anders Kaseorg 0fa5e7f629 ruff: Fix UP035 Import from `collections.abc`, `typing` instead.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-13 22:28:22 -07:00
Anders Kaseorg 531b34cb4c ruff: Fix UP007 Use `X | Y` for type annotations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-13 22:28:22 -07:00
Anders Kaseorg e08a24e47f ruff: Fix UP006 Use `list` instead of `List` for type annotation.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-13 22:28:22 -07:00
Sayam Samal 60d1993ed8 user_card_popover: Redesign popover using the new `popover-menu` theme.
As part of the popover menu redesign, this commit redesigns the user
card popover using the new "popover-menu" tippy theme and improves
accessibility by using appropriate ARIA attributes.
2024-07-12 13:03:40 -07:00
evykassirer 11bb44c7cc search pills: Direct message group pill support.
This supports adding users to DM pills by simply typing
a user's name in the text input directly after a complete
dm pill. It only works for DM pills at the end of search
input.

Clicking the X button removes a user from its user pill
container, and if that user was the last user left in the
container, then the whole container is also removed.
2024-07-09 17:08:45 -07:00
evykassirer 38e58ea3d6 search: Use pills in the search bar.
This initial commit is fairly bare-bones, and does not have the full
contemplated functionality.
2024-07-09 17:08:45 -07:00
Lauryn Menard 32b2eb5f47 documentation: Modify cases of "[a-zA-Z] e\.g\.," for readability. 2024-07-09 13:41:44 -07:00
roanster007 02d0566dc5 refactor: Rename `Huddle` Django model class to `DirectMessageGroup`.
This commit renames the "Huddle" Django model class to
"DirectMessageGroup", while maintaining the same table --
"zerver_huddle".

Fixes part of #28640.
2024-07-07 21:31:30 -07:00
Varun Singh 8236ed8205 emoji_picker: Convert module to TypeScript. 2024-07-07 11:36:38 -07:00
afeefuddin 5ff32c7ad0 user_group_create: Convert module to TypeScript. 2024-07-05 16:17:59 -07:00
Lauryn Menard 3410584094 linter: Add check for comma after "e.g." in md files.
Adds a linter rule for markdown files so that new cases of "e.g."
without a comma wont be introduced to user-facing documentation.

Fixes the remaining cases of "e.g." in markdown files that are not
followed by a comma.
2024-07-05 15:36:24 -07:00
Varun Singh 8409a04c03 user_group_edit_members: Convert module to TypeScript. 2024-07-03 12:34:30 -07:00
roanster007 df68d3cff6 portico: Update screenshots for "for/research" page.
This commit adds the json file and updates screenshots
for the "for/research" page.

Fixes #30128
2024-07-01 16:04:13 -07:00
roanster007 9ad5016cb2 portico: Update screenshots for "for/business", "for/open-source" pages.
This commit updates screenshots for the "for/business" and
"for/open-source" pages, and adds the script for generating
their screenshots at "screenshots/companies.json."

Fixes part of #30128
2024-07-01 16:04:13 -07:00
roanster007 425fa08636 portico: Update screenshots for "for/events" page.
This commit adds the json file and updates screenshots
for the "for/events" page.

Fixes part of #30128
2024-07-01 16:04:13 -07:00
roanster007 5c0db36ffe portico: Update screenshots for "for/education" page.
This commit adds the json file and updates screenshots
for the "for/education" page.

Fixes part of #30128
2024-07-01 16:04:13 -07:00
roanster007 00d127965e portico: Extend the script to generate thread screenshots.
This commit extends the script used to generate thread
screenshots to be able to create invite_only streams,
add starred messages, create user groups, add edited
notice to messages, and send messages from notification
bots.

The window width is updated, and background for the
screenshots is changed to white.

It is also updated so that user-avatars mapping
occurs within the script itself.

This is a prep commit to #30128
2024-07-01 16:04:13 -07:00
roanster007 3aa8b2da40 portico: Add user avatars directory.
This commit adds a user avatars directory, with avatars for some
users, which could be used while generating screenshots.
2024-07-01 16:04:13 -07:00
afeefuddin cb1c293030 compose_popovers: Convert module to TypeScript. 2024-07-01 11:09:12 -07:00
Anders Kaseorg 8e9ead2575 ruff: Fix FURB177 Prefer `Path.cwd()` over `Path().resolve()`.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-30 22:37:15 -07:00
Anders Kaseorg 7b69c93c50 ruff: Fix FURB129 iterate over file object directly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-30 22:37:15 -07:00
Anders Kaseorg 6a73006723 ruff: Fix FURB105 Unnecessary empty string passed to `print`.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-30 22:37:15 -07:00
Sayam Samal 2417155828 theme: Rename dark_theme.ts -> theme.ts.
The dark_theme module now contains logic for light, dark, and automatic
theme switching. Thus, we rename it a more generic name, `theme.ts`.
2024-06-27 16:24:49 -07:00
Anders Kaseorg b115d44b6a requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-27 15:31:43 -07:00
Anders Kaseorg 63c65e6ecd install-transifex-cli: Upgrade Transifex CLI from 1.6.13 to 1.6.14.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 21:34:18 -07:00
Lauryn Menard 673a01ea0c realm-deactivation: Send email to owners as part of deactivation.
Creates a new "realm_deactivated" email that can be sent to realm
owners as part of `do_deactivate_realm`, via a boolean flag,
`email_owners`.

This flag is set to `False` when `do_deactivate_realm` is used for
realm exports or changing a realm's subdomain, so that the active
organization owners are not emailed in those cases.

This flag is optional for the `deactivate_realm` management command,
but as there is no active user passed in that case, then the email
is sent without referencing who deactivated the realm.

It is passed as `True` for the support analytics view, but the email
that is generated does not include information about the support
admin user who completed the request for organization deactivation.

When an active organization owner deactivates the organization, then
the flag is `True` and an email is sent to them as well as any other
active organization owners, with a slight variation in the email text
for those two cases.

Adds specific tests for when `email_owners` is passed as `True`. All
existing tests for other functionality of `do_deactivate_user` pass
the flag as `False`.

Adds `localize` from django.util.formats as a jinja env filter so
that the dates in these emails are internationlized for the owner's
default language setting in the "realm_deactivated" email templates.

Fixes #24685.
2024-06-26 16:48:18 -07:00
Alex Vandiver 08b24484d1 upload: Remove redundant acting_user_profile argument.
This argument, effectively added in 9eb47f108c, was never actually
used.
2024-06-26 16:43:11 -07:00
Alex Vandiver f66b78f6b3 semgrep: Allow zerver.lib.mime_types imports in migrations. 2024-06-26 16:38:01 -07:00
afeefuddin 22a58c739c left_sidebar_navigation_area_popover: Convert module to TypeScript. 2024-06-26 14:08:39 -07:00
Alex Vandiver 92de254764 kandra: Default to installing "production", not "main". 2024-06-24 11:22:17 -07:00
sanchi-t 2d79ce2e93 invite: Replace stream checkboxes list with stream pills.
Introduce an input field with typeahead functionality, initially
populated with the default streams for the organization.

Fixes #26871.
2024-06-22 20:04:28 -07:00
Anders Kaseorg ca5fba258e giphy: Split is_giphy_enabled to a separate module.
This removes giphy from the critical path of the TypeScript migration.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 08:21:08 -07:00
Varun Singh 80cf16a303 stream_edit_subscribers: Convert module to TypeScript. 2024-06-21 09:54:08 -07:00
Alex Vandiver 5ff4d9f88a integrations: Generate avatars using pyvips. 2024-06-20 23:06:08 -04:00
Alex Vandiver 215c22ec3d generate_landing_page_images: Rewrite in pyvips. 2024-06-20 23:06:08 -04:00
Alex Vandiver 0153d6dbcd thumbnailing: Move resizing functions into zerver.lib.thumbnail. 2024-06-20 23:06:08 -04:00
Prakhar Pratyush 0d59ff8c96 docs: Remove 'Hotspots' subsystem doc.
We no longer have 'Hotspots' to introduce users
to important UI elements.

We now use one time banners for it.
2024-06-18 09:39:50 -07:00
Aman Agrawal e3cd3756bc navigate: Convert back to JS.
Need to import message_view which is not migrated to TS yet.
2024-06-17 16:08:51 -07:00
Shubham Padia a98363fe36 help: Do not allow autolinks for help center docs.
mdxjs does not allow autolinks.
See https://github.com/mdx-js/mdx/issues/1049.
We also added a linter check for the same.
Preparatory commit for #30451.
2024-06-17 09:27:19 -07:00
Alex Vandiver 1455a68aef postgresql-init-dev-db: Add missing quotes.
These are necessary if the path contains spaces.
2024-06-16 11:36:58 -07:00
Prakhar Pratyush f5a1869c5b puppeteer_tests: Update the instruction to view generated screenshots.
On puppeteer test failure, screenshots are generated which are
helpful in debugging.

Earlier, the instruction to see those screenshot in github actions
was not the easy way. It linked to a github doc which suggests to
make API calls using artifact ID (which can be confusing to find)
to download the artifact and extract it to see the screenshots.

The easier way is to download the artifact directly using the
download URL present in the "Store puppeteer artifacts" step of
the job.

This commit updates the instruction for the reason mentioned above.
2024-06-14 10:01:40 -07:00
Varun Singh fee7fb6c87 user_group_create_members: Convert module to TypeScript. 2024-06-11 11:58:12 -07:00
Varun Singh 78f105475a stream_create_subscribers: Convert module to TypeScript. 2024-06-11 11:57:46 -07:00
Sayam Samal a7772f86a2 docs: Update CZO links from stream to channel in docs and comments.
Updates all the https://chat.zulip.org/#narrow/stream/ links in the
docs and comments to use the new /channel/ path. All these links are
for documentation/reference purposes only and thus, can be bulk-updated.

This commit is a part of the effort to rename stream to channel.
2024-06-11 10:44:31 -07:00
Anders Kaseorg c9e822f7ad custom_profile_fields_ui: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-07 09:49:40 -07:00
Varun Singh 4ac12022ca navigate: Convert module to TypeScript. 2024-06-06 11:10:05 -07:00
Aman Agrawal f58c586bee narrow: Rename to `message_view`.
This brings it in sync with other libraries like `message_list`
and `message_list_data`.
2024-06-05 12:03:59 -07:00
Alex Vandiver 50c3dd88e6 models: Migrate ids of all non-Message-related tables to bigint.
Migrate all `ids` of anything which does not have a foreign key from
the Message or UserMessage table (and would thus require walking
those) to be `bigint`.  This is done by removing explicit
`BigAutoField`s, trading them for explicit `AutoField`s on the tables
to not be migrated, while updating `DEFAULT_AUTO_FIELD` to the new
default.

In general, the tables adjusted in this commit are small tables -- at
least compared to Messages and UserMessages.

Many-to-many tables without their own model class are adjusted by a
custom Operation, since they do not automatically pick up migrations
when `DEFAULT_AUTO_FIELD` changes[^1].

Note that this does multiple scans over tables to update foreign
keys[^2].  Large installs may wish to hand-optimize this using the
output of `./manage.py sqlmigrate` to join multiple `ALTER TABLE`
statements into one, to speed up the migration.  This is unfortunately
not possible to do generically, as constraint names may differ between
installations.

This leaves the following primary keys as non-`bigint`:
- `auth_group.id`
- `auth_group_permissions.id`
- `auth_permission.id`
- `django_content_type.id`
- `django_migrations.id`
- `otp_static_staticdevice.id`
- `otp_static_statictoken.id`
- `otp_totp_totpdevice.id`
- `two_factor_phonedevice.id`
- `zerver_archivedmessage.id`
- `zerver_client.id`
- `zerver_message.id`
- `zerver_realm.id`
- `zerver_recipient.id`
- `zerver_userprofile.id`

[^1]: https://code.djangoproject.com/ticket/32674
[^2]: https://code.djangoproject.com/ticket/24203
2024-06-05 11:48:27 -07:00
Kislay Verma 2c98263d4c left_sidebar: Rename "more topics" to "all topics".
This commit renames the occurrences of "more topics"
to "all topics" in comments and documentation.

Fixes #30014
2024-06-04 10:18:54 -07:00
Varun Singh 6b42c18220 settings_preferences: Convert module to TypeScript. 2024-06-04 08:50:07 -07:00
Lauryn Menard d911e9b43f i18n-tools: Write a newline when unescaping json data contents.
Updates `tools/i18n/unescape-contents` to write a newline at the end
of the file when updating the json data.
2024-06-04 08:20:24 -07:00
Lauryn Menard 593a1f12b7 i18n-tools: Print locale that's being checked for legacy translations.
Adds a print statement to `tools/i18n/update-for-legacy-translations`
to help with debugging to know what locale was being checked if an
error is raised.
2024-06-04 08:20:24 -07:00
afeefuddin 394e8fc856 navbar_alerts: Convert module to TypeScript. 2024-06-03 12:19:58 -07:00
Vector73 61d7689520 capitalization: Allow `realm_url` in user-facing strings. 2024-06-03 10:07:10 -07:00
Vector73 8d4c42d460 tools: Replace `realm_uri` with `realm_url`.
Replaces `realm_uri` with `realm_url` in "message-screenshot" and "thread-screenshot".

Adds a missing `>` in both files.
2024-06-03 10:07:10 -07:00
afeefuddin 9cf9cec43a compose_call_ui: Convert module to TypeScript. 2024-06-02 21:49:49 -07:00
Aman Agrawal bb6e6ecaa5 hello: Redesign landing page.
Co-authored-by: Vlad Korobov <terpimost@gmail.com>
Co-authored-by: Alya Abbott <alya@zulip.com>
2024-06-02 21:45:37 -07:00
Varun Singh a177d8fa49 settings_streams: Convert module to TypeScript. 2024-05-31 15:19:43 -07:00
Alex Vandiver 87d36d24c9 droplet: Rebuild droplet image with 22.04. 2024-05-30 11:51:44 -07:00
Alex Vandiver 3ae3aba712 droplet: Upgrade to 4GB of RAM and 2CPUs; 2GB is insufficient. 2024-05-30 11:51:44 -07:00
Alex Vandiver b15c3006a0 droplet: Drop unnecesary duplicate steps.
Pasting into "user data" negates the need to copy the script and run it.
2024-05-30 11:51:44 -07:00
evykassirer 28107eb913 message_helper: Be more explicit about converting subject to topic. 2024-05-29 16:45:36 -07:00
Anders Kaseorg 05513c90f0 install-transifex-cli: Upgrade Transifex CLI from 1.6.11 to 1.6.13.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-26 19:27:51 -07:00
Varun Singh f7e1403a12 starred_messages_ui: Convert module to TypeScript. 2024-05-25 17:50:00 -07:00
afeefuddin 8a13bbd953 muted_users_ui: Convert module to TypeScript. 2024-05-24 15:18:35 -07:00
afeefuddin 64d8a18b76 settings_profile_fields: Convert Module to TypeScript. 2024-05-20 11:17:58 -07:00
Mateusz Mandera 27c4e46b30 do_deactivate_realm: Add deactivation_reason kwarg.
It's going to be helpful in the future to record the reason for realm
deactivation.
- For information tracking
- For making a distinction between cases where we can allow realm owners
  to reactivate their realm via a self-serve flow (e.g.
  "owner_request") vs where we can't (ToS abuse).
2024-05-19 23:07:28 -07:00
evykassirer 96c9950115 composebox_typeahead: Convert module to typescript. 2024-05-16 14:53:26 -07:00
Aman Agrawal 7203661d99 support: Set discounted price instead percentage for customers.
This allows us to set the price of a plan exactly as discussed with
the customer.
2024-05-16 02:18:43 -07:00
Anders Kaseorg fba81d1cd5 upload: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-15 10:53:09 -07:00
Anders Kaseorg b132fc50b3 compose_reply: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-15 10:53:09 -07:00
Anders Kaseorg 941e2ae5dc inbox_ui: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-15 10:53:09 -07:00
roanster007 399dfe1499 portico: Generate screenshots for the /for/research page.
This commit utilizes the script added for auto-generating
screenshots of message threads to generate screenshots
for the "/for/recovery" page.

This commit adds the message data for generating the
screenshots.
2024-05-14 16:17:44 -07:00
roanster007 3f8f10fed7 portico: Add script to auto-generate message screenshots /for/research.
Previously, we manually generated screenshots on /for/research
and other landing pages, which makes them difficult to maintain.

This PR adds a script - generate-user-messages-screenshot, which
expects the path of the filename containing the thread conversation
and path where screenshot needs to be generated, and generates
screenshot at the mentioned location.

Fixes #30016
2024-05-14 16:17:44 -07:00
roanster007 0a7c0ea326 refactor: Relocate screenshots scripts to new tools/screenshots dir.
This commit relocates all the scripts in the tools directory which
are used for auto-generating screenshots to the new
tools/screenshots directory to avoid cluttering the tools/ root.
2024-05-14 16:17:44 -07:00
Anders Kaseorg 4d407c6b8d copy_and_paste: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 14:12:05 -07:00
Anders Kaseorg a41d0b16e6 user_topics_ui: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 14:01:04 -07:00
Anders Kaseorg 6479cc5970 unread_ops: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 12:15:44 -07:00
afeefuddin d36e19389d add_subscribers_pill: Convert module to TypeScript. 2024-05-13 16:57:02 -07:00
evykassirer 724306df10 recent_view_ui: Convert module to typescript. 2024-05-13 12:51:00 -07:00
Temidayo32 91bd6e2b12 compose_closed_ui: Migrate module to TypeScript. 2024-05-12 17:41:22 -07:00
Prakhar Pratyush bf2360bcf2 onboarding_steps: Remove hotspot as an onboarding_step.
Earlier, hotspots and one-time notices were the valid
type of onboarding step.

Now, one-time notice is the only valid type.

Fixes #29296.
2024-05-10 12:30:22 -07:00
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
Tim Abbott 2bf5139d23 tools: Update some exclusion rules. 2024-05-09 12:40:21 -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
Alex Vandiver 06543b54b1 backport: Fix the commit-ids that are used.
The commit hashes that appear in the `pull/12345/head` ref are the
ones _before_ any final rebase occurs, and as such may not match to
any commit hashes which exist in `main`.

Use the GitHub GraphQL API to pull the last "merge commit" on the PR,
which is post-rebase, and use that as the target commit when
cherry-picking.  Then walk backwards from that commit, including every
sequential commit which is still associated with the PR; we do this
because during the merge, commits may be added or removed, so the PR
is not reliable in the commit count.
2024-05-06 14:47:22 -07:00
Anders Kaseorg d507706371 zulip_test: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-04 18:55:17 -07:00
Anders Kaseorg fd8b2c557f global: Rename with normal TypeScript module extension.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-04 18:55:17 -07:00
Prakhar Pratyush b17a006bf0 data_import: Remove gitter data import tool.
Gitter broke their older API as part of being integrated
into Matrix.

Their announcement blog says:
"Anything left using the Gitter APIs will need to be
updated to use the Matrix API"

This commit drops the legacy Gitter import tool and
we plan to build a new one for Matrix in future.
2024-05-02 13:25:25 -07:00
Tim Abbott 9bf91d5e1b i18n: Generate legacy stream translation files.
Generated using tools/i18n/create-legacy-stream-translations, which we
also delete in this commit as it will never be run again.
2024-05-02 10:50:24 -07:00
Lauryn Menard d651441f66 i18n: Add scripts for web app legacy "stream" string translations.
Adds tools/i18n/create-legacy-stream-translations to create a
`legacy_stream_translations.json` file for every non-English
language locale that will serve as the legacy translations for
the stream to channel rename.

Adds tools/i18n/update-for-legacy-translations to manage adding
the legacy translations for any stream/channel strings that we'd
like to maintain existing translations for, which are defined in
LEGACY_STRINGS_MAP.
2024-05-02 10:50:24 -07:00
Anders Kaseorg d32d4434dd partial: Replace returns plugin with an annotation.
The returns plugin hasn’t been updated for mypy ≥ 1.6.  This
annotation is more limited in that it only supports a fixed number of
positional arguments and no keyword arguments, but is good enough for
our purposes.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-29 17:14:41 -07:00
Anders Kaseorg a2ffc51807 semgrep: Use fully qualified patterns.
Semgrep understands imports.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-29 13:51:21 -07:00
Alex Vandiver 2ce8d53ac4 semgrep: Add linters for non-concurrent index changes. 2024-04-29 11:00:47 -07:00
Anders Kaseorg 96fbe060a6 python: Mark regexes as raw strings.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-26 12:30:31 -07:00
Anders Kaseorg 5d6927e3f4 install-transifex-cli: Upgrade Transifex CLI from 1.6.10 to 1.6.11.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-25 16:46:03 -07:00
Aman Agrawal 103c37f23a message_list: Don't always cache "Combined feed" view.
Important changes in this commit:
* We only cache message list for "Combined feed" if it is the
  default view.

* We modify existing handling of home message list code so that
  it can be used to for any message list that we want to cache
  using a new `preserve_rendered_state` variable.

* narrow_state.filter() returns the filter of combined feed view  list
  instead of `undefined`.

* We start fetching messages from the latest message on app load.

* Messages in all messages data and Recent view are always synced.

* If combined feed view list is not cached, we don't track it's
  last pointer, effectively sending user to the latest unread
  message always .
2024-04-25 09:20:43 -07:00
Lauryn Menard eb9a142a9e stream-events: Update topic name for stream to channel rename.
In zerver/models/realms.py, updates the topic for stream/channel updates
to be "channel events" instead of "stream events".

Part of stream to channel rename project.
2024-04-24 14:35:05 -07:00
Lauryn Menard 51b3ef8ee3 streams-events: Update notifications for stream to channel rename.
Updates notification messages that are sent to "stream events"
topic when a permission or policy setting is changed to use channel
instead of stream. Also, updates some strings that were not marked
for translation in the message that was sent when the retention
policy was changed.

Updates notification messages that are sent when a stream/channel
is created.

Updates notification messages that are sent when a user is
subscribed to stream/channel(s).

Part of stream to channel rename project.
2024-04-24 14:35:05 -07:00
Lauryn Menard 4dcb0258a5 web-i18n: Update frontend translated strings for stream rename channel.
Updates translated strings in web/ that do not need updates to any
tests. The majority of these strings are also unique to the file/
template that they are in. A few have overlap with one other file.

Some changes here update placeholders/variables in these strings to
no longer use stream so that all the translation updates for this
rename happen at the same time.

The exception to this are cases of "<z-stream>" placeholders in
these translated strings.

Part of the stream to channel rename project.
2024-04-24 14:35:04 -07:00
Lauryn Menard d7f9f8333e web-stream-settings: Update strings for stream rename channel.
Updates a chunk of translated strings that overlap between files,
with the streams settings overlay being the starting point for
finding these strings, to use channel instead of stream.

Part of stream to channel rename project.
2024-04-24 14:35:04 -07:00
evykassirer 0e369e7ff3 compose_send_menu_popover: Rename module to reflect broader uses. 2024-04-20 13:27:25 -07:00
Alex Vandiver d893a2a29e kandra: Install the right PostgreSQL. 2024-04-17 17:31:49 -07:00
Kislay Verma a90f7cce6f settings: Add tooltip to clarify invalid Jitsi URL.
This commit adds a tooltip in organization settings,
when the save button is disabled due to invalid
Jitsi URL.

Fixes #27511.

Co-authored-by: Angelica Ferlin <angelica.ferlin@gmail.com>
Co-authored-by: Peterson Linn <linn@pajp.net>
Co-authored-by: Kislay Verma <kislayuv27@gmail.com>
2024-04-17 15:30:33 -07:00
Alex Vandiver 5654d051f7 worker: Split into separate files.
This makes each worker faster to start up.
2024-04-16 23:00:02 -07:00
Alex Vandiver 57ff573535 topic: Move sqlalchemy methods into their own file.
Loading sqlalchemy can take a significant amount of time, so splitting
these into these own file can be a significant startup-time savings.
2024-04-16 09:48:11 -07:00
Varun Singh ee232bba05 settings_linkifiers: Convert module to TypeScript. 2024-04-13 21:45:44 -07:00
Evy Kassirer 1fe66a238f
build_emoji: Make sure emoji names are supported.
Fixes #19398. (All the other parts were completed a while ago).
2024-04-11 15:36:20 -07:00
Karl Stolley 7291f0a919 info_density: Set font size, line height vars in dev. 2024-04-11 10:25:03 -07:00
evykassirer 16bf8d3df6 views_util: Convert module to typescript. 2024-04-10 12:19:52 -07:00
afeefuddin 61966e9d6e compose_tooltips: Convert module to TypeScript. 2024-04-10 11:17:20 -07:00
tnmkr 2f88b810e0 renumber-migrations: Skip migration 0501.
Security fix cf8b9ad needed migration
`zerver/0501_delete_dangling_usermessages` on the 8.x branch (3db1733).
This resulted in two migrations numbered 0501, due to which this tool
always got stuck on 0501.
2024-04-10 11:15:00 -07:00
Anders Kaseorg 15cec69995 check-openapi: Modernize yargs usage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-08 16:50:56 -07:00
Anders Kaseorg 7d6c5beb19 message-screenshot: Fix commander@12 usage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-08 16:45:47 -07:00
Alex Vandiver 7187146422 install: Move PUPPET_CLASSES env var to --puppet-classes argument.
`--no-init-db` is used to silence the need for `--hostname` and
`--email` arguments; it is a proxy for "this is not a frontend host."
We would ideally like to use `has_class` to know if the user's
provided puppet classes are include an `app_frontend`, and thus
`--hostname` and `--email` are required -- but doing that requires
several other steps, and we would like this feedback to be immediate.

We make the presence of `--puppet-classes` equivalent to
`--no-init-db`, since nearly every configuration with
`--puppet-classes` does not install both a database and a frontend,
which is what is required to initialize a database.
2024-04-04 16:49:43 -07:00
Alex Vandiver 89484fbbe6 install: Remove the hidden VIRTUALENV_NEEDED parameter.
We can do this behaviour better by using `has_roles`.
2024-04-04 16:49:42 -07:00
evykassirer d6f4424102 compose_actions: Convert module to typescript. 2024-04-04 16:34:42 -07:00
afeefuddin b32c837c6b settings_playgrounds: Convert module to TypeScript. 2024-04-04 10:45:53 -07:00
Anders Kaseorg 8fb1117cef eslint: Fix no-jquery/no-append-html errors that need test changes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-04 10:11:57 -07:00
Anders Kaseorg 92bc2df4bb lint: Quiet the Ruff formatter.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-03 15:34:02 -07:00
Tanmay Kumar fbb42dd297
tools: Fix broken link in check-frontend-i18n.
The section referenced was moved to another page.
2024-04-03 13:13:16 -07:00
Temidayo32 25ff0d4418 compose_recipient: Convert module to TypeScript. 2024-04-03 13:08:10 -07:00
Anders Kaseorg 15e2a67893 dev-vagrant-docker: Fix PostgreSQL version.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-02 17:02:20 -07:00
afeefuddin a283a19c9f stream_color_events: Convert module to TypeScript. 2024-04-02 14:55:30 -07:00
Anders Kaseorg 89b3129d48 documentation_crawler: Consider status.zulip.com external.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-02 14:08:24 -07:00
Anders Kaseorg 6e871e7731 ruff: Fix UP036 Version block is outdated for minimum Python version.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-01 18:32:52 -07:00
afeefuddin fd970e0520 user_group_components: Convert module to TypeScript. 2024-04-01 17:32:48 -07:00
Anders Kaseorg 70914b0475 Remove support for Ubuntu 20.04 and Debian 11.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2024-04-01 13:27:39 -07:00
Anders Kaseorg ce075fec6c ci: Move specialized tests away from Ubuntu 20.04 and Debian 11.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2024-04-01 13:27:39 -07:00
Anders Kaseorg e535c96e40 Upgrade development environment to Ubuntu 22.04.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2024-04-01 13:27:39 -07:00
evykassirer bedbaa3a41 message_view_header: Convert module to typescript. 2024-04-01 13:22:39 -07:00
evykassirer 9c055df695 settings_user_topics: Convert module to typescript. 2024-03-30 16:25:34 -07:00
evykassirer a43e9140f2 search: Convert module to typescript. 2024-03-30 15:27:02 -07:00
evykassirer c7b12c996c typeahead: Convert module to typescript.
This contains two more complex changes:

- The default versions of sorter and matcher assume that ItemType is a
string. But the Typeahead class works on a generic ItemType and I'm
not aware of a way to assert that this function is only called for
typeaheads with string items. For `matcher`, we can assert that the
items are strings. `sorter` is now a required option instead of an
optional one that could fall back to the default.

- `element` can be either an `input` element or a `contenteditable`
`div`. We distinguish between them using `.is("[contenteditable]"))`
but TypeScript doesn't understand that. So we replaced `this.$element`
with `this.input_element` where `input_element` is an object with the
`$element` and also a `type` specifying which type of element it is
(input or contenteditable).
2024-03-30 10:41:38 -07:00
evykassirer 5bcb4e55d8 desktop_notifications: Convert module to typescript. 2024-03-29 16:16:47 -07:00
adnan-td 87dee7a9b2 invite_user_modal: Replaced email text_area with input_pill.
This makes the widget considerably more attractive, and probably a bit
more usable.

Fixes #29391.
2024-03-29 11:13:03 -07:00