Commit Graph

5440 Commits

Author SHA1 Message Date
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