Ganesh Pawar
0811bda192
dialog_widget: Clear error element when clicked on the submit button.
2021-07-26 16:37:16 -07:00
Ganesh Pawar
b9aed2df19
change_email_modal: Remove duplicate id attribute.
...
This also naturally fixes the bug where the change_email_modal wouldn't
show the old email in the input box.
2021-07-26 16:37:15 -07:00
Ganesh Pawar
45799f1f1d
delete_topic: Remove unnecessary `close_modal` call.
...
91b83cf09f
migrated delete_topic modal
to confirm_dialog. confirm_dialog closes the modal after clicking on
the Confirm button. So manually closing the modal is redundant.
2021-07-26 16:37:15 -07:00
Tim Abbott
0ac79e50f6
portico: Fix 'language or choice' typo.
2021-07-26 16:25:16 -07:00
Mateusz Mandera
8f588dcbab
models: Pass realm to get_user_including_cross_realm calls.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
43329b6a34
bots: Pass realm to get_system_bot calls in export/import.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
7a36ac6eca
bots: Pass realm to get_system_bot call in server_initialization.py.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
0416f0385a
bots: Pass realm to get_system_bot calls in onboarding.py.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
c34260426a
bots: Pass realm to remaining get_system_bot calls in tests.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
ce4eb6f203
bots: Pass realm to get_system_bot calls in registration.py.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
a6924e23fa
bots: Pass realm to get_system_bot calls in streams.py.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
a124a4dfcf
bots: Pass realm to get_system_bot calls in actions.py.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
6f6be04f2e
bots: Pass realm to get_system_bot call in test_users.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
994ee70497
bots: Pass realm to self.notification_bot test helper.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
a01594e72b
bots: Pass realm to get_system_bot call in DeferredWorker.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
f790a32d13
bots: Pass realm to get_system_bot calls in test_cache.py.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
a3cd3d6865
bots: Pass realm to get_system_bot calls in stripe.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
57f14b247e
bots: Specify realm for nagios bots messages in check_send_receive_time.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
104139657b
bots: Pass realm to get_system_bot calls in email_mirror.
2021-07-26 15:33:13 -07:00
Mateusz Mandera
d45f3eecaa
models: Add optional realm_id argument to get_system_bot.
2021-07-26 15:31:10 -07:00
Eeshan Garg
c2e038ea2f
portico-header: Fix "Find accounts" and "New organization" links.
...
One of my recent commits added these links but mistakenly rendered
them as list items on our /help pages.
2021-07-26 15:30:55 -07:00
Eeshan Garg
72fba69c02
help: Activate sidebar scrollbar when hamburger is clicked.
...
On mobile, when you go to our /help pages, you cannot scroll the
sidebar content. As for testing, the bug can be reproduced by
using a mobile display in Chrome inspector. One caveat of this
bug is that if you go to /help with a mobile display toggled,
the scrollbar won't work. However, if you switch between
different mobile displays, it starts working.
This commit adds some JS that sets the right CSS properties
when the hamburger is clicked.
2021-07-26 15:30:55 -07:00
Damian Parrino
f13fce4efa
help: Rewrite "Resolve a topic" documentation to be more complete.
...
Co-authored-by: Alya Abbott <alya@zulip.com>
Co-authored-by: Tim Abbott <tabbott@zulipchat.com>
2021-07-26 15:29:00 -07:00
PIG208
22c84e69ac
tests: Fix inappropriate assertEqual.
...
We do not give a second argument to `self.assertEqual` here. We only need
to invoke the function.
2021-07-26 15:09:07 -07:00
PIG208
91de2cbe03
typing: Avoid scoped redefinition of different types.
...
Mypy doesn't allow redefinition of a variable using a different type
within the same scope.
https://github.com/python/mypy/issues/1174
2021-07-26 15:09:07 -07:00
PIG208
178a4b4eff
tests: Initialize requests with different post data.
...
Instead of directly changing the `POST` attribute of a request, we
utilize the `HostRequestMock` initializer to produce requests with
different post data.
2021-07-26 15:09:07 -07:00
PIG208
c3abc0b472
tests: Correctly mock and invoke view functions.
...
The decorators require the decorated function to be a valid view
function. This changes the way the mocked view functions and requests
are implemented such that we can invoke view functions without future
type errors.
2021-07-26 15:09:07 -07:00
PIG208
57f46db09f
tests: Pass HostRequestMock to export_realm.
...
`export_realm` accepts an HttpRequest as the first argument,
while `self.client_post` conflicts with it. Though the argument is
unused in `export_realm`, we keep it to be compliant with the
view function type.
2021-07-26 15:09:07 -07:00
PIG208
f280ebe4b5
decorator: Type zulip_login_required with overload.
...
As we only return the actual decorator as-is only if `function` is
`None`, we can use `@overload` to accurately annotate the return type
for the decorator.
2021-07-26 15:09:07 -07:00
PIG208
434b7e360a
populate_db: Remove unused `output`.
...
The helper function `generate_and_send_messages` receives
`self.stdout.write` from `jobs`, but it is never actually used.
2021-07-26 15:09:07 -07:00
PIG208
d2af20eb2a
typing: Do explicit type conversion when appropriate.
...
When calling some functions or assigning values to certain attributes,
the arguments/right operand do not match the exact type that the
functions/attributes expect, and thus we fix that by converting types
beforehand.
2021-07-26 15:09:07 -07:00
PIG208
cd678232bd
analytics: Extract request.user for typecheck.
2021-07-26 14:48:45 -07:00
PIG208
7d1c475f69
typing: Use assertions for function arguments.
...
Utilize the assert_is_not_None helper to eliminate errors of
'Argument x to "Foo" has incompatible type "Optional[Bar]"...'
2021-07-26 14:48:45 -07:00
PIG208
8a91d1c2b1
analytics: Fix type annotation for keys.
...
realm_data, user_data, stream_data and installation_data allow the key to
be int, str, or None.
This fix the type annotation for these dictionaries.
2021-07-26 14:48:45 -07:00
PIG208
c4179428ac
caching: Make sender type optional for flush_cache.
...
That's the correct Django interface for this function.
2021-07-26 14:48:07 -07:00
PIG208
2972e921b7
utils: Add a helper function for None-checks.
2021-07-26 14:46:45 -07:00
PIG208
df1bf9e352
analytics: Fix type annotation for sql_data_collector.
2021-07-26 14:46:45 -07:00
PIG208
cf8687662f
confirmation: Use the correct type hints for create_confirmation_link.
...
Previously we annotate the first argument as `ContentType`, which
is wrong as suggested by django-stubs.
2021-07-26 14:46:45 -07:00
Dinesh
beadb5ec7f
test_middleware: Replace logging mocks with assertLogs.
2021-07-26 14:46:01 -07:00
Dinesh
2846d18854
test_decorators: Replace webhook logger mock with assertLogs.
...
Of the two other logging mocks left in this file, one checks
a logging call isn't made and another makes sure errors
aren't allowed by raising an exception as a side_effect
to the logger.
2021-07-26 14:46:01 -07:00
Dinesh
199f522808
test_classes.py: Replace markdown_logger mock with assertLogs.
...
Set level to 'ERROR' since exceptions create logs with that level.
2021-07-26 14:46:01 -07:00
Dinesh
b195cc3635
test_push_notifications.py: Replace logging mocks with assertLogs.
...
Left the mocks which are used to assert a logging call isn't made.
2021-07-26 14:46:01 -07:00
Dinesh
e4fb2883b4
populate_db: Re-enable push_notifications logger.
...
We were disabling push_notifications logger but weren't enabling
it back. This caused failures on porting logging mocks to assertLogs
as assertLogs expects a log to be generated.
See 9c224ccdd3
for why we disable
these. (To avoid logs spam from push_notifications_logger)
2021-07-26 14:46:01 -07:00
Tim Abbott
cb998f7147
templates: Copy-edit new landing pages.
2021-07-26 09:34:48 -07:00
PIG208
c7210bfc75
docs: Update client.md for the request notes change.
...
`request.client` is no longer valid since the ZulipRequestNotes change.
This update the documentation to reflect that. And it also makes it
recommend `check_send_webhook_message` in favor of
`check_send_stream_message`.
2021-07-26 08:40:53 -07:00
Tim Abbott
779a2f3317
templates: Fix broken contributor join lines.
...
This was introduced in the previous commit.
2021-07-25 22:38:14 -07:00
Alya Abbott
91e711b461
portico: Add join links to The Zulip dev community page.
2021-07-25 22:23:02 -07:00
Tim Abbott
ba3bb38bc2
templates: Avoid direct links to chat.zulip.org.
...
We instead generally want to link to the landing page explaining the
community.
2021-07-25 22:18:04 -07:00
Tim Abbott
454a900487
docs: Replace chat-zulip-org page with /developer-community/.
2021-07-25 22:17:57 -07:00
Aman Agrawal
7d8f62e7a0
portico: Add a developer-community page.
...
This is intended to replace the ReadTheDocs page of this form, but
this commit does not yet update any links.
2021-07-25 17:01:26 -07:00