Commit Graph

40764 Commits

Author SHA1 Message Date
Steve Howell 779f56d411 node tests: Add test for compose_state. 2021-03-05 12:57:20 -05:00
Steve Howell 886e419731 node tests: Directly test how we add/remove rtl class. 2021-03-05 12:57:20 -05:00
Alex Vandiver ea2e5de54f requirements: Downgrade jedi dependency for ipython compatibility.
ipython < 7.20.0 is incompatible with jedi >= 0.18.0; it fails to
tab-complete in `./manage.py shell`, as described in
ipython/ipython#12740.

We cannot bump the ipython dependency because ipython 7.20.0 requires
Python 3.7, and we must support Python 3.6 due to Ubuntu 18.04
support.  Our only solution is thus to cap the version of `jedi` to
the last one before its API changed.
2021-03-04 18:08:45 -08:00
Alex Vandiver 3207928418 requirements: Fix paths to 'non-"lock" files'; those are the .in files 2021-03-04 18:08:45 -08:00
Alex Vandiver 237dc1eb21 requirements: Update example to match the line above. 2021-03-04 18:08:45 -08:00
Anders Kaseorg 62532777b1 server_events: Replace deprecated $.now alias.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-04 18:07:47 -08:00
Alex Vandiver e63f170027 puppet: Add access time and host to nginx access logs.
2e20ab1658 attempted to add this; but
there are multiple locations that access logs are set, and the most
specific wins.
2021-03-04 18:06:47 -08:00
Anders Kaseorg 6c577ea6c5 gitignore: Ignore zulip-thumbor-venv.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-04 18:06:21 -08:00
Anders Kaseorg d393ac5034 update-prod-static: Remove unused --prev-deploy option.
It’s unused since commit 079ddae4c8
(#12676).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-04 18:04:57 -08:00
Anders Kaseorg 4a3d66f776 setup: Remove unused $.fn.within.
It’s unused since commit 805ac2475b
(#14162).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-04 18:04:14 -08:00
Anders Kaseorg a17fbb3b55 isort: Move configuration into pyproject.toml.
Since we already have one for Black, this saves a top-level file.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-04 18:03:30 -08:00
Anders Kaseorg cca7d30fad mypy: Specify mypy_path and cache_dir relative to config path.
Previously, these were interpreted relative to the current directory.
This was notably causing dozens of extra var/mypy-cache directories to
be created in different places when mypy was run from Emacs Flycheck.
Use the $MYPY_CONFIG_FILE_DIR variable added in mypy 0.800.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-04 18:03:11 -08:00
smit_patel fb8d18caf8 compose: Fix alignment of Drafts button.
Fixes #17095.
2021-03-04 17:33:01 -08:00
Ganesh Pawar 3dbbbb04f8 message_list_view: Remove duplicate comment.
The comment and the conditional check is already present at the
start of the function.

This seems to have been introduced in
a9235a74f4, back in 2014.
2021-03-04 17:17:12 -08:00
m-e-l-u-h-a-n f4a111e314 compose: Add user presence circles in mention and pm typeahead.
This commit addresses the problem of user's status visibility to
some extent. It adds presence circles, like we have in buddy_list to the
typeahead suggestions that are given for mentioning users in messages.

Tweaked by tabbott to adjust vertical alignment of group mentions as well.

Testing for the changes is done manually in the developement server,
and also by updating frontend tests to address these changes.

Fixes: #17138
2021-03-04 17:06:02 -08:00
Tim Abbott 7def3e7832 css: Fix vertical alignment of mention typeahead.
Somehow the previous styling was oddly off-center.
2021-03-04 17:05:04 -08:00
pilgrim2308 ec88ba38a9 UI: Fix redundant condense message appearing in edit message menu.
Added the handler functions which were previously missing
for when a user tries to edit/view source of a message
after expanding it.

Fixes #17478
2021-03-04 15:28:17 -08:00
Gaurav Pandey 3dcf97bf27 tooltip: Hide tooltip for touch events on touch-enabled devices.
Fixes #16674.
The commit hides the tooltip for touch events on touch enabled device.

Touch events trigger both click and hover action,
leaving the hover action sustained until next click.

Hence it is better to hide the tooltip to avoid the clutter in UI.
2021-03-04 12:32:16 -08:00
Anders Kaseorg e271936aae logos: Optimize jotform.svg with svgo 2.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-04 12:24:25 -08:00
Gaurav Pandey 3d7462a0e7 integration: Add jotform integration.
Fixes #16554
2021-03-04 11:40:58 -08:00
Anders Kaseorg 63eae63a07 timerender: Fix comparison of Date objects.
This === comparison between two Date objects added by commit
9896782fd1 (#17220) always returned
false, so the body of timerender was running every minute instead of
every day.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-04 11:04:54 -08:00
Anders Kaseorg 23b589cce3 timerender: Do not duplicate entries of update_list!!
Commit 13915740bb (#5199) added a loop
in update_timestamps that appended an entry to update_list once for
each element that its className matched.  If there were two such
elements, this would double the length of update_list each time the
body of update_timestamps ran.  So let’s not do that.

Also fix the incorrect elements !== null check from the same commit.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-04 11:04:54 -08:00
Riken Shah d12257e2c1 puppeteer_test: Add missing `await` checking compose content.
assert_compose_box_content should always be called with await.
2021-03-04 09:41:49 -08:00
Riken Shah b23cd2b7d4 puppeteer_test: Skip tests that require file upload for Firefox.
Right now Firefox does not support file upload with puppeteer.
2021-03-04 09:41:24 -08:00
Riken Shah dc5095bad9 puppeteer_test: Add `waitForNavigation` when reloading.
This commit ensures that it waits until the
page is reloaded which avoids uncertain
flake.
2021-03-04 09:40:14 -08:00
Riken Shah de96aeb822 puppeteer_test: Fix `page.url()` for Firefox.
This commit works around an issue with Puppeteer tests on Firefox
where `page.url()` does not show the URL fragment, by adding a
temporary function that solves the issue.
2021-03-04 09:40:14 -08:00
Riken Shah fb8dc7732c puppeteer_test: Set the system default locale to `en_US`.
This commit sets the system default locale to `en_US.UTF-8` before
running the tests.

This was necessary because when running tests with Firefox, it was
failing on some test verifies the results of locale-aware sorting.
2021-03-04 09:40:03 -08:00
Riken Shah a6c1f02df0 puppeteer_test: Add `is_firefox` option to enable/disable some tests.
This commit introduces the `is_firefox`
option in CommonUtils to identify if a browser
is Firefox or not.

This helps us to avoid calling some tests
that is yet not compatible with Firefox.
2021-03-03 22:04:16 -08:00
Riken Shah 6676aa2f90 puppeteer_test: Change browser default viewport to allow Firefox.
When we run puppeteer with Firefox,
the `--window-size` option does not work,
which makes the bottom part of
the page cut off.

This commit fixes this issue
by setting the screen default viewport
to the maximum size of the window.
2021-03-03 22:01:36 -08:00
Gaurav Pandey a3561c15d2 invites: Remove odd box-shadow for invite link clipboard svg. 2021-03-03 21:57:41 -08:00
Rex Ferrer d4c0578560 refactor: Integrate POSTRequestMock into HostRequestMock.
Minimized code duplication by integrating POSTRequestMock into
HostRequestMock and then updating the required files with
HostRequestMock.

Fixes part of #1211.
2021-03-03 21:52:05 -08:00
Anders Kaseorg 4bbfac8aa9 requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-03 21:46:42 -08:00
Anders Kaseorg d6cdd279d0 documentation_crawler: Fix for Twisted 21.2.0 type hints.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-03 21:46:42 -08:00
Anders Kaseorg b8e5e34c01 install-shfmt: Upgrade shfmt from 3.2.1 to 3.2.2.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-03 21:46:42 -08:00
Anders Kaseorg 25bb98dcf5 install-node: Upgrade Node.js from 14.15.1 to 14.16.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-03 21:46:42 -08:00
Anders Kaseorg 9613c66560 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-03 21:46:42 -08:00
Anders Kaseorg e128f92ee1 migrations: Swap out deprecated JSONField import in-place.
A deprecated import shouldn’t be used even in a migration, since the
migration will need to remain runnable in the future.  We never needed
a migration for this switch anyway; we just needed to edit the old
migration, since no actual state changes are involved.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-03 21:46:05 -08:00
Anders Kaseorg ccad00b7e9 provision: Suppress exception chaining for CalledProcessError retries.
When exception is raised inside an exception handler, Python 3
helpfully prints both tracebacks separated by “During handling of the
above exception, another exception occurred:”.  But when we’re using
an exception handler to retry the same operation, multiple tracebacks
are just noise.  Suppress the earlier one using PEP 409 syntax.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-03 16:25:03 -08:00
shanukun eaa8862bc3 missedmessage_hook: Fix inaccurate docstring.
If the client is no longer on the Internet,
receiver_is_off_zulip returns False, not True.
2021-03-03 16:17:55 -08:00
Aryan Shridhar bfefec31f4 Revert "edit_bot: Fixed dropdown username capitalization."
This reverts commit ea02d48e81.
2021-03-03 23:58:50 +05:30
Aryan Shridhar d1198c46c5 Revert "frontend: Fixed broken label tag and removed label expression."
This reverts commit 17bae43052.
2021-03-03 23:58:50 +05:30
m-e-l-u-h-a-n ec8244b113 tools: Remove -f short option for test-all.
./tools/test-all had a short option -f which was used for running it
by skipping provision check. This short option paired well with its
long version --force, but in an effort to provide more clarity over
the use of force option it is renamed to --skip-provision-check.

Following this rename -f option for test-all does not pair well with
its long part which is now --skip-provision-check. Also, this option
is rarely used. So the short form -f is removed in this commit. We
now provide only its longer version --skip-provision-check.

This is a part of commits done to address issue #17455.
2021-03-03 09:17:49 -08:00
m-e-l-u-h-a-n 63c12d2e59 tools: Change help message for skip-provision-check argument.
This commit changes help message for skip-provision-check argument
used with various test commands. The message is changed with an
intention to be more clear about what this option actually does.

This commit is in series of various changes done to provide clarity
over the use of --force option which is renamed to
--skip-provision-check.

Fixes: #17455
2021-03-03 09:17:49 -08:00
m-e-l-u-h-a-n 911c5f19f1 tools: Rename force argument to skip-provision-check
This commit renames --force argument used with various tests to
--skip-provision-check. As a consequence of this name change all other
files that set --force option for the test commands have been updated.

This change is done in order to provide more clarity for using this
option for runnning tests.

This commit addresses issue #17455.
2021-03-03 09:17:49 -08:00
m-e-l-u-h-a-n ca515e5583 tools: Move registration of --force to test-scripts.py.
This commit moves --force option used with various tests to
test-scripts.py to have it alongside the logic that does provisioning
status assertion.
This is a step towards providing more clarity over use of this
argument with tests as asked in issue #17455.
2021-03-03 09:17:49 -08:00
Steve Howell b1a871f2e0 node tests: Avoid reset_module for recent_topics. 2021-03-03 07:08:51 -05:00
sahil839 4ca21a6982 users: Give moderators same permissions as that of full members.
This commit updates the stream creation, subscribing others to
stream, wildcard mention settings and stream post policy to allow
realm moderators even if they are new and the respective setting
is set to allow full members only.
2021-03-02 17:19:31 -08:00
sahil839 b4fd15d516 models: Rename is_new_member to is_provisional_member.
This commit renames the is_new_member property in models.py
to is_provisional_member which will return true for any user
who is not a full member. We will add a condition in further
commit such that this returns 'False' for a moderator as we
will initially give all the rights to moderator that a full
member has.
2021-03-02 17:19:31 -08:00
Alex Vandiver 8961885b0f puppet: Add smokescreen to logrotate. 2021-03-02 17:16:38 -08:00
Alex Vandiver d938dd9d4a puppet: Document smokescreen installation, and move to puppet/zulip/.
This is more broadly useful than for just Kandra; provide
documentation and means to install Smokescreen for stand-alone
servers, and motivate its use somewhat more.
2021-03-02 17:16:38 -08:00