Commit Graph

29617 Commits

Author SHA1 Message Date
Joshua Pan ad1df0ebeb settings: Add support for customizing the top-left logo.
This adds a new realm_logo field, which is a horizontal-format logo to
be displayed in the top-left corner of the webapp, and any other
places where we might want a wide-format branding of the organization.

Tweaked significantly by tabbott to rebase, fix styling, etc.

Fixing the styling of this feature's loading indicator caused me to
notice the loading indicator for the realm_icon feature was also ugly,
so I fixed that too.

Fixes #7995.
2018-12-18 12:44:52 -08:00
Tim Abbott 34f5218a0d ui_report: Add support for passing "".
I'm not really a fan of the "Failed:" pattern in some places, and this
lets us avoid it.
2018-12-18 12:33:42 -08:00
Tim Abbott dd946fff1f lint: Improve ui_report.error linter rule.
We now allow passing "" as the first argument.
2018-12-18 12:33:15 -08:00
Joshua Pan 5c196d70bd css: Switch upper left logo and text to a single image.
This is preparation for allowing customization of this field.
2018-12-18 12:19:56 -08:00
rht a093d45064 provision: Check for pg_hba.conf existence for doing postgres initdb.
Apparently, an empty pg_datadir is initialized after postgresql-10 is
installed.
2018-12-18 12:07:45 -08:00
rht 3f1005dab1 setup-advanced: Update section anchor on "installing directly ...". 2018-12-18 12:07:22 -08:00
rht 3060ee9397 provision: Fix typo when checking that vendor is Fedora. 2018-12-18 12:07:03 -08:00
rht ac8a164709 setup-advanced: Add notice on bootstrap requirement for CentOS & Fedora. 2018-12-18 12:07:03 -08:00
Vaibhav 7371fd2647 notifications: Refactor code using logic from message_viewport.
Logic for checking if the last message in the current table is visible was
already written in message_viewport.js; Code in notifications.js is changed
to reduce redundancy.
2018-12-18 11:53:08 -08:00
Steve Howell f4f59a7557 presence: Rename presence.set_user_status() -> set_info_for_user(). 2018-12-18 11:01:10 -08:00
Steve Howell ba69dcc74c presence: Rename activity.set_user_status().
We are trying to carve room for a more specific
"user_status" concept, which refers to statuses
that users specifically set, like "I'm away".

So we call this function "update_presence_info",
which reflects that it's more about actual
"presence"--i.e. the user really is present
in the browser, even though the actual human
may not want to be disturbed.
2018-12-18 11:01:06 -08:00
Steve Howell 2c719bdb3f buddy list: Exclude current user from searches.
The current user gets excluded from all non-empty
searches, even ones that match the user, since
it can look funny when the user's at the top of a
search, and you'd never need to search for yourself
(again, since the current user is at the top of
the buddy list).
2018-12-18 11:01:06 -08:00
Steve Howell 712054e128 node tests: Clean up buddy_data test.
It's still a bit messy, but we add a real
user for "me", add a specific human user (Selma),
and make the setup an ordinary function.
2018-12-18 11:01:05 -08:00
Steve Howell bf152b94b5 presence: Put current user back at the top of the buddy list.
We tried this out, reverted it, and then put it back.
2018-12-18 11:01:01 -08:00
Tim Abbott bdb3da4504 eslint: Add key-spacing linter rule.
Apparently, we didn't have one of these, and thus had a moderate
number of generally very old violations in the codebase.  Fix this and
clear the ones that exist..
2018-12-18 10:41:06 -08:00
Anders Kaseorg 392175d6e8 Use #!/usr/bin/env for bash shebangs.
/bin/sh and /usr/bin/env are the only two binaries that NixOS provides
at a fixed path (outside a buildFHSUserEnv sandbox).

This discussion was split from #11004.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-12-17 17:21:08 -08:00
rht 66c02e4dc7 docs: Update direct dev installation to mention Centos & Fedora.
Tweaked by tabbott to also deprecate the older instructions.
2018-12-17 16:33:31 -08:00
rht 5e12eb8d34 provision: Fix typo in list of services on RedHat. 2018-12-17 16:30:48 -08:00
rht 42cbf2071b provision: Skip RedHat postgresql initdb if already initialized.
We only need to initialize a postgres database once in the lifetime of
a system.
2018-12-17 16:29:50 -08:00
rht 295cbe7b9c provision: Add build-pgroonga and use it for Fedora. 2018-12-17 16:23:57 -08:00
rht 80ba105be5 provision: Abstract out SYSTEM_DEPENDENCIES. 2018-12-17 16:23:46 -08:00
rht b732fe819e provision: Add Fedora support. 2018-12-17 16:23:44 -08:00
Eeshan Garg 88cf6777d0 python-zulip-api: Upgrade to latest PyPI release (0.5.6). 2018-12-17 18:37:20 -03:30
Eeshan Garg ebf5104923 bot_lib: Add user_id attribute to EmbeddedBotHandler.
Support for extended mention syntax was added as a part of
commit fbe99b812ee8fbca7257a5b7156c57a6cd74195b in the
python-zulip-api repository. The relevant function,
extract_query_without_mention now relies on the client's ID
in order to check for the extended syntax. Since the
EmbeddedBotHandler has no user_id attribute, the latest
python-zulip-api release broke a test in the main repo.
2018-12-17 18:37:20 -03:30
Tim Abbott d84d3777fd casper: Fix admin tests failing.
This was broken with the recent realm filters commits.
2018-12-17 13:43:13 -08:00
Rishi Gupta d2b47dc270 org settings: Rename linkification regular expression field to pattern.
We use pattern in the table, so we should match that in the form.
2018-12-17 12:58:52 -08:00
Tim Abbott d469c14d11 docs: Advertise arbitrary org GitHub patterns for linkifiers.
Now that we support this, we should make it really obvious that we do.

Also, link to the Help Center article.
2018-12-17 12:58:52 -08:00
Tim Abbott ad9e063a5c settings: Rename realm_filters template to use linkifiers. 2018-12-17 12:29:39 -08:00
Tim Abbott 12b3e79661 settings: Rename "settings_filters" to "settings_linkifiers".
This makes the JS codebase match the UI for how to describe this
feature.  No user-facing effect.
2018-12-17 12:28:55 -08:00
Tim Abbott c87a533b3b realm filters: Make validation error messages more useful. 2018-12-17 12:25:12 -08:00
Tim Abbott 34e39248fc linkifiers: Add validation support for multiple items.
This is a simple change to our validation, to allow multiple copies of
the main linkifier syntax, which lets us support things like generic
GitHub URLs.

Fixes #10914.
2018-12-17 12:19:59 -08:00
rht 2dc1dc8ec2 provision: Replace overwrite_symlink with `sudo ln -sf`.
overwrite_symlink doesn't work for a non-root user when accessing root
content.
2018-12-17 11:50:15 -08:00
rht 888388cf89 setup-yum-repo: Add -y flag to `yum update`. 2018-12-17 11:49:43 -08:00
Tim Abbott a0da4f6d30 python: Clean up various if False blocks.
Most of these are now-unnecessary typing imports; some are just
improved comments for those with other mypy motivations.
2018-12-17 11:14:47 -08:00
Tim Abbott 2558f101af docs: Add documentation for `if False` mypy pattern in scripts.
This should help make it clear what's going on with these scripts.
2018-12-17 11:12:53 -08:00
Tim Abbott 209df75ffa lint: Enforce use of Python 2 style typing in zulint.
This is intended to be extracted as an external project that supports
Python 2+3.
2018-12-17 11:00:08 -08:00
Tim Abbott 35901cc955 lint: Fix a tooling test failure in last commit.
This is what I get for copy-pasting lint rule blocks.
2018-12-17 10:53:08 -08:00
Tim Abbott bce90a3340 lint: Add lint rule for scripts importing typing improperly.
This is a common bug that users might be tempated to introduce.

And also fix two instances of this bug that were present in our
codebase, including an important one in our upgrade code path.
2018-12-17 10:46:37 -08:00
Tim Abbott 47c4a2d21a upgrade-zulip-from-git: Remove buggy typing import.
This broke running this on Python 3.4, where typing isn't in stdlib.
2018-12-17 10:33:52 -08:00
Tim Abbott 128a08e0a4 docs: Rearrange mypy docs to deprioritize stubs section.
The stubs section is less important than the discussion of how to
handle mypy trouble.
2018-12-17 10:30:51 -08:00
Tim Abbott 612e70a64b docs: Add a warning about editing mypy stubs and the daemon. 2018-12-17 10:28:18 -08:00
Steve Howell 7a44d99b96 settings: Eliminate admin_sections module.
We move all of its logic into settings_sections.

Note that this is slightly more than a refactor.
We are slightly more aggressive about resetting
sections.  For example, if you go into Settings,
then exit the overlay, then go into Manage
Organization, we will now reset sections for both
groups.
2018-12-17 10:13:20 -08:00
Steve Howell 0543e8fbc1 settings: Call maybe_disable_widgets() in set_up() methods.
We now rely on set_up() methods to call their
own module-specific versions of maybe_disable_widgets()
in the codepath for admin_sections.load_admin_section().

And then for live updates, we just explicitly call
all four modules that support maybe_disable_widgets().

This should make switching between sections slightly faster,
and it also reduces the risk of module A messing with
module B's state.  (Granted, we have lots of other ways
that modules can mess with each other's state.)
2018-12-17 10:13:18 -08:00
Steve Howell b88a5700f6 settings: Extract multiple versions of maybe_disable_widgets(). 2018-12-17 10:13:16 -08:00
Tim Abbott b29d66f34b i18n: Rename email subject files so i18n detects them.
Apparently, when we renamed these files to no longer have a .txt
extension, we accidentally removed them from the set of strings for
translation, because `manage.py makemessages` by default only
processes .txt and .html files under the templates/ directory.

Fix this by adding a .txt extension.
2018-12-17 10:00:49 -08:00
Tim Abbott b2fc017671 i18n: Use the recipient's language when sending outgoing emails.
It appears that our i18n logic was only using the recipient's language
for logged-in emails, so even properly tagged for translation and
translated emails for functions like "Find my team" and "password
reset" were being always sent in English.

With great work by Vishnu Ks on the tests and the to_emails code path.
2018-12-17 09:49:36 -08:00
Vishnu Ks b10c23c233 emails: Call send_email when DEVELOPMENT_LOG_EMAILS is enabled.
The previous version was also doing almost the same thing.
But checking for DEVELOPMENT_LOG_EMAILS would allow us
to control the call of send_email by altering the value
of DEVELOPMENT_LOG_EMAILS in tests.
2018-12-17 09:40:32 -08:00
Tim Abbott cb9b526f0c third: Extract bootstrap typeahead to its own module.
Bootstrap's typeahead is the main part of the project that we've
forked, and moving it to its own module should help unlock our ability
to upgrade bootstrap itself.
2018-12-17 09:06:52 -08:00
Steve Howell d8c454b097 todo lists: Make lists sharable.
We no longer restrict who can add tasks or check
them off.

Fixes #10440
2018-12-17 07:40:27 -08:00
Tim Abbott e9f889d57e portico: Fix totally broken ToS re-accept form styling.
This form isn't actively used, which is how it ended up broken, but it
basically didn't display its content properly at all.

Convert it to use our standard white-box framework.

This still doesn't look great in various ways, but it's at least not
obviously totally busted now.
2018-12-17 07:28:29 -08:00