Commit Graph

4739 Commits

Author SHA1 Message Date
Anders Kaseorg 4fb97576e9 run-codespell: Update codespell exclude list.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-30 17:36:21 -07:00
Aman Agrawal 379c6acbea portico: Add page to list open organizations.
Fixes #22020
2022-08-30 16:02:06 -07:00
Lauryn Menard 8a20884230 tippy: Initialize tippy in portico.
As a prep-commit for updating the billing / corporate pages for
demo organizations, initialize tippy.js with a default setting
for portico pages to use in general.
2022-08-29 11:43:45 -07:00
evykassirer efee77b41f emoji: Add which emoji are supported to the /register call.
Fixes #21037.

This is part of fixing #19371. To bulk-add new emoji regularly,
mobile needs to know which servers support which emoji.
`staticfiles_storage.url` generates a unique URL with a hash
based on the file content, which lets mobile know if it needs
to update its locally stored data.
2022-08-26 17:58:31 -07:00
Anders Kaseorg 81d0f5bdd9 computed_settings: Set STATICFILES_DIRS to an existing absolute path.
Django has always expected this, but Django 4.0 added a system check
that spews warnings in production.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-26 15:55:59 -07:00
Adam Sah c6130ce4b1 email_notifications: Complete test coverage for module.
Following the last commit, there was this WELCOME_EMAIL_SENDER code
without an existing automated test.
2022-08-25 13:04:51 -07:00
Tim Abbott b8c362c991 release: Don't remove OUTPUT_DIR on exit.
This ends up deleting your local copy of the release tarball, which
can be annoying if you need to upload it manually to the GitHub
releases page.
2022-08-25 12:50:40 -07:00
Tim Abbott c07212ad60 release: Fix pushing new release tags. 2022-08-25 12:50:39 -07:00
Adam Sah b1293a84f8 testing: 100% coverage for zerver/webhooks/{librato,pivotal}. 2022-08-25 12:04:24 -07:00
David Rosa 5cac44be06 docs: Reorganize sections and pages about contributing to Zulip.
We should rearrange Zulip's developer docs to make it easier to
find the documentation that new contributors need.

Name changes
Rename "Code contribution guide" section -> "Contributing to Zulip".
Rename "Contributing to Zulip" page -> "Contributing guide".

Organizational changes to the newly-named "Contributing to Zulip":
Move up "Contributing to Zulip", as the third link in sidebar index.
Move up renamed "Contributing guide" page to the top of this section.
Move up "Zulip code of Conduct", as the second link of this section.
Move down "Licensing", as the last link of this section.
Move "Accessibility" just below "HTML and CSS" in Subsystems section.

Update all links according to the changes above.
Redirects should be added as needed.

Fixes: #22517.
2022-08-25 11:24:57 -07:00
Purushottam Tiwari c0acffb8a8 user groups: Set up right panel for user group edit.
This is preparatory commit that does basic UI set up for
user group edit in group settings overlay. This allows us to
write proper hashchange logic for user group settings overlay
under diffrent situations.
The work in this commit will be extended in further commits
to add proper UI and group edit logic.
2022-08-23 17:40:02 -07:00
Purushottam Tiwari a8c3be7fee user groups: Add new UI support for user group creation.
Add support for creation of user groups using right panel
of new user group settings overlay being developed as part
of https://github.com/zulip/zulip/issues/19526.

In further commits we will add support for editing user
groups using right panel of the overlay.

This commit also introduces a minor bug related hashchange
for #groups which would be a quick fix once we have UI
for group edit on #groups overlay.
2022-08-23 17:40:02 -07:00
Purushottam Tiwari 76aae8c5a0 user groups: Add user group rows in left for user group overlay. 2022-08-23 17:30:39 -07:00
Purushottam Tiwari 656f6a0fe9 user groups: Add overlay for user group settings.
Dedicated overlay for user group settings is added as part of
addressing zulip#19526.

The newely added overlay is currently empty and more UI
related to settings is to be added in further commits.
2022-08-23 17:30:39 -07:00
Purushottam Tiwari ff2db9c235 user groups: Rename settings_user_groups to settings_user_groups_legacy.
A preparatory commit to have legacy user group settings logic
as we move forward to redesign the user group settings.

This is done so that current user group settings are functional
while we are working on the redesign, and also to make it clear
that most of the code in this file will be deleted and developers
should avoid spending much time on it.
2022-08-23 17:30:39 -07:00
Tim Abbott de275da70a release: Fix OUTDIR typo.
This was missed in 58962f0b7b.
2022-08-22 22:40:01 -07:00
Aman Agrawal ef21f9107c urls: Move /hello files to the corporate folder. 2022-08-22 15:53:43 -07:00
Aman Agrawal c9ac233911 urls: Move /team files to the corporate folder. 2022-08-22 15:53:43 -07:00
Aman Agrawal 4a9b4fb91b urls: Move /features files to corporate folder. 2022-08-22 15:53:43 -07:00
Aman Agrawal afd31b739d templates: Move case-studies and /for pages to corporate folder.
Since these pages don't belong in a self-hosted server.
2022-08-22 15:53:43 -07:00
Anders Kaseorg dad0d51ada node_tests: Reenable asynchronous event_status test.
Fixes #20180.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 08:55:31 -07:00
Ganesh Pawar e758ec400b alert word: Convert inline form to modal. 2022-08-15 19:07:38 -07:00
Dinesh 48d2783559 read_receipts: Add support for displaying read receipts.
Adds an API endpoint for accessing read receipts for other users, as
well as a modal UI for displaying that information.

Enables the previously merged privacy settings UI for managing whether
a user makes read receipts data available to other users.

Documentation is pending, and we'll likely want to link to the
documentation with help_settings_link once it is complete.

Fixes #3618.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2022-08-12 13:16:35 -07:00
Julia Bichler 0a278c39d2 settings: Send email after deactivating user.
This adds a feature where an admin can choose to send an email
with custom content to an user after they deactivated them.

Fixes #18943.
2022-08-06 21:41:53 -07:00
Anders Kaseorg 707ae0e7c1 Revert "provision: Binary-patch OpenSSL ARM64 assembly bug."
This reverts commit 924df5aaf5.

The fix was released in Ubuntu 20.04 and Debian 11.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-05 22:45:46 -07:00
Anders Kaseorg 2508b579a6 upload: Replace boto3.Session with boto3.session.Session.
boto3-stubs seems to have dropped the former for some reason.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-30 06:46:34 -07:00
Anders Kaseorg b945aa3443 python: Use a real parser for email addresses.
Now that we can assume Python 3.6+, we can use the
email.headerregistry module to replace hacky manual email address
parsing.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-29 15:47:33 -07:00
Zixuan James Li 62cbacbfe7 test_runner: Write failed tests with a side effect.
`DiscoverRunner.run_tests` has a return type of `int`. While
`Runner.run_tests` has a wildly different `Tuple[bool, List[str]]`.

This refactors it so that we have the correct return type, by passing
the additional information about failed tests through a side effect to directly
write the failed tests to a file.

Note that we have to make `failed_tests_path` optional as otherwise the method
signature will not be compatible with the supertype.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-07-29 13:59:30 -07:00
Zixuan James Li f88530575a test-backend: Cast test runner to the custom Runner type.
Mypy does not know the acccurate return type of `get_runner` that is
determined by the `TEST_RUNNER` setting. We need to cast it to the
correct type to use methods like `get_shallow_tested_templates`. Note
that we import conditionally to avoid adding runtime dependency on
`zerver`.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-07-28 09:48:16 -07:00
Anders Kaseorg a2f43beef4 commit-message-lint: Take release branches into account.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-22 10:39:05 -07:00
Matt Keller 44e93613fb tools: Add executable bit to release tool. 2022-07-21 19:08:10 -07:00
evykassirer afab7002bf emoji: Add script to generate emoji_names.py, only with custom names.
This script pulls from our previously custom-written emoji strings
to prepare to fill in the rest from CLDR.

This commit has no user-facing changes.
2022-07-21 13:22:07 -07:00
evykassirer 190c0737a7 emoji: Store customized emoji in file separate from emoji_names.py.
Emoji that we specifically choose names or aliases for will be
stored in this new file so that we can generate emoji_names.py
from the custom names and also CLDR (for the rest).

This new file isn't used for anything yet (no user facing change);
it will be used in future commits.
2022-07-21 13:22:07 -07:00
Anders Kaseorg 412e90f601 provision: Avoid distutils; keep PROVISION_VERSION as a tuple.
distutils is deprecated in Python 3.10 and will be removed in Python
3.12.  We don’t need a full-powered version parser for this anyway.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-20 22:03:30 -07:00
Alex Vandiver 58962f0b7b release: Use the right variable to build predictable tarball path.
`tools/build-release-tarball` respects `OUTPUT_DIR`, not `OUTDIR`.
2022-07-19 17:29:03 -07:00
Alex Vandiver 39efe6f312 ci: Remove references to CircleCI, which we no longer use. 2022-07-16 10:43:40 -07:00
Alex Vandiver f8e2d652e1 ci: Test upgrades from the minimum of each major version, not the max. 2022-07-16 10:43:40 -07:00
Zixuan James Li 3404282927 tail-ses: Add IdentityArgsDict.
This fixes having incompatible types of different items in
the dictionary, and makes `**identity_args` type-safe.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-07-15 13:49:11 -07:00
Anders Kaseorg c520890f54 node_tests: Remove low-hanging uses of __Rewire__.
When we were preparing the conversion to ES modules in 2019, the
primary obstacle was that the Node tests extensively relied on the
ability to reach into modules and mutate their CommonJS exports in
order to mock things.  ES module bindings are not mutable, so in
commit 173c9cee42 we added
babel-plugin-rewire-ts as a kludgy transpilation-based workaround for
this to unblock the conversion.

However, babel-plugin-rewire-ts is slow, buggy, nonstandard,
confusing, and unmaintained.  It’s incompatible with running our ES
modules as native ES modules, and prevents us from taking advantage of
modern tools for ES modules.  So we want to excise all use of
__Rewire__ (and the disallow_rewire, override_rewire helper functions
that rely on it) from the tests and remove babel-plugin-rewire-ts.

Commits 64abdc199e and
e17ba5260a (#20730) prepared for this by
letting us see where __Rewire__ is being used.  Now we go through and
remove most of the uses that are easy to remove without modifying the
production code at all.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-13 16:27:30 -07:00
Anders Kaseorg 81892df176 requirements: Upgrade to Django 4.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-13 16:07:17 -07:00
Ganesh Pawar c6d636ef48 realm_domains_modal: Migrate modal to dialog_widget. 2022-07-07 14:56:45 -07:00
Alex Vandiver c915400101 release: Write a tool to automate final release checks and steps. 2022-07-07 13:19:00 -07:00
Alex Vandiver d9958618a9 build-release-tarball: Use OUTPUT_DIR environment variable, if set. 2022-07-07 13:19:00 -07:00
Alex Vandiver 2d132bf342 build-release-tarball: Verify full releases are tagged and pushed.
This ensures that anything that looks like a full release will
identify itself as such.  It requires that the version have a tag at
the current commit (though it doesn't need to be pushed yet), as well
as the commits exist in `main` or a release branch in the remote.
2022-07-07 13:19:00 -07:00
Zixuan James Li b3f27b1843 mypy: Enable local_partial_types.
dmypy is innately incompatible with `local_partial_types` being
`False` as it uses fined-grained incremental mode for caching.

We need to enable `local_partial_types` for mypy as well so that the two
will behave the same way.

This requires us to add additional type annotation in certain siuations
but that's fine.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-07-06 17:33:13 -07:00
Zixuan James Li bf9f9c8b5d tools: Support running mypy daemon for better performance.
mypy daemon performs significantly better than running the regular
mypy cli tool when we type check the entire codebase multiple
times locally.

This adds running mypy daemon as an option for both
`tools/run-mypy` and `tools/lint`.

To ensure daemon messages like "Daemon started", "Daemon stopped"
won't get printed we filter any output that starts with "Daemon".

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-07-06 17:33:13 -07:00
Zixuan James Li ea3478e377 tools: Extract ROOT_DIR.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-07-06 17:33:13 -07:00
Anders Kaseorg e4e51b0eb4 install-shfmt: Upgrade shfmt from 3.5.0 to 3.5.1.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-06 17:23:16 -07:00
Anders Kaseorg feff1d0411 requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-05 17:54:17 -07:00
Alex Vandiver aabbb2ad10 bootstrap-awscli: Leave CWD unchanged. 2022-06-28 09:39:31 -04:00