Commit Graph

48400 Commits

Author SHA1 Message Date
David Rosa 33a618d169 integrations: Add generic bot macro to relevant docs.
There are a handful of integration docs that instruct users to create
a bot and select the "Generic bot" type without using a helper macro.

Adds a new macro to replace these instructions, including a screenshot
of the latest UI for selecting a bot type.
2022-09-09 16:31:33 -07:00
David Rosa 620854d437 integrations: Add incoming webhook macro to relevant docs.
Several integration docs instruct the user to create a bot, but don't
specify that the type of bot should be "Incoming webhook".

Renames create-a-bot.md -> create-an-incoming-webhook.md for clarity,
and replaces all incomplete instructions with this macro.
Renames bot_types.png -> bot_types_incoming_webhook.png and updates
the image with a screenshot of the latest UI.
2022-09-09 16:31:33 -07:00
David Rosa 217915a50c integrations: Remove "Yo".
The Yo company shut down in 2016.
https://en.wikipedia.org/wiki/Yo_(app)#History

Removes `yo` instances from `zerver/lib/integrations.py`.
Removes `zerver/webhooks/yo`.
Removes `static/images/integrations/yo-app`.
2022-09-09 16:31:33 -07:00
Raghav Luthra 4dad9fa158 user_settings: Add user setting to control the user list style.
Added a user_list_style personal user setting to the bottom of
Settings > Display settings > Theme section which controls the look
of the right sidebar user list.

The radio button UI includes a preview of what the styles look like.

The setting is intended to eventually have 3 possible values: COMPACT,
WITH_STATUS and WITH_AVATAR; the final value is not yet implemented.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2022-09-09 16:30:54 -07:00
Tim Abbott 5f626428de realm_user_settings_defaults: Fix alphabetization of fields. 2022-09-09 16:30:54 -07:00
Mateusz Mandera 95bc77ae4f help center: Update "SAML authentication" to follow help center guidelines.
Co-authored-by: Alya Abbott <alya@zulip.com>
2022-09-09 10:30:05 -07:00
Sahil Batra a4004e05a6 settings: Add help link with realm default of read receipts setting. 2022-09-09 09:31:04 -07:00
Sahil Batra bf97760544 settings: Add help link with user read receipts setting. 2022-09-09 09:31:04 -07:00
Riken Shah 3176733914 puppeteer: Fix dropdown click flake in `admin.ts`.
The reason for the flake was we were not waiting enough
time for the dropdown to render search results when we
type `rome`

To fix this, We are waiting until the dropdown input value
evaluates to be `rome`.

We also update variable name from
`verona_in_dropdown` to correct `rome_in_dropdown`.
2022-09-09 08:56:48 -07:00
Anders Kaseorg 8da2eb58ec template_parser: Spell “Handlebars” correctly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-09 00:34:36 -07:00
Anders Kaseorg 7d485aa58f docs: Correct more “webapp” to “web app”.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-08 20:23:28 -07:00
Anders Kaseorg 4c38b1371b test_auth_backends: Fix SOCIAL_AUTH_GITHUB_TEAM_ID mock.
SOCIAL_AUTH_GITHUB_TEAM_ID is expected to be the string of an integer.

The requests mock for the bogus /None URL is unused because the
function that would request it is itself mocked.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-08 20:23:28 -07:00
Anders Kaseorg 6f5346cc7d stripe: Fix WildValue usage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-08 20:22:38 -07:00
yogesh sirsat e4b74c2099 streams: Fix misleading comment in "test_subs". 2022-09-08 16:56:07 -07:00
Robert Imschweiler 8723931236
vagrant: Add Fedora 36 support.
- Add documentation for the vagrant setup on Fedora.
- Fix the container setup by adding the `z` option to the bind mounts so
that the selinux context allows sharing. This is according to the official
docker documentation:
https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label
https://www.vagrantup.com/docs/providers/docker/basics (section "Volume
Consistency")
2022-09-08 16:12:59 -07:00
Zixuan James Li 8a80443b73 uptimerobot: Use the create-bot-construct-url macro for uptimerobot.
Since the setup for uptimerobot does not deviate from what we have in
the "create-bot-construct-url" macro, we can reuse it and event
filtering instructions for uptimerobot will be automatically included.

TODO: Add event filtering documentation for buildbot when it supports
custom endpoint URL.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-09-08 13:37:35 -07:00
Zixuan James Li 6b527dfa61 integrations: Add documentation for the event filtering system.
We create "event-filter-instruction.md" and add it to
"create-bot-construct-url.md". This allows the user to keep track of the
supported event types for most of the integrations that implement this
feature. Note that not all integrations use "create-bot-construct-url.md".

We also need to rename "function" to "view_function" to make this change
type-check.

This is relevant to #18392.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-09-08 13:37:35 -07:00
Anders Kaseorg 0cd76d17d7 requirements: Remove unused mypy.txt lock file.
It’s unused since commit b7ec1b55dd.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-08 11:08:06 -07:00
Anders Kaseorg a9b12ae067 message_fetch: Remove obsolete UnicodeDecodeError handler.
This handler from commit a696141a25
(#7418) was almost certainly made unreachable when commit
c3e395b7d8 (#13092) removed anything
that might have thrown a UnicodeDecodeError from highlight_string.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-08 11:07:43 -07:00
Het Patel 2151ef3a8f
search help: Fix incorrectly using "email" as the example email address.
Fixes part of #22866.
2022-09-08 11:06:32 -07:00
Ganesh Pawar f8454fe584 webpack: Add a hook to print a compilation successful message.
This restores output notifying the developer when webpack compilation
has been completed. We originally had this feature, but the
implementation was wrong, and it was removed in #19721.
2022-09-07 17:30:06 -07:00
Purushottam Tiwari 7879f78917 user groups: Implement edit features in user group settings overlay.
Follow up for #22214.
2022-09-07 12:09:28 -07:00
Purushottam Tiwari b1c81e2e02 user groups: Implement General tab functionalities for group settings.
There will be one more follow up commit to this, that will
add support for editing memberships of user groups and will
complete preliminary version for user group edit settings.

Follw up for #22214.
2022-09-07 12:09:28 -07:00
Ganesh Pawar 10a0bf4de4
settings: Add confirmation dialog to delete linkifiers.
Fixes part of #22812.
2022-09-07 11:29:18 -07:00
Ganesh Pawar bc317c0d0c
settings: Add confirmation dialog to delete data exports.
Fixes part of #22812.
2022-09-07 11:28:42 -07:00
Ganesh Pawar 92b4bb7ffc
settings: Add confirmation dialog to delete code playgrounds.
Fixes part of #22812.
2022-09-07 11:28:08 -07:00
Alya Abbott ceb14351dd contributor docs: Clarify instructions for claiming an issue. 2022-09-07 10:42:51 -07:00
Lauryn Menard 7f738803f0 help-docs: Rename organization language help center file.
Renames article about organization language used for automated
messages and invitation emails. Creates URL redirect and updates
links in repository (web app, help center and api documentation).

Prior to this change, the article was named:
'change-the-default-language-for-your-organization'.

Fixes #21949.
2022-09-07 09:45:37 -07:00
Christopher Chong 28173cafc8 message_flags: Fix deadlocks when updating message flags.
Previously, an active production Zulip server would experience a class
of deadlocks caused by two or more concurrent bulk update operations
on the UserMessage table.

This is because UPDATE ... SET ... WHERE statements that execute in
parallel take row-level UPDATE locks as they get results; since the
query plans may result in getting rows in different orders between two
queries, this can result in deadlocks.

Some databases allow ORDER BY on their UPDATE ... WHERE statements;
PostgreSQL does not. In PostgreSQL, the answer is to do a sub-select
with an ORDER BY ... FOR UPDATE to ensure consistent ordering on row
locks.

We do this all code paths using bitand or bitor as part of bulk
editing message flags, which should ensure that these concurrent
operations obtain row level locks on the table in the same order.

Fixes #19054.
2022-09-06 16:06:58 -07:00
Matt Keller e1023f45cf sentry: Properly stringify a possibly-None result. 2022-09-06 15:06:05 -07:00
Mateusz Mandera 01d659b672 internal_prep_private_message: Remove redundant realm arg.
This is redundant and is taken based on recipient_user anyway.
2022-09-06 15:03:17 -07:00
Anders Kaseorg 143a3350fa dependencies: Upgrade JavaScript dependencies.
jQuery is held at 3.6.0 due to
https://github.com/jquery/jquery/issues/5105.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-06 15:02:29 -07:00
Anders Kaseorg 7e6e98aefb puppeteer_lib: Fix get_element_text typing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-06 15:02:29 -07:00
Anders Kaseorg 5e4cec56cb install-node: Upgrade Node.js from 16.16.0 to 16.17.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-06 15:02:29 -07:00
Lauryn Menard 049302fe61 templates: Rename `OPEN_GRAPH` variables to `PAGE` or `PAGE_METADATA`.
Renames existing template variables starting with `OPEN_GRAPH` to be
either `PAGE` or `PAGE_METADATA` since these variables are used for
adding both open graph metdata and page titles/descriptions for SEO.
2022-09-06 14:57:06 -07:00
Lauryn Menard 18b401f476 tests: Update DocPageTest for HTML metatags for landing pages.
Updates `_test` in DocPageTest so that the generic test boolean
parameters will confirm that there is an HTML title element as well
as a meta-description for SEO and meta tags for open graph data.

Sets tests for error pages and dev env pages to `landing_page=False`
since these pages will not have the metadata added in subsequent
commits.

API and integration docs are automated to have this metadata. There
is a specific test for the integrations open graph data. The list of
API endpoints with specific content are tested for this now.

The specific test for portico pages open graph data is removed in
favor of the more generic test style, which will not fail if/when
the template data and text is changed or updated.
2022-09-06 14:57:06 -07:00
Lauryn Menard cde096ffa5 tests: Split `test_doc_endpoints` into more specific endpoint tests.
In `zerver/tests/test_docs.py`, we split the catch all test for doc
endpoints into more specific test groups: dev environment pages,
error pages, corporate pages. Also, moves the api endpoints being
tested to the specific test for api endpoints.
2022-09-06 14:57:06 -07:00
Lauryn Menard 13852c54e8 tests: Expand test for new communities directory page.
Expands specific test for new open communities directory page to
test that the zulip dev realm was added to the page. Adds a generic
test for the endpoint to the generic `test_doc_endpoint`
test.
2022-09-06 14:57:06 -07:00
Lauryn Menard 17974cafbc tests: Move test for non-existent integration to integration doc test.
Moves test for a non-existent integration to the specific test for
integration doc endpoints.
2022-09-06 14:57:06 -07:00
Lauryn Menard 9ad6457f32 tests: Move URL redirect tests for portico landing pages.
Moves three URL redirect tests in `zerver/tests/test_docs.py` to
the unit test for URL redirects in `zerver/tests/test_urls.py`.
2022-09-06 14:57:06 -07:00
Riken Shah 39a3944951 timepicker: Fix hours and minutes input getting squeeze in safari.
This issue is probably with the upstream bug in
`flatpickr` but we can fix it for us by specifying minimum
height to the input.

Fixes #22698
2022-09-06 12:57:24 -07:00
Mateusz Mandera 16829bd84b auth: Fix up AzureAD Oauth2 docs and config.
This commit brings AzureAD config in line with other backends:
- SOCIAL_AUTH_AZUREAD_OAUTH2_SECRET gets fetched in computed_settings.py
  instead of default_settings, consistent with github/gitlab/etc.
- SOCIAL_AUTH_AZUREAD_OAUTH2_KEY gets fetched in default_settings via
  get_secret(..., development_only=True) like other social backends, to
  allow easier set up in dev environment, in the dev-secrets.conf file.
- The secret gets renamed from azure_oauth2_secret to
  social_auth_azuread_oauth2_secret to have a consistent naming scheme with
  other social backends and with the SOCIAL_AUTH_AZUREAD_OAUTH2_KEY
  name. This is backwards-incompatible.

The instructions for setting it up are updated to fit how this is
currently done in AzureAD.
2022-09-06 11:58:08 -07:00
Tim Abbott 3826fc8af9 test_events: Fix test failures 10 days after last provision.
In bbf4c25553, we added support for
triggering user group changes when the waiting_period_threshold realm
setting was changed.

The test_events test did not expect this, and thus would fail if the
last provision was between 10 and 20 days ago.

The simplest fix is to just increase those numbers, since computing
whether the database was too old would be more complex than it is
worth for this test.
2022-09-06 11:31:13 -07:00
Sahil Batra bef9592d49 settings: Move custom input div inside the main setting div.
This commit moves "dependent-block" div inside the main
setting "input-group" div as the custom input is part of
that setting only. Also this will help in further refactoring
of settings code which will be done in next couple of PRs.

There are no changes visually, the space between settings
and inputs remain same.
2022-09-06 11:14:02 -07:00
Alya Abbott 5d4c5686eb help center: Add question about Free plan to Zulip Cloud Billing page. 2022-09-02 15:50:31 -07:00
Tim Abbott 03d385c1da pm_list: Remove unnecessary topic popover calls.
This was incorrectly copied from the topic_list logic in the original
implementation of a left sidebar private messages widget in
fd66d9f703.
2022-09-02 12:42:57 -07:00
Alya Abbott 9c2820b59e help center: Add warnings/advice to "Import from Slack" page.
- Add a reminder to ensure users send the correct export token
- Ask administrators to inform users about their new Zulip account
  prior to doing an automated password reset.
2022-09-02 11:44:55 -07:00
rixant af1de04f97 user_status_ui: Add "At the office" option. 2022-09-02 09:00:10 -07:00
Tim Abbott 43a57494f9 settings: Fix incorrectly resolved merge conflict.
In 7b4f7b4a85, we replaced
do_settings_change the dialog_widget.send_api_request.

When 0a278c39d2 was rebased past that
change, the merge conflict was resolved incorrectly, resulting in
duplicate API requests.
2022-09-01 14:36:25 -07:00
madrix01 4303ba1efc actions: Create a separate message_delete.py file.
This is preparatory commit for #18941.
Importing `do_delete_message` from `message_edit.py` was causing a
circular import error. In order to avoid that, we create a separate
message_delete.py file which has all the functions related to deleting
messages.
The tests for deleting messages are present in
`zerver/tests/test_message_edit.py`.

Fixes a part of #18941
2022-09-01 14:18:38 -07:00