Commit Graph

4994 Commits

Author SHA1 Message Date
Steve Howell edc718951c Use same CACHES/SESSION_ENGINE settings in dev as in prod.
(imported from commit d45ec576bd0a87b9da0c1a7f7e0a002091d728ff)
2013-07-03 13:31:27 -04:00
Steve Howell 009d7b8174 Shrink avatars to 35px in the Your bots table.
I tried 30px at first, but I think a slightly bigger avatar helps
fill out the table a bit.  It should be easier to tweek these in
CSS now, although Allen agrees with me that the tabular display
may be short lived when we add edit/delete features.

(imported from commit b4d69cddf63fa122374e20731a5755e7dec86304)
2013-07-03 11:49:04 -04:00
Steve Howell 32a1d4dc13 Remove colon after Add new bot
(imported from commit 918b3f4ec2e20423ba596134dcce3a5372b90a14)
2013-07-03 11:49:04 -04:00
Steve Howell 0db3afd70a Remove (optional) in Your Bots table
(imported from commit 146aab0dc5e09f32dba31926671ee15869180057)
2013-07-03 11:49:04 -04:00
acrefoot b6bd54b350 If your event_log is empty, finish (don't fail) with more helpful message
(imported from commit b08e8fc32438fba16fbe1c3f01afc99a1b62d583)
2013-07-03 11:15:09 -04:00
Steve Howell 71dec63ad1 Fix regression with JS tests only working the first time.
The JS tests would fail on the second run due to memcache having
dirty data.  This change sets a new KEY_PREFIX whenever you launch
a server in test mode.

(imported from commit 4d41e6b79ab3bb7cb4c96b37050f0b1c9abc6b5e)
2013-07-03 10:43:24 -04:00
Jessica McKellar 078defaf15 Regardless of how you get to it, run the tutorial un-narrowed, in the Home view.
(imported from commit 9e57d098b9a4064388c12969fd77663c96597986)
2013-07-02 18:26:18 -04:00
Jessica McKellar 4567bcea1a Add fake message timestamp info needed for new date separators.
(imported from commit 20a29af1f140385f37fc1dff4e278304a2c16c4a)
2013-07-02 18:26:18 -04:00
Jessica McKellar 58780f0637 Disable hotkeys during the tutorial.
We don't want you accidentally arrowing around.

(imported from commit 6a1d18c40833007439c5c54849598438f04b13b1)
2013-07-02 18:26:18 -04:00
Jessica McKellar 04001fdc64 models: remove outdated tutorial comment.
(imported from commit 11ad15b7beb84555fae7edda92a48d5032c99994)
2013-07-02 18:26:18 -04:00
Jessica McKellar 5db6d16b4a subs: remove unused tutorial functions.
(imported from commit 666bcae369f64848c778eccf3fc97ae39986c353)
2013-07-02 18:26:17 -04:00
Jessica McKellar 46afe3be69 views: remove now-unused tutorial message sending capabilities.
(imported from commit 65d14bf469f64b47cf682f4fb36946c6d841eebd)
2013-07-02 18:26:17 -04:00
Jessica McKellar dbbc555a52 Remove now-unused do_finish_tutorial.
(imported from commit 6511d086376d1e81218cd31268f39e2145cb4d48)
2013-07-02 18:26:17 -04:00
Jessica McKellar 14e27e7583 Add the new tutorial steps.
(imported from commit 9269acbcf58332002b1d45c0134ccb2db980f05c)
2013-07-02 18:26:17 -04:00
Jessica McKellar fcf3b262d0 Add some screen divs to be used to box spotlighted content in the tutorial.
(imported from commit 2fcb357b9d812287fcb7070e16d91f5da19ffb96)
2013-07-02 18:26:17 -04:00
Jessica McKellar 5688ee5e57 Provide a function to set the get_updates timeout to 0 for the tutorial.
(imported from commit c904360ffe6fe3cacc9de37d523501a0d45f7176)
2013-07-02 18:26:17 -04:00
Jessica McKellar 672a2ef9ac get_updates: factor out success work into a function.
It has ballooned to screenfuls of code, and this refactor will help
with the tutorial.

(imported from commit 05d18558911ee7ce58b0de43eedf164b495d47ae)
2013-07-02 18:26:17 -04:00
Jessica McKellar 8d73f2d80f Load fake tutorial messages on tutorial start.
(imported from commit aa58f134d86662f090db52f9fdfd815e69f42235)
2013-07-02 18:26:16 -04:00
Jessica McKellar e2fe16af84 subs: export the ability to check and set stream colors.
We'll need this to temporarily set stream colors for the fake tutorial
messages.

(imported from commit 3a2943ccf061cf414d95dc89f3221f9986da9c64)
2013-07-02 18:26:16 -04:00
Jessica McKellar 9a40276865 views: don't defer subscribing a new users to their streams until after the tutorial.
We did this as a hack to prevent traffic while you were in the
tutorial. In the revised tutorial, we want you to see your actual
streams while you go through it, and we'll instead store the events
client-side for processing after you finish.

(imported from commit 75af93d0661c9d14b2c85624aef3f71a78053980)
2013-07-02 18:26:16 -04:00
Jessica McKellar c7d289e328 Rip out old tutorial.
(imported from commit a8f2b246f23500e93a56e028e22aa1196c017d8e)
2013-07-02 18:26:16 -04:00
Jessica McKellar bc3837f440 compose: remove tutorial check on sent messages.
We did this to check if you sent a message that would progress the
tutorial. Since the tutorial is getting overhauled we don't need this
anymore.

(imported from commit 25ee55ab034fff42a220ddd7b222b3f7459af3a1)
2013-07-02 18:26:16 -04:00
Kevin Mehall dce1f7f729 Parse @-mentions in bugdown and style them.
* This makes bugdown.convert take a `message` parameter. Properties
    for parsed mentions are added to the message object by the `Pattern`
    for use in do_send_messages.

  * Refactor repeated markdown rendering code into `Message` model methods.

(imported from commit 4f0ed5570104c0210f984b6de21e9048e2b53fa0)
2013-07-02 18:20:26 -04:00
Steve Howell 7604534050 Use get_user_profile_by_email() in tests.
We use get_user_profile_by_email() in all our tests now, as it
gives us code coverage on the function itself, and it should be
faster for tests that call it multiple times.

(imported from commit 51ebffb193980fd6f81b0ef5574d96cd92e87364)
2013-07-02 16:50:11 -04:00
Steve Howell 9e64750083 Use memcache in the test suite.
This uses a new configuration that enables memcache, but we have
to be careful to bounce KEY_PREFIX on every new test, since data
gets rolled back in the databases between tests, but not in
memcached.  We had to break up one test to work around UserProfile
objects actually being cached.

(imported from commit f201cf9cd9e0e4c61d3c384fa8d2bbd5134161e8)
2013-07-02 16:50:10 -04:00
Steve Howell 741929008b Add profiled decorator and a tool to show profiler results.
The goal here is to make it easier to do ad hoc profiling on
our codebase, particularly by running tests.

(imported from commit 71da06feb3a369dec8dc4d8391f7f40e4c2d02ff)
2013-07-02 16:47:34 -04:00
Allen Rabinovich cff0096f3b Make date boundary separators all uppercase, lighter, and letterpressed
(imported from commit 01ffbda9b4dc478732dba091e3cefced9fb1cb7c)
2013-07-02 13:08:44 -07:00
Allen Rabinovich c5e70f08f7 Make the pointer highlight lighter on private messages
(imported from commit 51f95f010336ffcfcbfae19f27efd074ec8d8be5)
2013-07-02 13:08:44 -07:00
Allen Rabinovich 090cb8b436 Switch the private message recipient bar back to a dark background
(imported from commit b172e35bf1f33eda5dc8b352d017a96530bf27b7)
2013-07-02 13:08:44 -07:00
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