Commit Graph

32522 Commits

Author SHA1 Message Date
YashRE42 7867830e14 settings: Adjust styling of ? icons. 2019-07-17 17:47:08 -07:00
Hemanth V. Alluri cb21207a4b docs: Add a section about enabling docker before doing vagrant up.
Many Linux distros like Debian Buster, Fedora 29, etc. have a policy
where any services installed are disabled by default. So we should let
the developer know that they should explicitly enable and start the
Docker daemon.

Also, we should be verbose on how to do vagrant up using Docker as a
provider specifically (and similar for Virtualbox).
2019-07-17 16:29:25 -07:00
Anders Kaseorg f97bb6b65c postgres-create-db: Split into non-pgroonga and pgroonga scripts.
Fixes #12655.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-17 16:18:22 -07:00
Wyatt Hoodes 1418b8b05f test_server: Set LOCAL_UPLOADS_DIR in set_up_django.
For the Casper and API tests, we need to allow setting
LOCAL_UPLOADS_DIR, which is normally managed within test_runner.py.
2019-07-17 16:14:20 -07:00
Priyank Patel ea2e7ccf27 message_fetch: Use user ID for sender and group-pm-with operator. 2019-07-17 16:09:12 -07:00
Priyank Patel b338fd130e messages: Support passing user IDs for group-pm-with operator. 2019-07-17 16:09:12 -07:00
Priyank Patel c067c155aa messages: Support passing user ID to sender operator. 2019-07-17 16:09:12 -07:00
Anders Kaseorg 54304b4008 webpack: Remove partial from handlebars-loader knownHelpers.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-17 16:07:17 -07:00
Anders Kaseorg b1aa304c4a templates: Suppress Handlebars automatic partial indentation.
Fixes #12795.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-17 16:07:17 -07:00
Anders Kaseorg 07f93d58a3 views: Remove unused APIView class.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-17 16:03:35 -07:00
Anders Kaseorg 6e6a3947dc test_templates: Remove nonexistent templates from skip list.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-17 16:03:35 -07:00
Anders Kaseorg 5ec2e4add4 home: Remove handler for old compile-handlebars-templates error file.
As of commit 8c199fd44c (#12667) this
file is no longer generated.  Handlebars compile errors are raised as
webpack errors.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-17 16:03:35 -07:00
Sumanth V Rao 2c9f5e3980 tools: Add tool to update API field of local zuliprc file.
This tool can be used to update the API field of local
zuliprc files for dummy users of development server
(iago, prospero, etc) with the correct API key from database.

This tool can be run after provisioning (or similar tools) which change
the API keys in the database.
2019-07-17 16:00:21 -07:00
Alexandra Ciobica 28ebe3e6ba css: Refactor topic edit buttons to use scss nesting. 2019-07-17 22:30:39 +03:00
Alexandra Ciobica 117e1e05ea css: Clean up styling of topic edit buttons.
Related to: #11233.
2019-07-17 22:20:52 +03:00
Archit Kaushik e8eaa19ae4 topic edit: Improve styling of topic edit icons (save and cancel).
The earlier styles were inconsistent with the rest of UI.
The new styles follow the colour scheme.

Fixes #10983
2019-07-17 22:20:52 +03:00
Tim Abbott d2f1c84001 settings: Rewrite logic for whether users can change name.
This moves this somewhat complicated, duplicated logic into a single
JavaScript function.
2019-07-16 11:43:57 -07:00
Cynthia Lin 8b538d8b8d user settings: Prevent linkifying trailing whitespace in change name button.
When user name changes are disabled and the disabled name change info icon
shows, trailing whitespace gets linkified because of the link's
inline-block property. Use Handlebars whitespace omission syntax to
eliminate this behavior.
2019-07-16 11:43:57 -07:00
Cynthia Lin 50cab76c59 user settings: Hide disabled name change info icon for admins.
This icon should only show when the user is not an admin and either the
realm or server settings have disabled name changes. Previously the icon
always showed for admin users.
2019-07-16 11:43:57 -07:00
Cynthia Lin a73155c78f node tests: Fix checking for invalid :checked property in templates. 2019-07-16 11:43:57 -07:00
Cynthia Lin 63c85da4db right sidebar: Use flexbox positioning for elements in USERS header.
Eliminate fixed positioning for better alignment.
2019-07-16 11:33:02 -07:00
Cynthia Lin a65007dde4 right sidebar: Ensure .user-with-count gets added to correct li element.
The count_span element is parented by a .selectable_sidebar_block element
which is parented by the li element that the class is supposed to be added
to. Thus, use the parents() jQuery method for locating the li parent so
that the class gets added to the correct element.
2019-07-16 11:33:02 -07:00
Wyatt Hoodes 5ca2e43e44 test_bots: Remove override_settings decorator from test case.
The decorator running at import time was causing directory
creation in the project's root.

One could imagine linting for this, but it seems unlikely that similar
code will be added in the future; the problem one would be trying to
solved is already addressed by default in the framework now.
2019-07-15 14:16:56 -07:00
Wyatt Hoodes c218735b2c test_runner: Add error handling for test directory clean up.
It was discovered that errors such as:
    `OSError: [Errno 16] Device or resource busy`
potentially arise when running in serial mode, or with
explicit test cases passed to `test-backend`.
2019-07-15 14:15:19 -07:00
Cynthia Lin 94bbc32a92 user settings: Improve visibility of delete profile picture icon in light mode. 2019-07-15 13:49:00 -07:00
Cynthia Lin ec4c996361 user settings: Darken area outside of non-square profile avatars on hover. 2019-07-15 13:49:00 -07:00
Tim Abbott c91f659a1d openapi: Fix test output for undocumented parameters.
The output had the error messages swapped.
2019-07-15 13:39:30 -07:00
Tim Abbott 7c71e987ac openapi: Fix endpoints incorrectly tagged as documentation_pending. 2019-07-15 13:39:29 -07:00
Mateusz Mandera c1a8ba2974 populate_db: Use do_change_is_admin for setting api_super_user. 2019-07-15 12:32:29 -07:00
Mateusz Mandera 0e708d1f6c models: Add note that api_super_user allows sending to private streams. 2019-07-15 12:32:29 -07:00
Tim Abbott 588a24b661 cache: Fix caching of system bots.
In the unlikely event that someone edited the properties of a system
bot and then saved the result, we were still caching the old version
indefinitely in the get_system_bot cache.

This led to a confusing case where a newly installed Zulip server
didn't have is_api_super_user properly set on its EMAIL_GATEWAY_BOT in
memcached.

Co-authored-by: Mateusz Mandera <mateusz.mandera@protonmail.com>
2019-07-15 12:32:29 -07:00
Tim Abbott 111139b44e initialize_voyager_db: Use do_change_is_admin.
This is a code cleanup; in general, we avoid making direct updates to
model objects and then saving with a bare `.save()` across the
codebase.
2019-07-15 12:32:29 -07:00
Eeshan Garg 8dfc9d8bca pypi: Upgrade to release 0.6.1. 2019-07-15 12:28:16 -07:00
Amal Rajan 09049f1678 provision: Add provision support for Ubuntu 19.04
This commit adds support for Ubuntu 19.04 in the development
environment.
2019-07-13 16:44:09 -07:00
Hemanth V. Alluri 24d66477ca webhooks: Migrate gogs tests to the headers fixtures system. 2019-07-13 16:02:27 -07:00
Rishi Gupta 5cf304f8f9 notification bot: Tighten message for being added to streams. 2019-07-13 15:53:36 -07:00
Rishi Gupta 15cd2903dd notification bot: Refactor arguments to send_pm_if_empty_stream.
Previously we sent "" for stream_name where we should have sent None, which
made this function harder to understand. The "" value was never used.

This also reorders the arguments to be match the order of the arguments in
the two callers.
2019-07-13 15:53:36 -07:00
Rishi Gupta 628d9ad67d notification bot: Update error messages in send_pm_if_empty_stream. 2019-07-13 15:53:36 -07:00
Rishi Gupta b92f936dad notification bot: Refactor send_pm_if_empty_stream to simplify logic. 2019-07-13 15:53:36 -07:00
David Wood 9bace3f2cd notifications: Allow only notifiable in unread count.
This commit adds a new setting to the user's notification settings that
will change the behaviour of the unread count in the title bar and
desktop application.

When enabled, the title bar will show the count of unread private messages
and mentions. When disabled, the title bar will act as before, showing
the total number of unread messages.

Fixes #1736.
2019-07-13 15:49:04 -07:00
Tim Abbott ca23740478 condense: Rewrite condense.toggle_collapse to be readable and correct.
The proposed fix in #11662 was effectively a workaround for some
already bad logic.  What we actually want to do is described in the
updated function comment (from the spec in #5914), and requires an
additionl case that was not present in the original implementation
(which effectively assumed a collapsed message was condensible).

Also add some documentation.

Fixes #11662.
2019-07-13 15:45:00 -07:00
Priyank Patel 73b19672c3 message_fetch: Use user IDs for supported operators.
The approach taken here is basically use user IDs in operator that
support it when sending the request for fetching the messages
(see comments in code for more details).
2019-07-13 11:35:37 -07:00
Mateusz Mandera 7f556d1678 docs: Fix typo in production/email-gateway.md. 2019-07-13 11:31:01 -07:00
vsvipul e830853aee desktop-presence: Use system presence data from electron-bridge.
Combined with work in the desktop app, this makes it possible for the
desktop app to clearly indicate to other users whether the current
user is active on the system and thus would see a desktop
notification, not just whether they are active in the current Zulip
window.

Essentially rewritten by tabbott to add unit tests and consider the
desktop app data authoritative.
2019-07-13 11:21:22 -07:00
Anders Kaseorg aa36e2f5e1 check-templates: Exclude static/icons/fonts/template.hbs.
This file was unchecked until the .handlebars ↦ .hbs rename, so this
is the easiest way to get tests passing again.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-12 22:52:41 -07:00
Anders Kaseorg adcfa68da8 templates: Remove partial helper.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-12 21:11:14 -07:00
Anders Kaseorg 0c565f50be templates: Use upstream Handlebars partials syntax.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-12 21:11:14 -07:00
Anders Kaseorg 0bd5c46e40 zjsunit/handlebars: Support auto-registering partials.
webpack with handlebars-loader already does this, so we only need to
fix up the tests.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-12 21:11:14 -07:00
Anders Kaseorg db0b33842c templates: Replace templates.render with require calls.
This removes an unnecessary layer of indirection and allows webpack to
catch filename mistakes.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-12 21:11:14 -07:00
Anders Kaseorg 706f13b671 zjsunit: Wrap Handlebars with mocking support.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-12 21:11:14 -07:00