Commit Graph

3064 Commits

Author SHA1 Message Date
Tim Abbott 6e00c9ca3d util: Compare recipient streams by name, not recipient id.
This is more consistent with how we compare subjects etc., and can be
used for comparing the subjects of a potential future message that
doesn't have a recipient id yet.

(imported from commit 93251c62dc74b3f12c6140b12fc8d6c756d35f37)
2013-04-22 11:14:03 -04:00
Leo Franchi 3c993db1cd Tweak format of signup statsd log
(imported from commit eecc741f76894f2403b8302b8a6114fba0b06c5d)
2013-04-22 11:07:42 -04:00
Allen Rabinovich e28cef697f Switched the star icon to FontAwesome and made it bigger and green.
* renamed the 'icon-star' style to 'icon-vector-star' to keep backwards compatibility for icon-* classes
  * changed relevant styles in zephyr.css; added FontAwesome assets
  * changed relevant CSS classes in base.html, left-sidebar.html, ui.js, message.handlebars
  * added new fonts.css to start consolidating all font-based assets
  * added fonts.css to PIPELINE_CSS in settings.py under 'portico' and 'app'
  * modified the stars test suite to reflect new star icon class name.

(imported from commit 3116fcfd4b5fb4edecd457da554fea616bb7081b)
2013-04-21 17:31:50 -07:00
Leo Franchi bdcca69233 Manually iterate over DomStringList since chrome and firefox differ on API
(imported from commit fc9c073372f56eb5bcdb463d2d23946df85c4485)
2013-04-19 18:04:50 -04:00
Leo Franchi 1d930e8c43 Show paste file name when pasting
(imported from commit 8648ef26085f5f01fbc1ddf85b2de1ad1bab2967)
2013-04-19 18:04:50 -04:00
Leo Franchi c4fa29a9d5 Allow pasting images from the clipboard to upload an image
(imported from commit 0d0ebecdb35521819433691c2d3a07fb13572eb4)
2013-04-19 18:04:50 -04:00
Leo Franchi 7902ecf9b5 Refactor filedrop code to allow for other senders
(imported from commit 861db4a5d4036d6c77f7e9921217fbf83e217c8b)
2013-04-19 18:04:50 -04:00
Leo Franchi 80e8e7b21e Allow dropping of raw text and urls without showing an error
Don't show an error if we can't handle the drop contents, since it may
just be empty rather than being a browser unsupported issue

(imported from commit 986495b4a94f4afacf75ffb35ea507d86c369b2f)
2013-04-19 18:04:50 -04:00
Leo Franchi 14fd888a08 Handle mime-type if uploaded image specifies it
(imported from commit 716908a528fd21daedd4df4d7a71f7606acce671)
2013-04-19 18:04:49 -04:00
Leo Franchi 85df171753 Add integrations writeup for Pivotal tracker
(imported from commit 3e1601bbbae465a1c607ddf7258e9f24ddcdb1b6)
2013-04-19 13:46:41 -04:00
Leo Franchi d34bdedcdb Add tests for pivotal tracker integration
(imported from commit 3d3cff2eed91029ebacc5a0be284572db1a01135)
2013-04-19 13:46:41 -04:00
Leo Franchi 082ea8642e [manual] Add support for parsing Pivotal XML activity
This adds a dependency on the python package 'defusedxml'

(imported from commit bd5c7655e636ab1aa945e619e7a0063187bafb83)
2013-04-19 13:46:27 -04:00
Leo Franchi 7b0423efc1 Use incr instead of gauge when sending events to drawAsInfinite to statsd
(imported from commit 08a4b6920c7a4a8f472f147ddce7c04710fe5c0a)
2013-04-19 09:56:41 -04:00
Jeff Arnold 7b87c201f0 Revert "Automatically condense long messages"
This reverts commit 057f08f2fcef43070b0838a600f6a89c479b4ee8.

(imported from commit ba1dbfcaeef6bc1d5befb2d59122217f532065ac)
2013-04-18 21:45:59 -04:00
Jeff Arnold 484095d815 Revert "Center the message condenser messages with respect to the message body"
This reverts commit a56ca3e9f20e9b01236b58be7a279d28b97e74bc.

(imported from commit a6068566828b21dec150fcb9ad2c458bb369aa30)
2013-04-18 21:45:55 -04:00
Jeff Arnold 13f5d30d83 Revert "Don't collapse messages that would only be collapsed by a small amount"
This reverts commit 56e8df87d3eae62080962474eae23ab75f009819.

(imported from commit 15d71ab73d269eaa3d8a2f52c5781290ee183627)
2013-04-18 21:45:34 -04:00
Jeff Arnold 955f1febdf Revert "Increase the threshhold for triggering collapsing./"
This reverts commit cd1dac8b4726cef82eb2dc957fc7edced298fa9c.

(imported from commit 6ddaad88d3d2b402ef162e5b9a7e450238feb5fd)
2013-04-18 21:45:13 -04:00
Leo Franchi 29ad205b01 Add a management command to send a statsd message
(imported from commit 25ead4a0dee185a139eb5401e109c9cbe937c7bf)
2013-04-18 18:05:52 -04:00
Leo Franchi 652b821d64 Add a bunch of statsd logging
(imported from commit 8c17a76fed08c34abab3cc45d76a0fb30774d73a)
2013-04-18 18:05:52 -04:00
Leo Franchi 46415d4984 Add statsd helpers and wrappers
(imported from commit 9d5b805ae416a65ac49dda8e8e11d9831308116c)
2013-04-18 18:05:52 -04:00
Leo Franchi 1d25f36554 Add a decorator for sending count information to statsd
(imported from commit 5263e39d8c235ac56517f0a69a1b1337e6f8942a)
2013-04-18 18:05:52 -04:00
Tim Abbott 9e85e6e0b9 Fix ordering constraint on get_old_messages query to UserMessage table.
Amazingly, this saves about 250ms on every get_old_messages query in
my testing on postgres.humbughq.com (previously, we were scanning all
rows in the zephyr_usermessage table rather than using an index).

(imported from commit 566a5ef0bbf3c2198fa9e0b63d34e38ac9c57d18)
2013-04-18 17:15:29 -04:00
Tim Abbott 5afe06e8cb Decrease idle event queue timeout back to 10 minutes.
(imported from commit 1ca1c99c013f3e7f7e70e1fd9c5386b0d5a27b98)
2013-04-18 16:58:31 -04:00
Leo Franchi aa75f51d5e Catch IncompatibleProtoclErrors as well, since our failure to connect might happen during the initial handshake phase
(imported from commit 55115f19a5a101676e3ce1ca2a7b9cd2a2d5b028)
2013-04-18 15:46:43 -04:00
Tim Abbott 3811bcc025 Increase the threshhold for triggering collapsing./
(imported from commit cd1dac8b4726cef82eb2dc957fc7edced298fa9c)
2013-04-18 15:39:45 -04:00
Jeff Arnold cce1213320 Don't collapse messages that would only be collapsed by a small amount
(imported from commit 56e8df87d3eae62080962474eae23ab75f009819)
2013-04-18 13:17:22 -04:00
Luke Faraone 546a376d1c Move API endpoint docs onto their own page.
(imported from commit 0472c9051ba75e8c8ea4f80941ca9ef3b7ad949e)
2013-04-18 09:57:57 -07:00
Luke Faraone ea7965d9bb Rework API documentation to cover all supported calls.
We now generate our API documentation page based off of JSON source.

(imported from commit 0e8a91ef4278684dbcad89cad39a1977672245fc)
2013-04-18 09:57:56 -07:00
Zev Benjamin 8bc0de19dc Center the message condenser messages with respect to the message body
Previously it was centered with respect to its enclosing div, which
looked slightly off.

(imported from commit a56ca3e9f20e9b01236b58be7a279d28b97e74bc)
2013-04-18 11:29:32 -04:00
Jeff Arnold 33c8368734 Automatically condense long messages
Addresses Trac #747.

(imported from commit 057f08f2fcef43070b0838a600f6a89c479b4ee8)
2013-04-18 11:29:32 -04:00
Leo Franchi fb2b3ae21a Handle multiple preregistration user objects when choosing streams
(imported from commit 52faa0256a719bed8a8ccc120f8177cce20450e2)
2013-04-17 15:48:30 -04:00
Jessica McKellar 1bd5f788b3 subs: remove redundant call to add_sub after create_sub.
(imported from commit ad47d9e9964a850892baeff17d3c94cfedbc9f0f)
2013-04-17 13:27:48 -04:00
Jessica McKellar a87e41d66c Make inviting users to your realm case-insensitive.
Before this commit, foo@Bar.com couldn't be invited to bar.com.

(imported from commit 04b16f66a6ec9e157bdc7523972b37432358f5cd)
2013-04-17 13:27:48 -04:00
Jessica McKellar 3e9e8eec1b tutorial: move script creation down the file to appease the linter.
(imported from commit 77b2b18874a19b39ec0a60c3c25b8459b50ce9ee)
2013-04-17 13:27:48 -04:00
Jessica McKellar 7d389d8c13 tutorial: fix broken pipelining of asynchronous requests.
Some functions invoked by the make_script framework weren't returning
their Deferreds. I noticed this as the hello stream not getting picked
correctly because loading your real subs hadn't completed yet.

(imported from commit fac3fa36b77585bd5c03bf8fbaec052fe397a481)
2013-04-17 13:27:48 -04:00
Jessica McKellar e15dd90bd9 tutorial: don't recommend saying hi on a tutorial stream.
Now we don't unsub you from it until after we've picked the hello
stream.

(imported from commit b1489007e972af7713804ba5ff98764a6393a0b6)
2013-04-17 13:27:48 -04:00
Jessica McKellar 750b8326d7 subs: fix incorrect stream_info re-initialization.
Using [] doesn't cause incorrect behavior, but it's a mismatch with
how stream_info is initially declared and gives you a confusing
representation at the console.

(imported from commit c03d9e6a29ff990659f41ee478f631a019a5ac25)
2013-04-17 13:27:48 -04:00
Jessica McKellar 6b4196a74a tutorial: fix race that could cause you to not see the goodbye message.
(imported from commit 52afce208890dbd863fc1661729e4351160d09ac)
2013-04-17 13:27:47 -04:00
Jessica McKellar 3945335e6e tutorial: don't let punctuation get in the way of exiting.
(imported from commit 7b97f382684bd2ddb92fc3efa6e1a635c4662aef)
2013-04-17 13:27:47 -04:00
Jessica McKellar a76977f57f tutorial: don't let the tutorial recommend saying hi on a non-existent stream.
Previously we added some names to your subs to use them as examples
during the tutorial. We no longer do that, but the tutorial could pick
a name from that list to recommend that you say hi on, even if you
aren't subbed.

Don't do that, and instead try to pick a stream that is in turn:
* your company name
* a probably-good stream name like social
* a stream that is hopefully not an alert stream like nagios
* eventually give up and pick anything

(imported from commit ec20c7722ea95b025dec62bcf47e33c62d1a8029)
2013-04-17 13:27:47 -04:00
Jessica McKellar bb315d4033 tutorial: remove CUSTOMER18 customer18stream1 hack.
(imported from commit b333fe10bf22aa5471b672fd51b2426191f259bf)
2013-04-17 13:27:47 -04:00
Jessica McKellar ac4385e410 tutorial: don't start the tutorial until you're subbed to the tutorial stream.
Also handle the case of subscribing failing.

This race could cause you to not see initial traffic from the tutorial bot.

(imported from commit 395a2968555e20a4dbc106dfa9d5790e9f102a3e)
2013-04-17 13:27:47 -04:00
Jessica McKellar 1c437cb0ff tutorial: return the $.ajax Deferred from the subscription requests.
(imported from commit d9154b00720b6055077e4f0e7f92313d121032b4)
2013-04-17 13:27:47 -04:00
Jessica McKellar 6a0c1f66d8 tutorial: factor setting tutorial status into a function.
(imported from commit 3ec355e3bcad25bbe8dceb9a1fdb9e8cce5156ca)
2013-04-17 13:27:47 -04:00
Waseem Daher df9c29984e Remove extra space between stream transitions.
This was causing the spacing to be extra-spacious.
We only need the extra space at the bottom of a
  --- Subscribed to stream x ---
message.

Also, add this space (and style things more nicely) with CSS --
<center> has been deprecated since HTML 4.01.

(imported from commit b5500bdf67bdcca5f4e5b2d3bbd76846b3961254)
2013-04-17 13:20:59 -04:00
Leo Franchi 0aa20cb594 Rework saved consumer logic in TornadoQueue to always reconnect consumers
(imported from commit 0627d769349077c1e795db9215b17f538e9ec75c)
2013-04-17 12:11:28 -04:00
Leo Franchi 3681b77f22 Patch TornadoConnection to catch exceptions and continue reconnection
(imported from commit 6bf9086b6bdc35321b23bb92b35679e2a21f6333)
2013-04-17 11:29:08 -04:00
Leo Franchi 4adf2d5c26 Add on-close callback immediately after creating
(imported from commit 221f8c6306ef9b6c658d10b72e15dcfba83017e0)
2013-04-17 11:20:01 -04:00
Jessica McKellar 95d0f383f2 Update star title hover when you toggle it.
(imported from commit 46f66566c1c59619e45371f3cc51ba15dc645273)
2013-04-16 14:08:31 -04:00
Leo Franchi d7a33485ad Register a tornado atexit handler to disconnect from rabbitmq
(imported from commit b70650070f1df548794a9e3ff2948d134fd0c5de)
2013-04-16 11:49:03 -04:00
Leo Franchi 79a94a8e79 Delay queue creation if we're not connected in the TornadoQueueClient
(imported from commit c583693783322136927ae1a1018a61b2ffa6597f)
2013-04-16 10:04:48 -04:00
Leo Franchi befe7c26d3 Don't send on-demand presence information for mit users
(imported from commit 711a197b9a8c1e6c66d768b240c7bce7595e5b3b)
2013-04-16 09:37:25 -04:00
Leo Franchi c024653331 Build presence update for missed events properly
(imported from commit 15d75a2e0f5c5e1035b526df3aca443a2cffdf25)
2013-04-16 09:32:46 -04:00
Zev Benjamin 5069140116 Align star icon with home icon
(imported from commit c8ba6b53ce9faf9e003cb7b1a0096f13fc85002e)
2013-04-12 16:08:49 -04:00
Tim Abbott dc0736ef97 Redefine is_public to be 'humbughq.com realm and not invite_only'.
(imported from commit 52a5b461eff926b28c2bb914b26b697de5fbfc3d)
2013-04-12 15:43:42 -04:00
Tim Abbott 34977a4017 Use a generator comprehension for history messages.
(imported from commit 1f3079cb33ea1feae0290e02778cb383726fd8c9)
2013-04-12 15:43:42 -04:00
Tim Abbott 5ab44f6993 Add note to invite notification on historical messages.
(imported from commit ea3da4bd5b3e461b37b1d5af685d96bf5ecdb847)
2013-04-12 15:43:42 -04:00
Tim Abbott 6f22fb706d get_old_messages: Drop old streams parameter from lurk mode.
Its functionality is now subsumed in what happens if you specify a
stream narrow.

(imported from commit 01fbd1de6ac20a35314511cd065ca36be766c2a1)
2013-04-12 15:43:42 -04:00
Tim Abbott 82da2bec10 Add trailing bookend with current subscribed status in some narrows.
This is basically just the logical extension of the previous commit
for the case where the last thing we did was subscribe or unsubscribe.

This even magically updates when you subscribe or unsubscribe from
another window :).

(imported from commit 2399329d11bf66aa0b614a21d2b3cf4035452279)
2013-04-12 15:43:41 -04:00
Tim Abbott bad18f6971 Display heading on boundary between historical and non-historical.
(imported from commit b1669725d5a10ae086d04d0aa03341bcb0b8b858)
2013-04-12 15:43:41 -04:00
Tim Abbott ae4d248da3 Display whether a message is historical in the actions popover.
I made this a smaller font size since it's kinda a footnote.

(imported from commit 2ad561e9fd1434d5dd19fa8c947fbc5185d71586)
2013-04-12 15:43:41 -04:00
Tim Abbott 738ed84b5d Call load_old_messages on all narrows, empty or not.
This is required to get historical messages that might be within the
message ID range of your home view.

I think we could avoid calling load_old_messages on every narrow by
tracking when the user last subscribed to each stream, and if the user
subscribed before the first message in the current home view message
window (aka the messages used for the fast-path narrowing), don't call
load_old_messages.  This would happen almost every time.  But it would
require a schema change to do this.

We also remove the load_more_messages call from hashchange.initialize.
It is no longer required now that we're calling load_old_messages on
each narrow anyway.

(imported from commit 1c78c183e61392429592ae89d566315be7be8999)
2013-04-12 15:43:41 -04:00
Tim Abbott c56b0074e4 Fix visiting the app via a narrowed URL.
(imported from commit 1946f2b8f3ffba0729e4ad975aeac1887a0ed437)
2013-04-12 15:43:41 -04:00
Tim Abbott 5e50ba09ff Backend support for historical messages.
(imported from commit d5e3674c66ae2fb54901ffb59baf72e7afcd1e68)
2013-04-12 15:43:41 -04:00
Tim Abbott f933d19826 get_old_messages: Add support for querying just Message table.
This works by rather than hardcoding e.g. "message__recipient",
using (prefix + "recipient") where prefix is either "message__" or "".

(imported from commit 3a27d6499bc869d6dd389b074cb7d7cf286760aa)
2013-04-12 15:43:41 -04:00
Tim Abbott 6ca1cf8978 Rerender the message list when receiving out-of-order messages.
This should fix the problems we've been having with out-of-order
message deliveries, and is also an important prerequisite for showing
historical messages.

(imported from commit 77a18a526bf8ec4f1f70b776ac8b7e189d00bcf4)
2013-04-12 15:43:41 -04:00
Tim Abbott 13317c08b0 message_list: Remove ignored last argument to _render.
(imported from commit 95c1a40028d3cf40943cf195be9d288153e4e574)
2013-04-12 15:43:41 -04:00
Tim Abbott ca4baa01e0 load_old_messages: Clean up for_narrow parameter.
(imported from commit 1be9959ec3998371f24f9d11a9aa87e59d85aabf)
2013-04-12 15:43:41 -04:00
Tim Abbott 12416bb128 add_messages: Remove unused opts argument.
(imported from commit 5805348c39ec0db54b6bc6939ce2d85b4896500c)
2013-04-12 15:43:41 -04:00
Zev Benjamin 858d32b3c4 Increase event queue lifetime and decrease event queue GC frequency
(imported from commit 6328c0659e2144a8d7898cbb54eac25f1c21c983)
2013-04-12 15:32:51 -04:00
Zev Benjamin b24e824573 De-duplicate message contents in event queues
(imported from commit 55def3375977a551afd631d87ae622940f284ccb)
2013-04-12 15:32:51 -04:00
Leo Franchi ecdb2acf79 Chop subjects to max of 5 regardless of timestamp of incoming messages
(imported from commit a58cd25d9c129729e0eb42ae090f4c715b5e20fe)
2013-04-12 12:47:41 -04:00
Leo Franchi f6984e4d23 Sort subjects properly
(imported from commit e2cb3d3c7e6dd3de09ffcfc6622e524fc4b7ff7d)
2013-04-12 12:28:04 -04:00
Tim Abbott 04c4321d90 Move PERSISTENT_QUEUE_FILENAME into settings.py.
(imported from commit e7d1378fd0cb3f3d894ff4a5b6ee44212bf3ce34)
2013-04-12 12:06:53 -04:00
Tim Abbott f7406b9c7d Don't write logs to the server's working directory when DEPLOYED.
Otherwise these logs will end up all getting split up when we switch
to the new deployment model.

(imported from commit 0514c296470be7113cab6c2f48e8dd33f1b9353d)
2013-04-12 11:54:50 -04:00
Leo Franchi 9130f6722f Show latest 5 subjects in sidebar when narrowed to a stream
This is a V1 of this feature. For now, the only way to expand is by narrowing
to the stream---future revisions may add a manual toggle if it is found to be
useful.

Additionally, showing per-subject unread counts will be coming in a future revision
as well.

(imported from commit fb5df0d27e928fa3b0f32b9ff2c1c508202cf7e5)
2013-04-12 11:51:09 -04:00
Leo Franchi 916c235d8c Only show active users in presence list
(imported from commit 73c0347aa10b52f13f41bbd93ff5372750ffcd3e)
2013-04-12 09:53:50 -04:00
Leo Franchi 302cfcd48c Send client information for initial presence and process time differential
(imported from commit 99a51b7cc8b6c51c4e82757a984d07603b2980e3)
2013-04-12 09:11:40 -04:00
Leo Franchi 5d4b2305fe Send presence updates when a new user logs in for the first time, and when returning from inactive
This commit will incorrectly list past-online users as active, a shortcoming that is
addressed in the next commit

(imported from commit b018767df686f88c0ca939c067c573e4d7cea357)
2013-04-12 09:11:40 -04:00
Luke Faraone 1482966b41 Correctly set Content-Type for uploaded files.
Boto usually handles this for us, but can't do autodetection like it
normally would because the file path we tell Boto isn't the original name
of the file.

(imported from commit 1ad4b04baf39be8887c86f7238438580651874ff)
2013-04-11 13:52:10 -07:00
Keegan McAllister ea3ce9c835 Accept any password with at least 6 characters
(imported from commit c6a7d7772820cee49eaaaa6c726a7f194a96e7f8)
2013-04-10 18:05:02 -04:00
Keegan McAllister af25f8a5f1 Add password strength checks to password reset
(imported from commit 3723d2bfa6012c3d4cef2199c5efd3530e9e6d2b)
2013-04-10 18:05:02 -04:00
Keegan McAllister 0962f7399d signup: Rename validation method
Otherwise it applies to all password-type <input>s, which is not necessarily
what we want.

(imported from commit da2bb86961f4ff1dcc48e89e51abac6dbea79548)
2013-04-10 18:05:02 -04:00
Keegan McAllister 01a20d9c56 signup: Don't display password validation message immediately
We now have the bar color to indicate (for most users) whether the password is
valid, so revert to the default validation behavior and don't validate before
the first blur.

(imported from commit 5c2f6e05a8796033942a2af62f244b61459ff1bb)
2013-04-10 18:05:02 -04:00
Keegan McAllister 1211061f6a Color the password strength bar red or green
(imported from commit 6b3fa7d3565a7e4f61a952fc26e1e9e564d894f9)
2013-04-10 18:05:02 -04:00
Keegan McAllister 966545403b Move password strength bar update into password_quality
(imported from commit 054d9487e325cff819e80fb0e1cb85f5c0db42d8)
2013-04-10 18:05:01 -04:00
Keegan McAllister 5487f794a2 settings: Clean up API key box show code
(imported from commit a8fc8c769ae11cb0bdab882ead4531ade5d2b12b)
2013-04-10 18:05:01 -04:00
Keegan McAllister f399e29fe9 settings: Hide password change controls behind a link
(imported from commit 6d0f3861ef97f45231d388378f429974e876ddbe)
2013-04-10 18:05:01 -04:00
Keegan McAllister 481f07d948 settings: Move success / failure indicator to the top
And scroll there on any error (previously, we would scroll only if we end up
submitting the form).

(imported from commit 63597c4da78ac92cd5c2314d6d174d178b1caaf3)
2013-04-10 18:05:01 -04:00
Keegan McAllister b6e97541f2 settings: Format API key link like other forms
(imported from commit 805d3cfffcbd7f1b4274f49b0b6c2c6902b111c2)
2013-04-10 18:05:01 -04:00
Keegan McAllister 3e31646567 Add a password strength check on the settings page
(imported from commit 68ae1732e62be076a4619b522009a76215d69757)
2013-04-10 18:05:01 -04:00
Keegan McAllister 2211b2f572 settings: Clean up bankruptcy UI
(imported from commit 31b0092899192353ae3ba525f272f839bb4d8113)
2013-04-10 18:05:00 -04:00
Keegan McAllister 07bb220194 Add a password strength check on the signup page
(imported from commit a44101485e49fd7a7951bda05ba10a021b6d3ee0)
2013-04-10 18:05:00 -04:00
Keegan McAllister 447dc0029a signup: Fix and clean up validation highlighting
Fixes #1154.

(imported from commit f50a3cb24d66e09b768e4e0702308c1c7f2c51d9)
2013-04-10 18:04:59 -04:00
Keegan McAllister c65f9b548f signup: Remove error / success class setting for send_confirm
Also seems to have no effect.

(imported from commit 2e2f913ee0f0f3b0620153bde68b8179ebb781a5)
2013-04-10 18:04:59 -04:00
Keegan McAllister 498ac0ed52 signup: Remove validation-failed class
It seems to have no effect and does not appear anywhere else in our repository
or in jquery.validate.min.js.

(imported from commit c4d2f730f3b680e15af17cefee34f6930e64ade0)
2013-04-10 18:04:59 -04:00
Keegan McAllister 63d739ef17 signup: Rename forms
(imported from commit cd7e90aa56da4982b627af757f8c4684f5103bc2)
2013-04-10 18:04:59 -04:00
Jessica McKellar 19d93ba970 invites: correctly focus on the email textarea once the modal is visible.
(imported from commit 97aa226f892b726e7456184a0d671e4f51079d3d)
2013-04-10 16:58:17 -04:00
Jessica McKellar 8ed1229328 invites: clear e-mails before showing modal.
Otherwise, if you get an error those e-mails are still around the next
time you try to invite someone.

(imported from commit b521a74f4d6c0d67271f804221f519d1aa7551ff)
2013-04-10 16:58:17 -04:00
Jessica McKellar 560636e372 views: remove unused imports.
(imported from commit 68f66fe79dfb72671e6a7c79bb98646ec729c701)
2013-04-10 16:57:51 -04:00
Jessica McKellar 7175dc534a Send invitation e-mails asynchronously through RabbitMQ.
This avoids 10s of seconds of delay when you invite several people at
once through the web UI.

(imported from commit 75acdbdb04caf62bbb08affc7796330246d8a00e)
2013-04-10 16:57:49 -04:00
Jessica McKellar 69753f228c hotkeys: fix assumptions that message lists are non-empty.
This fixes user-visible browser errors caused by trying to use the id
of messages in an empty message list.

One error could be triggered by trying to go to the end of your feed
with the End key during a reload.

Another could be triggered by trying to narrow to a stream or subject
using hotkeys while in an empty narrow.

(imported from commit a0e5456fd3b475aecac6eddd7104772baaf3aeb8)
2013-04-10 16:36:11 -04:00
Zev Benjamin f6a6a6b220 Add per-stream desktop notifications
(imported from commit b4a0576847b3aec1495f017ca9805febe80c9275)
2013-04-10 16:11:27 -04:00
Zev Benjamin e754479e9c [schema] Add notifications to Subscription model
(imported from commit 4d6a7aa17f3fad4b6f8fb7a100b3b578446e3625)
2013-04-10 16:11:27 -04:00
Zev Benjamin 34e9b7d4da [South] Migration to add notifications to Subscription table
(imported from commit 5f3517f755f22ba17f56e9b166cbc8c8aff16920)
2013-04-10 16:11:27 -04:00
Zev Benjamin b8a5ba56b9 Make check-box subscription settings' HTML more generic
(imported from commit 58c02449245bd03eedab1ee6eabebdbd972d1678)
2013-04-10 16:11:27 -04:00
Zev Benjamin 3424bbd8d7 Reduce client-side code duplication in setting stream properties
(imported from commit 879384fea499a2d30104d2bc1d96f16dbd867532)
2013-04-10 16:11:27 -04:00
Zev Benjamin 7e532a02ad Simplify subscription property views
This also changes the API for GET /json/subscriptions/property to
only retrieve the property for a particular stream instead of
returning all streams and their properties.  We weren't using this
functionality anywhere and the change makes the API more consistent.

(imported from commit 2799aec2550fd0558e2282beb19734d60801bdb8)
2013-04-10 16:11:27 -04:00
Zev Benjamin a2010871e3 Make subscription properties less free-form
(imported from commit eda607c2abfa51d2dadddc7b9ecba3e2d0b5be4d)
2013-04-10 16:11:27 -04:00
Tim Abbott da8fa73a92 Fix duplicate narrow.deactivate() call via hashchange on Chrome.
I noticed that on chrome, calling narrow.deactivate() actually ended
up calling itself recursively due to the hashchange code not correctly
handling the fact that in Chrome if you set

window.location.hash = '#';

and then read out the value, you get '' back out.

(imported from commit 9b5047fbe0e2ac1846e5325d066c72306634c523)
2013-04-10 11:02:35 -04:00
Tim Abbott 55f606b417 Fix scrolling bug when unnarrowing after receiving a message.
What was happening is that if you un-narrowed immediately after
receiving a message (e.g. because you just sent it), the autoscroll
animation from the zfilt table would still be running after you return
to the home view, resulting in the viewport being scrolled to an
apparently random point in the home view (even though the pointer was
still in the right place).

This cancels the autoscroll animations whenever you do one of:
(1) hashchange (e.g. to go to the settings page)
(2) select a message (covers narrowing/unnarrowing as well as keyboard hotkeys)
(3) mousewheel scroll
since those are basically the cases where we set the viewport
scrolltop directly.

Arguably this should instead be something where we somehow detect
which scroll events are triggered by what and cancel for any scroll
event not from the animation or rererendering, but that seems hard.

(imported from commit f776021303404c87b36241c733b3d1bcb083163b)
2013-04-10 11:02:32 -04:00
Zev Benjamin 5e307f9cce Fix calculation of number of active users
(imported from commit 0a74f1d8db51988ec806deb6af7cd8a6ef18d08c)
2013-04-09 13:35:09 -04:00
Tim Abbott ea95a8b167 Future-proof adding new users to default streams.
The previous code for adding users to default streams wouldn't do so
if the user didn't have a PreregistrationUser row.

(imported from commit 25f1383f6771319542d07660b29d891368889212)
2013-04-09 11:58:07 -04:00
Tim Abbott 1b11eeb2bc Simplify the default_subscriptions code path.
(imported from commit 62894a5949621465fcfd8d25372316d7ab495252)
2013-04-09 11:58:07 -04:00
Leo Franchi a9151e4bc3 Handle populate_db generating read messages
NOTE: If you are getting test failures, please run generate-fixtures --force.

(imported from commit 7b44b40e3955742edf337335deb0d92829c7e2e1)
2013-04-09 11:56:32 -04:00
Leo Franchi 57974787b3 Set messages to read in populate_db
(imported from commit 726d2015dbb446f56e5a640b44107a3713917ed5)
2013-04-09 09:59:31 -04:00
Waseem Daher 062e106400 Update Jenkins integration instructions.
Now that our plugin is in the Jenkins marketplace thing,
we don't need to have the user laboriously download it
from us and upload it themselves.

(imported from commit 25e9926f7f2314db8f3ea6c00c40514b6fd546c3)
2013-04-05 17:32:41 -04:00
Tim Abbott 807b6396e0 realm_stats: Only count messages sent by humans in most stats.
For our primary measures of user engagement, messages sent by bots can
confuse the picture (e.g. a realm could be dead, but not appear to be,
because they didn't bother uninstalling their github and jenkins
hooks).  So it's best to leave those out of our main stats.

(imported from commit 4d0f0e6442093daab164d0ed016fff1d1aa906c7)
2013-04-05 17:28:04 -04:00
Tim Abbott e1173b08df Fix check for non-default Subscription colors.
(imported from commit b904220f7b1a013081b1d680d98b15a7532f0839)
2013-04-05 17:28:04 -04:00
Luke Faraone 429edfbdcd Insert a link with a pretty file name when uploading a file.
(imported from commit 1367004792e145afa19a02417fb564ad3662f576)
2013-04-05 13:39:08 -07:00
Luke Faraone 59684c20f2 Don't insert a link of "undefined" if the process fails.
(imported from commit ba7d2c8bc9a280225862bd5edce302735d916e61)
2013-04-05 13:38:55 -07:00
Luke Faraone 28afd7126f Send test uploads to their own bucket.
(imported from commit b47628c410b7732b2b58af42b40369e01da8a250)
2013-04-05 13:07:18 -07:00
Luke Faraone 424c5b49ef Add a progress bar to show file upload progress from browser to Django.
When testing locally this bar sort of lies, because the actual bottleneck
is Django→S3.

In prod, our connection to S3 will supposudly be really fast so this won't
matter.

(imported from commit c9f4b4882cbfdf3bbb8180f1500f35d8481c1f39)
2013-04-05 13:07:18 -07:00
Luke Faraone b692e8fc99 Abort the XHR if you close the alert or cancel the compose.
(imported from commit 21540f7b290d3f55f8116f9940554a5feb8809d7)
2013-04-05 13:07:18 -07:00
Luke Faraone 932e98f456 [third] Store the XHR produced by filedrop in the calling object's .data.
(imported from commit 92d165d66e09cb8fe02652b32000850665e675e5)
2013-04-05 13:07:17 -07:00
Luke Faraone 0f10d1c6d4 Boostrapify filedrop errors.
(imported from commit b2ff2850e952f33af3e99fc14c21599f856345d1)
2013-04-05 13:07:17 -07:00
Luke Faraone f20f605376 [manual] Add file upload support.
This allows users to drag and drop content onto the compose box, storing
their data in Amazon S3.

New dependencies:
 - python-boto

(imported from commit 339874e483db5c36312c9ceae56db29da6ca0d99)
2013-04-05 13:07:13 -07:00
Luke Faraone ca1e729ea2 [third] Import jquery.filedrop.js drom http://www.github.com/weixiyen/jquery-filedrop
License: MIT

(imported from commit b523594e31e242dbb9d00cfbed12d6e455c8a6ca)
2013-04-05 13:03:49 -07:00
Luke Faraone f4d00b6af9 [manual] Push new users' data to MailChimp.
This creates a new management command, subscribe_new_users, which should be
run as a daemon process. When new users are created, an event is passed to
RabbitMQ including the following data:
 * Email
 * Full name
 * IP address of the person who confirmed registration
 * Time of registration confirmation

MailChimp strongly encourages the collection of the last two to enable
responses to abuse requests, and providing more data lowers the chance that
we could get banned from their service if complaints do occur.

To use this commit, you need to install the "postmonkey" module from
PyPI.

(imported from commit 20c628c3fa8bb985aaead85a80ad3b38bf94b9dc)
2013-04-05 10:22:26 -07:00
Keegan McAllister 36a4e587ec Fix a markup test for Python-Markdown 2.3
Apparently it no longer coalesces adjacent blank lines in a code block (which
seems like an improvement).  The new test case doesn't have adjacent blank
lines and will work on old and new versions alike (tested on staging).

(imported from commit e49902be041cf1e7d6fbe489685b966cf4eae108)
2013-04-05 13:14:00 -04:00
Keegan McAllister 3c40dd3bf3 bugdown: Fix fenced_code for Python-Markdown 2.3
(imported from commit 3954444708e222217407df228f07d2cad402a02b)
2013-04-05 13:14:00 -04:00
Tim Abbott bfd9287068 Append timestamp to URLs when getting templates on dev machines.
This prevents the templates from being cached by over-aggressive
chrome caching.

(imported from commit 1a1f7f697a823f6e806d3f2289c3bbda7e3f0d79)
2013-04-05 10:38:38 -04:00
Tim Abbott fdefa06190 Eliminate use of old StreamColor model.
(imported from commit c72a06bdc44f30fb6bca299463e259262367e8c2)
2013-04-04 17:48:51 -04:00
Tim Abbott f6affa8802 gather_subscriptions: Use the colors from the Subscription table.
(imported from commit c23829ad4141a97c61e21b970e5031eae20e24b4)
2013-04-04 17:48:51 -04:00
Zev Benjamin a701083f71 Report additional information for "message in the middle of msg_list" errors
Hopefully this will help us track down what the problem is.

(imported from commit b8e30ee23ab8f1bf93525faa4f52ce9a4ccc9013)
2013-04-04 17:42:09 -04:00
Zev Benjamin d4acc3dd94 blueslip: Add mechanism for reporting additional information
(imported from commit 738bd3b8800e3b67497755580a2b7ccf66bb3829)
2013-04-04 17:42:09 -04:00
Zev Benjamin be04cff7c1 blueslip: Don't report some fatal errors twice
(imported from commit e50a324c3fc74e076b82c6154686a98e70ebed90)
2013-04-04 17:42:09 -04:00
Zev Benjamin b7cd8db139 Small code cleanup
(imported from commit d9f09e5a9b33be0b23ddae072a3021bb01a3de3e)
2013-04-04 17:42:09 -04:00
Leo Franchi 8fe82085c4 [schema][manual] Automatically subscribe users to default streams only after tutorial
(imported from commit 6511851c0aee2628bef597bf1310d6f96b0fd1d4)
2013-04-04 17:11:39 -04:00
Tim Abbott 7ce6154464 Set UserProfile to be the AUTH_USER_MODEL.
(imported from commit 92bf66b3e6a8ed06054bd491bcc96ef422a1fbe1)
2013-04-04 15:45:44 -04:00
Tim Abbott a1aae4a39f [South] [schema] Add an index on Userprofile.email.
We accidentally lost this when we did the User/UserProfile merge (this
commit also deletes the old code to add the auth_user index in
do-destroy-rebuild-database).

This below is mostly just notes for future reference, but when
deploying this change to staging, we should consider running the
following instead of using the migration directly:

CREATE UNIQUE INDEX CONCURRENTLY zephyr_userprofile_email_uniq ON zephyr_userprofile(email);
ALTER TABLE zephyr_userprofile ADD CONSTRAINT zephyr_userprofile_email_uniq UNIQUE USING INDEX zephyr_userprofile_email_uniq;
CREATE INDEX CONCURRENTLY zephyr_userprofile_email ON zephyr_userprofile(email);

But I think it might be the case that it's fine to just run it
directly, since the ALTER TABLE part seems to hang if there's an open
transaction working on a UserProfile object anyway.

(imported from commit 1bf34ce242de51e97c91c8bab86b6b273e17fb43)
2013-04-04 15:45:42 -04:00
Tim Abbott 33562adc4f Update subscription color migration to run on sqlite.
(imported from commit 8ca8d36b390d4afb85fca725b0ba2fb539438a0d)
2013-04-04 15:25:43 -04:00
Tim Abbott 0ee684a4b5 [schema] [manual] Add colors to the subscription model.
This is preparatory for removing the StreamColor model, so we also set
things up so anything changing the StreamColor model changes the
Subscription model too.

The manual task is to run the copy_colors.py management command after
deployment to each of staging and prod.

(imported from commit 1be7523ca59f5266eb2c4dc2009e31209ed49635)
2013-04-04 14:17:01 -04:00
Tim Abbott b06284717c [South] Migration to add color to Subscription model.
(imported from commit 0dc8c5924b6398ea73e90c5322dd4fd1beddccf1)
2013-04-04 14:17:01 -04:00
Reid Barton 94c46a0af2 Tutorial punctuation tweaks
(imported from commit 0097cfad492de2658a2ab8a08fba0844ec6ba3fa)
2013-04-04 14:11:15 -04:00
Zev Benjamin 9d1548fe08 Add empty feed notices for private messages
(imported from commit e4067336f6b2e9e82b794599d30dfc3825852652)
2013-04-04 11:36:51 -04:00
Zev Benjamin de1f4b0be2 Remove all inline event handlers
This allows blueslip to catch exceptions from the event handlers on
these elements in addition to the other benefits that not using
inline handlers provide.

(imported from commit 2bdcb2496c6c08fa7228a20ce6164b527cf64e41)
2013-04-04 11:34:32 -04:00
Zev Benjamin 79d0e78130 Remove extraneous delete statement
The close handler will be called on cancel anyway, so we don't need
to delete in the click handler.

(imported from commit 0fcf4b0d1408312a0889f2b69e01207c9c3835fa)
2013-04-04 11:34:05 -04:00
Zev Benjamin a6058c40ad Wrap hashchange event handler with blueslip wrapper
(imported from commit 96ed0681964d36e13878e09a3f58a65c5a993aa0)
2013-04-04 11:34:05 -04:00
Zev Benjamin a2a48a5d95 Expose blueslip's callback wrapper
(imported from commit e8b2139519254ac9f3a9ec6031c5134c4d6c0fef)
2013-04-04 11:34:05 -04:00