Commit Graph

20895 Commits

Author SHA1 Message Date
Harshit Bansal 5662726a22 emoji_picker: Add ability to search by emoji aliases.
Fixes: #6250.
2017-09-16 08:24:05 -07:00
Harshit Bansal 6f7bf32e15 emoji_picker: Extract `toggle_reaction()` function. 2017-09-16 08:24:05 -07:00
Harshit Bansal 60b0e0f801 emoji_picker: Add `get_alias_to_be_used()` function.
Given a `message_id` and `emoji_name` this function returns the
alias of the emoji user used for reacting to this message, otherwise,
if he has not reacted returns the passed `emoji_name` as it is.
2017-09-16 08:24:05 -07:00
Harshit Bansal cf712b36c0 emoji.js: Add `emoji_aliases` dictionary.
This new dictionary contains a mapping from codepoint of an emoji to
all of its aliases.
2017-09-16 08:24:05 -07:00
Harshit Bansal dae51b821d message_controls: Don't auto-hide message control if a popover is open.
If a reactions picker is open then don't auto-hide the element over
which it is based off. Earlier we were inconsistently auto-hiding
some elements while keeping others visible.
2017-09-16 08:17:41 -07:00
Harshit Bansal afba03f84e emoji_picker: Change reaction popover's base element.
Change the reaction popover to be based off the container elements
for the various message control icons. This will enable us to easily
control the visibility of the base element when the popover is opened
or closed. Also removes redundant `reactions_hover` class.
2017-09-16 08:17:41 -07:00
Harshit Bansal 16885ef0a7 emoji_picker: Correctly restore the title attribute of base element.
Bootstrap's `fixTitle()` function removes the base element's original
title attribute. This commit fixes some weird behaviors by restoring
the original title of the element on which the popover is based off.
2017-09-16 08:17:41 -07:00
Harshit Bansal 918e2519b0 emoji_picker: Bring focus back to filter on typing while navigating.
Fixes: #6112.
2017-09-16 08:14:47 -07:00
Tim Abbott b4aa1336e7 logging: Avoid logging certain common 404 errors to error logs.
This should help keep /var/log/zulip/errors.log relatively clean on
production Zulip servers.
2017-09-16 08:07:06 -07:00
Vishnu Ks f4c69bb126 tools: Create tool for inlining email CSS during provision. 2017-09-16 07:17:48 -07:00
Vishnu Ks c2f8fc9500 requirements: Add premailer for inlining email CSS. 2017-09-16 18:54:29 +05:30
invinciblycool 5475c5cedb tests: Replace test_user_agent_parsing with a normal test.
Previously, this was its own separate test script; now it's a normal
part of the test suite.

Tweaked by tabbott to use a proper test method.

Fixes #6327.
2017-09-16 03:56:18 -07:00
Tim Abbott e8820f4456 modals: Don't close settings modals when clicking inside modal.
We only want to close the modal if you click outside its area.

Fixes #6566.
2017-09-16 03:44:42 -07:00
Aditya Bansal ddf2075228 Make migration 0032 use an old version of user_avatar_path.
This fixes upgrading from very old Zulip servers (e.g. 1.4.3) all the
way to current.

Fixes: #6516.
2017-09-16 03:27:02 -07:00
Tim Abbott a33c98f23e push_notifications: Require the message.triggers fields to exist.
The code was already assuming it implicitly, and making it explicit
improves the readability.
2017-09-16 03:14:56 -07:00
Steve Howell c4b17f2f80 Optimize get_recipient_info() with get_ids_for().
The get_ids_for() function produces a 2x speedup for
1000 users.
2017-09-16 03:07:13 -07:00
Brock Whittaker 32af99cd4d Display an error for the ZulipDesktop unsupported platform.
This displays an error at the top of the screen on page load that
will inform any user with the userAgent string "ZulipDesktop" that
they should upgrade to our newer electron app

Fixes: #6551.
2017-09-16 03:01:51 -07:00
Tim Abbott a1ddd934b4 bots: Fix calculation of bot domain with REALMS_HAVE_SUBDOMAINS.
Previously, the bot domain was calculated correctly in most
circumstances, but if you were using the root domain, it would be
e.g. ".chat.zulip.org", not "chat.zulip.org".  We fix this, with
perhaps more use of setting REALMS_HAVE_SUBDOMAINS than would be ideal
if we weren't about to set that True unconditionally.
2017-09-16 02:49:15 -07:00
Cynthia Lin 6d20557b61 user docs: Update docs referencing Organization permissions page. 2017-09-16 02:26:47 -07:00
Cynthia Lin a758c2615e user docs: Update docs to point to Organization settings page. 2017-09-16 02:26:47 -07:00
Cynthia Lin b721ada944 user docs: Update docs to point to Organization profile page. 2017-09-16 02:26:47 -07:00
vbNETonIce 264dcb4e2d docs: Fix path to restart-server script. 2017-09-16 02:22:30 -07:00
Tim Abbott 19d390456a docs: Update production docs to not go through zulip.org. 2017-09-16 02:20:15 -07:00
Tim Abbott 6c4006625d nginx: Update zulip.org nginx configuration.
* Added zulipbot to configuration.
* Added redirect to zulipchat.com for homepage.
2017-09-16 02:09:53 -07:00
Tim Abbott 0d5badb71a urls: Remove robots.txt blocking Zulip serves from search engines.
This was added back in 2012 and seems to have been accidentally not
updated since then.
2017-09-16 01:59:40 -07:00
Brock Whittaker b5db5c9703 Show javascript exceptions and `blueslip.error` in development.
This now shows `blueslip.error` and other JS exceptions in development
in the alert box at the top of the page.  Hopefully this will make it
a lot easier to notice newly introduced JS exceptions when working on
Zulip.

Tweaked by tabbott to handle all JS errors, not just blueslip.error.

Fixes: #6155.
2017-09-16 01:02:28 -07:00
Brock Whittaker ec4cd950ea Make tooltips more legible.
This makes the JavaScript tooltips more legible by increasing
the font size and decreasing the line-height, while also increasing
the opacity of the tooltip from 0.8 => 1.
2017-09-16 00:41:57 -07:00
zeneli 17d35af334 docs: Fix filename for new application view URL. 2017-09-16 00:38:32 -07:00
Tim Abbott e1498988d9 test_choose_realm: Hardcode REALMS_HAVE_SUBDOMAINS.
This is the only case that'll be important in the future, and this
is a nice checkpoint on the path to making REALMS_HAVE_SUBDMAINS=True.
2017-09-15 13:11:12 -07:00
Tim Abbott 064c8e39d6 backends: convert GitHub auth tests to consistently use zulip subdomain. 2017-09-15 13:09:02 -07:00
Tim Abbott f1133ab53e test_notifications: Fix HTML tests to assume REALMS_HAVE_SUBDOMAINS.
This is a step towards making REALMS_HAVE_SUBDOMAINS the default.
2017-09-15 12:28:38 -07:00
Steve Howell 84041d3195 Use itertools.groupby in bulk_get_subscriber_user_ids().
This results in about a 20% speedup by making more O(N)
things happen in C vs. Python.
2017-09-15 10:44:32 -07:00
Steve Howell 24b9f72b22 Use raw SQL in bulk_get_subscriber_user_ids().
This leads to more than a 2x speedup when tested with
20k+ total subscribers.  (For large realms with lots of default
streams, this function deals with LOTS of data, so it is important
to optimize.)
2017-09-15 10:44:32 -07:00
Steve Howell 1553dc00e0 Introduce StreamRecipient class.
This class encapsulates the mapping of stream ids to
recipient ids, and it is optimized for bulk use and
repeated use (i.e. it remembers values it already fetched).

This particular commit barely improves the performance
of gather_subscriptions_helper, but it sets us up for
further optimizations.

Long term, we may try to denormalize stream_id on to the
Subscriber table or otherwise modify the database so we
don't have to jump through hoops to do this kind of mapping.
This commit will help enable those changes, because we
isolate the mapping to this one new class.
2017-09-15 10:44:32 -07:00
Steve Howell fc2e485ca7 Sort emails in gather_subscriptions().
This helps makes the tests more deterministic.
2017-09-15 10:44:32 -07:00
Tim Abbott 15781dbc83 server_settings: Add email auth related features to data sent to clients.
This should make it possible for the mobile app to correctly allow
non-email addresses as usernames exactly when it makes sense to do so.
2017-09-15 10:30:20 -07:00
Supermanu ac79bbfe08 login: Enable non-email username to login. 2017-09-15 10:30:19 -07:00
Supermanu 5f41f3c3cb backends.py: Expose backends that require email usernames 2017-09-15 10:29:02 -07:00
Supermanu 28beddfd76 backends.py: Enable auth with any ldap attributes as username.
This commit enables user to authenticate with any attribute set in
AUTH_LDAP_USER_SEARCH given that LDAP_EMAIL_ATTR is set to an email
attributes in the ldap server. Thus email and username can be
completely unrelated.

With some tweaks by tabbott to squash in the documentation and make it
work on older servers.
2017-09-15 10:28:41 -07:00
Robert Hönig fb39e884c8 docs: bots guide: Add section for writing tests. 2017-09-15 08:59:21 -07:00
Robert Hönig e01dede172 docs: bots guide: Make API subsection of developer tutorial. 2017-09-15 08:55:35 -07:00
rht 107e6b4c51 requirements: Clean up dev.txt. 2017-09-15 07:58:40 -07:00
rht 2d06004ee9 requirements: Add documentation on regenerating lockfiles. 2017-09-15 07:58:19 -07:00
Tim Abbott b334f3a9a4 locale: Update translations from transifex. 2017-09-15 06:46:38 -07:00
Brock Whittaker d7651bdd25 Restyle default streams list to be grey-box and inline.
This moves the form to an inline style and restyles the box to be green.
2017-09-15 04:57:03 -07:00
Brock Whittaker d7d5b382a7 Change realm filter settings box to be grey.
This changes the realm filter settings box to be the same grey as the
emoji add box instead of the green it was before.
2017-09-15 04:57:03 -07:00
Brock Whittaker 73ac9f4406 Restyle emoji box to look grey, inline form.
This makes it more compact as well as recoloring it to not be green.
2017-09-15 04:57:03 -07:00
Brock Whittaker 78adf01850 Normalize `.settings-section-title` headers.
This normalizes the headers to all look the same and in a larger font
size + weight.
2017-09-15 04:57:03 -07:00
Brock Whittaker 05ae3f643d Make `.grey-box` an unscoped, generic class.
This now makes it accessible outside of the subscriptions overlay.
2017-09-15 04:57:03 -07:00
Rishi Gupta b9c8747bd0 hotspots: Use tutorial_status to manage whether we show hotspots. 2017-09-15 04:14:52 -07:00