Commit Graph

4965 Commits

Author SHA1 Message Date
Allen Rabinovich 332116f8fb Change the recipient bar background to a darker gray with less gradient
(imported from commit 7586453625da76623771cff9fe147d22c9f8709d)
2013-07-02 13:08:44 -07:00
Leo Franchi 779ab0e3ca Get apply_markdown value from REQ if it exists
(imported from commit c93b0a96564535c0a0162e827a67379fdf166de9)
2013-07-02 15:04:42 -04:00
Luke Faraone 6eb3d8b8b1 Syntax fix for staging_app_frontend.pp.
(imported from commit c363e6e9c18b08467555a1f0520680736dab2dd1)
2013-07-02 14:54:16 -04:00
Steve Howell 86e89b66e7 Make GetProfileTest tests pass deteministically.
(Make sure users have at least one message in their stream.)

(imported from commit a6654447ae9a9626f5b3d5e01ffaa00dde17c79b)
2013-07-02 13:17:35 -04:00
Luke Faraone 7b30a8e7c0 Explicitly copy over the zulip-staging files in Puppet.
Unlike other directories, we explicitly enumerate the files we want to be
present in sites-available, so the previous commit series did not actually
instruct puppet to make the zulip-staging files accessible.

(imported from commit 22efc4d272eba8d6c869edbaa9114c50e1988288)
2013-07-02 12:14:41 -04:00
Leo Franchi 93765b0568 Keep variable in list comprehension from shadowing
(imported from commit 2d2bbc029d7c13b5e6f125bd5f79ba3d73d3c677)
2013-07-02 12:10:23 -04:00
Luke Faraone 1be1cb121c nginx / Puppet configuration for staging.zulip.com
We create a new sites-available entry which is essentially a duplicate of
sites-available/humbug-staging with s/humbug/zulip, and add the associated
symlink directive in Puppet.

(imported from commit febcb585ce93c21c6849d96458cc2bd096b30538)
2013-07-02 12:04:56 -04:00
Luke Faraone c7ab5c6836 Include certificate for staging.zulip.com.
The key for this certificate is the same as the key for
staging.humbughq.com.

The combined-chain was created according to the manner described in
commit 6544938ef29.

(imported from commit 99d5658d822bdffdd05b30c24f2e77d150ebf06f)
2013-07-02 12:04:56 -04:00
Leo Franchi a2294c05d5 Send the proper Content-Type header on our Tornado responses
(imported from commit 574d2421541449fae0f91509dc3bc018e49bd24d)
2013-07-02 11:46:10 -04:00
Tim Abbott 8dcdf74af8 update-deployment: Wait up to 5 minutes for lock, rather than just failing.
(imported from commit 3677354841d6084f0917acde4baa79f9c8c3d26b)
2013-07-02 11:36:40 -04:00
Tim Abbott 152ba9ccc7 update-deployment: Remove unnecessary arguments.
(imported from commit b28336b1e45de85a7bc24ee89327d19e106cf3cb)
2013-07-02 11:36:40 -04:00
Luke Faraone b1b2af9b2a Add ZULIP.COM and subdomains to ALLOWED_HOSTS
(imported from commit 94e28b5973f4d83ee4f63dbae7c8def0c36b9160)
2013-07-02 11:21:43 -04:00
Tim Abbott f473cb5fbe Use bulk operations in notify_subscription_{added_removed}.
After fixing the high numbers of database queries earlier in this
branch, I found that sending 500 RabbitMQ messages for a bulk change
in subscriptions was consuming more than half the time for these (and
then we'd end up with 500 events in a queue).  To handle this, we
create a "user X subscribed to these N streams" event, rather than
sending one event for each individual subscription.

(imported from commit 44a34a9fab9b67e9f0da6fee53335d8c5030392b)
2013-07-02 10:50:29 -04:00
Tim Abbott 74fd508b2f Remove subscriptions using bulk queries.
This improves the performance of unsubscribing to N streams by more
than a factor of 10 for large N.

(imported from commit a529e6d3ac4452f49c2294908d275280019bbd05)
2013-07-02 10:50:29 -04:00
Tim Abbott 7f3fded612 Add default stream subscriptions using bulk queries.
(imported from commit f6d7415269cc74836c1c331741665b01cb1090cd)
2013-07-02 10:50:29 -04:00
Tim Abbott 703dec0344 Use bulk queries to get the recipients for narrowing to MIT streams.
Otherwise we could in theory make dozens or hundreds of
memcached/database queries to handle a narrow.

(imported from commit 232f38d8c005b9aef6f12f2f9a4d68a19134d038)
2013-07-02 10:50:29 -04:00
Jeff Arnold 45116a0b61 For mit.edu, include unclasses and .d classes in narrowed views
(imported from commit e21aab715c949d4348c447e6e135281b47e06b98)
2013-07-02 10:50:29 -04:00
Tim Abbott dc54a24766 Add util.escape_regexp.
(imported from commit 3ba7caa0d444a64b228bcb5f5c658c8363ddfbf5)
2013-07-02 10:50:29 -04:00
Tim Abbott a4cf528fad Use a bulk query to fetch the streams in list_to_streams.
This substantially improves the performance of all the functions using
this helper.

(imported from commit 9c247e82f392475c8ddf46b4b498ef293911e9f5)
2013-07-02 10:50:29 -04:00
Tim Abbott a66bb508bb Use bulk queries for adding many subscriptions to a single user.
Previously we only used bulk queries when adding many users to a
single stream, resulting in very slow performance when subscribing
users to large numbers of streams (as happens when setting up a new
MIT realm user).

(imported from commit 849fa7b2a1a146c0a9adc1c727c20c9fbfb7b425)
2013-07-02 10:50:28 -04:00
Tim Abbott 738793a962 bulk_add_subscriptions: Remove incorrect comment.
This comment was only ever accurate for prototype versions of
bulk_add_subscriptions prior to it being committed to master.

(imported from commit 89b9dc49423c45553cb6c810d97eea4583ff0f69)
2013-07-02 10:50:28 -04:00
Tim Abbott c6916faca2 Genericize the bulk cache fetching logic.
(imported from commit 52664ce0ad800efff6b583e80c27701638ff6205)
2013-07-02 10:50:28 -04:00
Steve Howell e5a661c47f Remove AuthedTestCase.message_stream.
The two remaining callers just call get_user_messages directly.

(imported from commit 438252687faab7c25e8c7e7f2222974d30d8453d)
2013-07-02 10:50:02 -04:00
Steve Howell 1899584e87 Use most_recent_message() in a couple more places in the tests.
(imported from commit aecaa664db7b9486a38ec9ed375cad7220cdc98e)
2013-07-02 10:50:02 -04:00
Steve Howell 0a42d01003 Speed up and tidy up test_new_message() in UnreadCountsTest.
(imported from commit dee4c591de25b70077d6e765c10a9358a5978120)
2013-07-02 10:50:02 -04:00
Steve Howell a6ceb7dd11 Use Message.objects.count() to speed up tests.
(imported from commit dff1921b00a52929368d8a352f2ce8c05f63ec1f)
2013-07-02 10:50:02 -04:00
Steve Howell a989d5181f Speed up tests with message_stream_count().
The message_stream_count() function uses Django's count() method,
which is more efficient than doing len() on array of full objects.

(imported from commit 9c20a89a2cd02d9d39341132330d03a7f6c8be25)
2013-07-02 10:50:02 -04:00
Steve Howell 504cea7d0c Remove filter_by_subscriptions(). (dead code)
(imported from commit e6a9ef597f2dc281851b0669b64646ee10313480)
2013-07-02 10:50:02 -04:00
Steve Howell d94f91fd43 Simplify do_send_messages() from prior commit.
This change removes an "if True:" that was
introduced to make the prior commit a bit more readable.
It also combines two loops, since the second loop is no
longer conditional.

(imported from commit df58f1e5de72d5669f6468fbff54fb62cd22cedb)
2013-07-02 10:50:02 -04:00
Steve Howell a4db7de330 Actually test callbacks in GetUpdatesTest.
The tests in GetUpdatesTest had some callback logic that has
been dead code for at least three months.  We now fully exercise
the callback codepath and make sure that the callbacks do happen.

(imported from commit f5d8fbab28ecc34dc81d3d0c29058b66c10f378f)
2013-07-02 10:50:02 -04:00
Steve Howell 3f047ec703 Speed up message_stream in tests.py
(imported from commit 042a763cda33e38e370ed7a185e0b8cdd61a806b)
2013-07-02 10:50:01 -04:00
Steve Howell d3e3c21273 Mark more tests as slow.
(imported from commit 3c109d671e790c8025a4924238c921e71b57f67c)
2013-07-02 10:50:01 -04:00
Steve Howell e815433fa0 Cache api key lookups in our back end tests.
(imported from commit 09973c5355aa02c2bdda4a7cecd8721792bb3c3c)
2013-07-02 10:50:01 -04:00
Leo Franchi 975e13a1b8 Update sparkle to our 0.3.0 release
(imported from commit bd02d67fbd13d709b579f93a69d625da5517eec7)
2013-07-02 10:40:12 -04:00
Kevin Mehall 4b6b8cb3f9 Rename timerender.render_time to render_date.
It only renders the date part now.

(imported from commit 6cbfb4175a8ed1b69b99a6f16ee9eaa2cb36e0de)
2013-07-02 10:13:57 -04:00
Kevin Mehall 6b07c2cf27 Don't re-use "Last edited:" strings.
These contain timerender spans with unique IDs. If this string is cached
and re-used in a narrowed view, there are elements with duplicate IDs,
and only one of them is updated at midnight.

(imported from commit 29469fb5f0d8a9b7fe7988849d2936c49d4a038d)
2013-07-02 10:13:57 -04:00
Kevin Mehall 2857d0b4e1 Show time again in "Last edited" message.
As of f69d01b and e4a9f80, timerender only deals with the date part.
Since the time does not change when the friendly dates are updated,
just append the time outside of the span.timerender.

(imported from commit 18ec93550782c6fa8447ebc608f95da79d28dc8d)
2013-07-02 10:13:56 -04:00
Leo Franchi 7036915933 Add windows sparkle files
(imported from commit b7c0770acd34f44e961014a00d2059dfc7bef701)
2013-07-01 16:25:35 -04:00
Luke Faraone cf81c46c77 Omit fonts.css on QtWebKit clients
QTBUG-3467 prevents non-normal-face @font-face fonts from being used when
defined as such in CSS. To work around this, the desktop applications now
ship the Humbug font themselves, and this commit causes the server to no
longer send the problematic CSS rules to those clients.

We have some duplication insofar as we now have two minified CSS files, but
this is better than conditionally applying the CSS at page runtime.

(imported from commit 9a887f9fb8002d44171d366d1249ebbf21cc9c77)
2013-07-01 14:37:58 -04:00
Kevin Mehall 0f839522a7 Increase shown subjects to 8 (+ any unread), per discussion on
corporate > singlehop.

(imported from commit e4c28670e33ca0ea6ecb59d1ce94efb28e86e23a)
2013-07-01 13:35:00 -04:00
Kevin Mehall 371b3827d2 Show unread subjects in stream sidebar.
Trac #1403.

This shows the 5 most recent subjects, as well as any others with unread messages. This
requires tracking all subjects and filtering at display time, rather than filtering when
building the subject list.

(imported from commit 8bda7d50e6785a6e70abea4b3af4d03a16d076d3)
2013-07-01 13:35:00 -04:00
Steve Howell 1e246ba32d Use our own buttons and text field for uploading bot avatars.
(The file-input widgets that come with browsers are ugly and
nonstandard across browsers, so it is a common technique to
have your own button that controls the file upload, and it
delegates to a hidden copy of the browser file-input widget.
We also allow you to clear the file.)

(imported from commit b55ef655e75746330dc3cc396cb908670e5019cc)
2013-07-01 11:27:37 -04:00
Steve Howell b04bd4a1ad Change text field hints for adding new bots.
(imported from commit 184888130b2c72f72266d32ced83ed1f23479c12)
2013-07-01 11:27:37 -04:00
Steve Howell 56ac727840 Style errors for bot avatar file uploads.
(imported from commit 2d16a860bc54b07117ce724dbdcf109233ac43e9)
2013-07-01 11:27:37 -04:00
Steve Howell 50c4990452 Right-align "Create Bot" button to its form.
(imported from commit 88449f52da11134d7c13bbb81b9346e1232ebd42)
2013-07-01 11:27:37 -04:00
Steve Howell 4af6345cf7 Align labels and fields in Add-new-bot form.
(imported from commit 238144dea105937776e0bd643d4a696492856b2f)
2013-07-01 11:27:36 -04:00
Steve Howell b06f34b55b Use portrait alignment for adding-bots form.
The add-bots form used to have a landscape alignment, as it was
integrated into the same HTML table that showed your existing bots.
This became unwieldy once we allowed users to upload avatars.

(imported from commit 246a35be77ce1679d595271e6911dc339a6813ab)
2013-07-01 11:27:36 -04:00
Steve Howell 0da7ead83d Add FormData shim for IE (used in bot avatar uploads).
(imported from commit 41cd090768c1299db3ca0d154ee5495802302a9f)
2013-07-01 11:27:36 -04:00
Steve Howell 43864edb14 Validate file types for bot avatar image uploads.
(imported from commit e250faa727c33267ff57b5956def766ff9d43c29)
2013-07-01 11:27:36 -04:00
Steve Howell bb4aafb7b0 Allow drag&drop for setting bot avatar image.
(imported from commit e480c1a5efdd08621e80ef3e8653beb5a9f095d8)
2013-07-01 11:27:36 -04:00