Commit Graph

21847 Commits

Author SHA1 Message Date
Tim Abbott 15f3d5f714 nginx: Fix some buggy gzip compression configuration.
We weren't compressing SVG, while at the same time were incorrectly
compressing octet-stream (Which meant downloading .tar.gz files in
Chrome would get double-compressed).
2017-10-20 11:01:28 -07:00
Tim Abbott 961e615d9a i18n: Update translations. 2017-10-20 10:31:06 -07:00
Tim Abbott 82a6cc283b register: Fix missing translation tag. 2017-10-20 10:27:29 -07:00
Tim Abbott bd5e7f8965 Revert "i18n: Only load active language."
This reverts commit f04981513b.

We're not sure, but we suspect that this made Zulip not show es for
folks using es_es as their locale.  Further testing is required.
2017-10-20 10:08:17 -07:00
Tim Abbott b6de7e3b90 docs: Mention system bot realm in multiple organization docs. 2017-10-20 09:57:16 -07:00
Tim Abbott 88245d2cd6 migrations: Fix deactivated realm corner cases with 0108.
Previously the default-string-id migration would not correctly handle
ignoring deactivated realms.
2017-10-20 09:22:35 -07:00
Tim Abbott d1cb039c2c test_management_commands: Add check for expected system exit.
This was missed in the recent improvements to
send_webhook_fixture_message.
2017-10-20 09:16:38 -07:00
Tim Abbott 03d72a1cd6 send_webhook_fixture_message: Print useful error messages.
Previously, if this failed, it didn't tell you why.
2017-10-20 09:03:05 -07:00
Tim Abbott 9b791acf50 test_push_notifications: Fix tests failing due to rebase.
message.triggers got recently renamed.
2017-10-19 18:34:28 -07:00
Tim Abbott b33d80707c docs: Document push notification redacting setting. 2017-10-19 18:17:35 -07:00
Maarten Rijke 841f02934d push_notifications: Add setting to redact content.
This commit adds a setting that toggles redacting content of push
notifications and replacing it with "***REDACTED***".
2017-10-19 18:16:06 -07:00
Umair Khan f04981513b i18n: Only load active language.
Before this if we selected zh-hans then i18next would laod zh-hans, zh and
en. Now it will only load zh-hans.
2017-10-19 17:56:49 -07:00
Umair Khan 69fc227eb8 i18n: Create loadPath function.
This function returns the correct URL to retrieve zh-Hans from Django.

Fixes #6885
2017-10-19 17:56:49 -07:00
Umair Khan 4caec524ae yarn: Bump i18next-xhr-backend version to 1.4.3.
This version can take loadPath as a function. i18next sends zh-Hans
as zh-Hans while Django recognizes it as zh_Hans.
2017-10-19 17:56:49 -07:00
Umair Khan 2172185d5a i18n: Store language name in session; not locale.
In the UI we use locale as the code for the language. Django expects
language code. For Simplified Chinese, 'zh_Hans' is the locale which
maps to a directaory under static/locale, and 'zh-hans' is the language
code, which is used in settings.LANGUAGES setting found in Django.
2017-10-19 17:56:49 -07:00
Shubham Dhama e321e15c49 date-separator: Make date rows unselectable.
Fixes #6311.
2017-10-19 17:49:57 -07:00
Tim Abbott c9e29b1c54 check-templates: Document status of remaining bad_files items. 2017-10-19 16:56:46 -07:00
Tim Abbott 2fb46df005 check-templates: Remove exclude rules for removed HTML files.
These webhook integrations were converted to using markdown some time
ago.
2017-10-19 16:56:46 -07:00
Tim Abbott fc4b87ed04 templates: Clean some whitespace issues in markdown_help.
Unfortunately, the rest cannot be easily fixed.
2017-10-19 16:56:46 -07:00
Tim Abbott e80fc93e87 templates: Fix search_operators indentation. 2017-10-19 16:56:46 -07:00
Tim Abbott 59344d77df templates: Clean various items off HTML linter bad list.
Most of these already pass the linter; for the ones that don't, the
fixes are small and don't make the HTML any worse.
2017-10-19 16:56:00 -07:00
Tim Abbott 540cae19a8 puppet: Remove obsolete sparkle configuration.
Sparkle was the auto-update system used by the legacy desktop app.  We
haven't been capable of using it for auto-update in years, so there's
no reason to keep around the configuration.

The new Electron app uses a different system anyway.
2017-10-19 16:35:55 -07:00
Vishnu Ks 4b5327b326 form: During realm creation give option to install in root domain.
This presents multiple states for the subdomain input option
depending on the existence of a root domain.

Commit modified heavily by Brock Whittaker <brock@zulipchat.com>.

Fixes #6863.
2017-10-19 16:10:14 -07:00
Brock Whittaker 5889132732 notifications: Remove test for "webkit" in userAgent.
This removes a test for "webkit" in the userAgent string in order
to see whether notifications should be displayed. This is so that
the notifications process will work correctly in Firefox and not
keep registering as "false" which makes the notifications prompt
continue to re-show itself.
2017-10-19 15:01:12 -07:00
Tim Abbott 1698f979d0 invites: Call confirmation worker consumer in tests.
This makes the automated tests for this queue publish more faithful.
2017-10-19 14:02:44 -07:00
derAnfaenger 3264e4f24a Remove superfluous queue_json_publish imports. 2017-10-19 13:57:54 -07:00
derAnfaenger 2e51d39d69 embedded bots: Add StateHandler tests. 2017-10-19 13:09:23 -07:00
derAnfaenger c8a2702b9a embedded bots: Add functional state handler.
This replaces the former non-functional StateHandler
stub with a dictionary-like state object. Accessing it will
will read and store strings in the BotUserStateData model.

Each bot has a limited state size. To enforce this limit while
keeping data updates efficient, StateHandler caches the expensive
query for getting a bot's total state size. Assignments to a key
then only need to fetch that entry's previous size, if any, and
compare it to the new entry's size.
2017-10-19 13:09:23 -07:00
derAnfaenger a2b7929b22 embedded bots: Alter tests to accept any class name.
Some bots have class names that differ from their module name,
e.g. `helloworld.py` vs. `HelloWorld`. Our tests should accept
all of these, as long as a handler class is present.
2017-10-19 13:09:23 -07:00
Vishnu Ks 534141ed07 popover: Pass value of is_active to userlist popover.
This was forgotten in 4f088292ee,
breaking the right sidebar user popover.
2017-10-19 10:58:35 -07:00
derAnfaenger 07703daf90 page_params: Add list of available embedded bots. 2017-10-19 10:37:55 -07:00
Tim Abbott 91520fca22 realm_emoji migration: Handle relative URLs.
This is necessary for the upgrade path in a case a server was using a
path to a file uploaded in Zulip for their custom emoji.
2017-10-19 09:00:43 -07:00
Tim Abbott 508b560ef0 navbar: improve desktop notifications prompt. 2017-10-19 00:08:41 -07:00
Rishi Gupta e7ba4c5168 emails: Send first welcome email right away.
I think an hour after signup is not the right time to try to get someone to
re-engage with a product.

This also makes the day1 email clearly a transactional email both in
experiencing the product and in the eyes of various anti-spam laws, and
allows us to remove the unsubscribe link.
2017-10-19 00:04:07 -07:00
Rishi Gupta a08543f1ce server settings: Add setting for MAILING_ADDRESS.
The rules here are fuzzy, and it's quite possible none of Zulip's emails
need an address at all. Every country has its own rules though, which makes
it hard to tell. In general, transactional emails do not need an address,
and marketing emails do.
2017-10-19 00:04:07 -07:00
Tim Abbott 63489ebfa5 subdomains: Avoid exception when creating realm on root domain. 2017-10-18 23:51:58 -07:00
Tim Abbott 85917a7269 subdomains: Improve support for using the root domain.
This modifies the realm creation form to (1) support a
realm_in_root_domain flag and (2) clearly check whether the root
domain is available inside check_subdomain_available before trying to
create a realm with it; this should avoid IntegrityErrors.
2017-10-18 23:38:55 -07:00
Tim Abbott 2604eb0a07 test_classes: Refactor submit_reg_form_for_user.
This is a pure refactor in preparation for adding another argument.
2017-10-18 23:30:51 -07:00
Tim Abbott 0bfcf2da41 subdomains: Don't compute realm_subdomain if not needed.
We were doing an unnecessary database query on every user registration
checking the availability of the user's subdomain, when in fact this
is only required for realm creation.
2017-10-18 23:05:15 -07:00
Umair Khan c14e9f3ae8 registration: Add LDAP tests. 2017-10-18 23:05:09 -07:00
Umair Khan 3d6715445a ldap: Fix test_registration_through_ldap.
Fixes #6663
2017-10-18 23:05:09 -07:00
Tim Abbott 642086ff65 subdomains: Pass whether root domain is available to registration.
This data is necessary to determine whether to offer the root domain
in the realm creation form.
2017-10-18 22:53:10 -07:00
Tim Abbott 0884588a5e subdomains: Add a variable for how root domain is represented.
We use Realm.SUBDOMAIN_FOR_ROOT_DOMAIN as the special name for how the
root domain is referred to as a subdomain in the code.
2017-10-18 22:47:31 -07:00
Vishnu Ks 07438b2f2c forms: Save realm_creation setting on RegistrationForm.
This will be useful for making the checking behavior depend on the
status of this form.
2017-10-18 22:40:20 -07:00
Tim Abbott 4ddb812354 check_subdomain: Remove case for user_subdomain being None.
With REALMS_HAVE_SUBDOMAINS always on, user_subdomain is never None,
so this was just dead code.
2017-10-18 22:35:07 -07:00
Tim Abbott b850875840 mypy: Change realm.subdomain to no longer be Optional.
It hasn't been optional since we removed REALMS_HAVE_SUBDOMAINS.
2017-10-18 22:35:05 -07:00
Tim Abbott 1ab2ca5986 subdomains: Extract zerver.lib.subdomains library.
These never really belonged with the rest of zerver.lib.utils.py, and
having a separate library makes it easier to enforce full test
coverage.
2017-10-18 22:27:48 -07:00
Brock Whittaker 7107d19aeb notifications: Detect whether notifications are blocked.
This checks whether the user is already in the state of having
blocked notifications, so that we can *not* show them the banner
to enable notifications, since browsers won't allow the request
to go through again.

Perhaps in a follow up we should create a different banner for
this case that shows how to enable notifications at the browser
level for this site.
2017-10-18 21:55:43 -07:00
Brock Whittaker 96c66d4297 panels: Make them mobile responsive.
This makes them responsive to resizes and fixes a responsive
issue with the floating recipient being too high when the alerts
were more than one line height.
2017-10-18 21:55:43 -07:00
Aastha Gupta 0fae83b301 notifications: Prompt user to enable desktop notifications.
This is a two-step notifications process that will ask a user
to enable notifications and if they click exit give them three
options:

1. Enable notifications.
2. Ask later.
3. Never ask on this computer again.

The first two are self-explanatory (ask later = next session it
asks again). The third is captured and stored in localStorage and
a check is done on page load to see whether or not notifications
should be displayed.

Commit modified heavily by Brock Whittaker <brock@zulipchat.com>.

Fixes #1189.
2017-10-18 21:55:43 -07:00