Commit Graph

20909 Commits

Author SHA1 Message Date
Vishnu Ks b077f3c70f requirements: Upgrade django-statsd-mozilla to 0.4.0. 2017-09-19 19:07:58 -07:00
Joshua Pan b201e2c311 hotkey.js: Simplify ctrl+[ hotkey logic. 2017-09-19 19:07:30 -07:00
Joshua Pan d387291b6c reactions.js: Extract open_reactions_popover().
Added tests for open_reactions_popover() also.
2017-09-19 19:07:30 -07:00
Joshua Pan 67064a46e5 compose_state.js: Extract focus_in_empty_compose().
Wrote some tests for the function also.
2017-09-19 19:07:30 -07:00
Brock Whittaker 79933e27a4 Utilize lower 40px of the page for the left sidebar.
This makes the total left sidebar real estate 40px taller and brings
it flush with the bottom of the screen, giving more room to the
streams list.

Fixes: #6549.
2017-09-19 18:44:50 -07:00
Brock Whittaker d1ef863f96 Add perfectScrollbar to default streams table.
This adds perfectScrollbar to the default streams table
because it currently is inside another perfectScrollbar which
actually makes it impossible to scroll the table normally without
enabling the perfectScrollbar library on this.

Fixes: #6391.
2017-09-19 18:43:33 -07:00
Vishnu Ks 5db810b5d7 docs: Fix example code in mock section. 2017-09-19 16:56:56 -07:00
Vishnu Ks 14498d1407 docs: Use real method name instead of foo in mock section. 2017-09-19 16:56:56 -07:00
kunall17 1436d558a3 APNs: Add message body to notification payload.
(Edited by greg to leave the badge logic as is for now.)
2017-09-18 16:37:02 -07:00
Tim Abbott 02d931a53e tools: Fix running full-stack tests from tools/ directory.
Previously these tests required you to run them with the root of the
Zulip repository as the current working directory, just due to
sloppiness.

We clean this up, while also making the path handling more consistent
and involving less fragile code.

Fixes #4169.
2017-09-17 11:12:51 -07:00
Cynthia Lin bd7d9da668 hotkeys: Disable 'n' stream creation if user cannot create streams.
Tweaked by tabbott to handle a corner case and add test coverage.
2017-09-16 09:12:38 -07:00
Tim Abbott 901e0258df purge-old-deployments: Fix purging the symlinks etc.
The recent rewrite of purge-old-deployments accidentally attempted to
purge the symlinks, sockets, lock, and other files in the deployment
directory.

The new version has been tested out in production successfully.
2017-09-16 08:49:05 -07:00
Harshit Bansal 26915bc54f scripts: Make `purge-old-deployments` configurable.
Expands `purge-old-deployments` such that now it accepts the threshold
days as argument. Also `clean-unused-caches` script is automatically
run after purging the old deployments so that the orphaned caches
gets automatically cleaned.

Fixes: #5726.
2017-09-16 08:28:57 -07:00
Harshit Bansal 20f062f726 zulip_tools.py: Extract `may_be_perform_purging()` function.
Based on the `dry_run` flag, this function either purges the list
of directories passed to them or prints a listing of the directories
it would have purged/kept_back, had the `dry_run` flag been false.
2017-09-16 08:28:57 -07:00
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