Commit Graph

2124 Commits

Author SHA1 Message Date
Jacob Hurwitz ebf85b9075 Change the typeahead sorter so that it now puts name and email matches
(sorted by PM frequency) first, then all other matches (sorted by PM
frequency).

(imported from commit 5119de41c9c847e6972f12b4dafc59a7d010ea82)
2013-01-29 14:40:57 -05:00
Waseem Daher 86b87556a6 Don't jump to top of page when returning from another tab.
This fixes Trac #723 - Message view scrolls to top after reloading on another tab (e.g. settings)

(imported from commit d9134cec6879625d577c43a08d258af3f6dacc5f)
2013-01-28 23:21:43 -05:00
Keegan McAllister f2659b7dcd bugdown: Remove dead code
The user of this function was removed in 97dd20ec.

(imported from commit c3823df65172f3799658e36d7ba183f661e9fe65)
2013-01-28 18:37:48 -05:00
Keegan McAllister 02fd0fbb06 Don't strip leading/trailing whitespace from the compose box
Fixes #719, "Indenting four spaces doesn't create a code block in the first
paragraph".

(imported from commit 697535b2d25d7191b565d26b601bb98722794978)
2013-01-28 18:37:48 -05:00
Leo Franchi b157560369 Remove last tests.py dependency on views.py
(imported from commit d667fbfdeb7ec0cf115354cf9a54fd3cdd801b73)
2013-01-28 17:33:08 -05:00
Leo Franchi 7e567f527f Move gather_subscriptions to actions.py as it's not a view
(imported from commit cdf94ded51e441fe3515641458023be44c1ba40c)
2013-01-28 17:32:58 -05:00
Leo Franchi e249326510 Convert tests to using json api rather than views
(imported from commit 2a997b93e88156e44d47277387641db1ef3b587a)
2013-01-28 16:59:25 -05:00
Leo Franchi 9cc2945c9e Add unit tests for hanging ulists bugdown
(imported from commit 7e225b54d4ab26e4d7cb734fcdbdbe74b7288dd5)
2013-01-25 17:13:13 -05:00
Leo Franchi c39c6f643c Handle lists that start immediately after paragraphs
(imported from commit 055593d7a324598e133d53db0c33103016426c8f)
2013-01-25 17:13:13 -05:00
Leo Franchi 969d89d070 Don't accept - as valid list delimiters
(imported from commit 287353a29289ee536a59f47f87ff66893bf261ec)
2013-01-25 17:13:13 -05:00
Leo Franchi ba7dcc320c Remove ``` support from code fence
Supporting ``` as a code fence marker complicates the auto-fence
closing, and as per a discussion with Keegan on code-review@, it
is not worth the extra complexity.

(imported from commit 405afb95c4295a02f4677181456caf9d49913ac4)
2013-01-25 17:12:49 -05:00
Leo Franchi 187e8cfa88 Add markdown tests for auto code block ending
(imported from commit 905ce149fd5d601733c2a7e748636c7a66904fbc)
2013-01-25 17:02:57 -05:00
Leo Franchi c2db0dd8bf Automatically add an end-of-code fence block if missing
(imported from commit 167f0217bbe6709e73dbc06f2894d9e22ee17a77)
2013-01-25 17:02:57 -05:00
Leo Franchi 639ec9380a Handle case where @-replies are not at beginning of msg
(imported from commit 2ed80845f49f48de71a5ea1db382dc4d9369f393)
2013-01-25 16:04:17 -05:00
Leo Franchi 64a08a5496 Parse multi-pm recipients to autocomplete nth names
(imported from commit 479d4e02356710636657226cf0dcd51b57503212)
2013-01-25 15:33:22 -05:00
Leo Franchi 4e78d18972 Lookahead on @-searches by removing the @
(imported from commit fd8b4dd19db4f291387397a3a795cf9ade5b195a)
2013-01-25 15:33:22 -05:00
Luke Faraone 5e3f043111 Filter out api-key, not api_key
We don't use the latter anywhere in our API, and this typo caused user
API keys to be emailed / humbugged places.

(imported from commit d0402e8e9fd587f6a9018c962d222fb5f9ceca48)
2013-01-25 14:20:07 -05:00
Zev Benjamin 1ba381c4a9 Account for the new top navigation bar when setting the main div height
This fixes #704

(imported from commit 5e73bf38cf0cda661a4c7070eea760934b30e454)
2013-01-25 14:09:30 -05:00
Zev Benjamin 1099b01a19 Make spinners have a lower z-index than the top nav bar
(imported from commit 9e32122efdfc5b5f75e527e3df0ac4363b45191d)
2013-01-25 14:09:30 -05:00
Zev Benjamin c1bd8d821f Hack around loading indicator width calculations sometimes being slightly wrong
Under some unknown circumstances (it happens on Keegan's laptop) the
loading indicator text width calculation returns a result that's a
few pixels too small.  We hack around this by setting 'white-space'
property on the container div to 'nowrap'.  The container's div will
be slightly too small (and thus the text will stick out the right
side by a few pixels), but that's probably OK.

This fixes #698

(imported from commit 2e5b28fb3a1fca78c700af74a452bfafd09a2da9)
2013-01-25 14:09:30 -05:00
Zev Benjamin 8bade19451 Document the connection between loading indicator CSS and associated JS constants
(imported from commit 21947f311e0df0aa7353eb57857c14ba0a5eceb2)
2013-01-25 14:09:30 -05:00
Zev Benjamin dba8b27a35 Shrink loading indicator text a little smaller
This is to make the loading_indicator_text height closer to
loading_indicidator_spinner's height.

(imported from commit 062973e9c09b005601c5c943ce65dc97eeee179f)
2013-01-25 14:09:30 -05:00
Zev Benjamin 2be4a612ff Force spinners to be centered in their enclosing elements
This should fix the weird positioning spinners had when they were
created while hidden.

(imported from commit 777d5c376a3f93b0b7b3b749877070b438b7c102)
2013-01-25 14:09:30 -05:00
Zev Benjamin a58fecfdeb Make the 'create stream' row more visually distinct
(imported from commit 6d0b6e26fa4bbd37e6f29795be4f61aa7c20ec0c)
2013-01-25 12:35:25 -05:00
Zev Benjamin 842edf31e8 Make the stream list have subscribed streams at the top
(imported from commit daa2037f97041e39cc6a54628c98d39a3c66c5bc)
2013-01-25 12:35:25 -05:00
Leo Franchi 56f4c96a98 Sort recipients by name prefix, email prefix, then pm order
This changes the sorting for autocomplete to:

* Properly prioritize case sensitive and insensitive prefix
* For recipients, prefix-search on email, then sort by most recently sent pm

(imported from commit 893c7a07d678644a418a69656180fadf0d6f374d)
2013-01-25 11:18:50 -05:00
Zev Benjamin 7fe78592fc Hide the color swatch and regular stream settings when not subscribed
(imported from commit 15fb70e1e18bcb9acc5f556a33b9a574cfbb874d)
2013-01-24 17:59:03 -05:00
Zev Benjamin 69a1903f86 Add the user to the member list of a stream when they're viewing the member list
(imported from commit a07c9c507f45c77ff82040f4b226c1a1a0177bd3)
2013-01-24 17:59:03 -05:00
Zev Benjamin 616bd3a1e1 subs.js: Factor out code for formatting and adding users to member lists
(imported from commit 5f929df5c0a105a3774e9e43255d17093ea1496f)
2013-01-24 17:59:03 -05:00
Zev Benjamin 4dbd51033a Hide subscription settings on unsubscribe
(imported from commit 28f08ffdf5ffc4af697563df19b4facb28e9c681)
2013-01-24 17:59:03 -05:00
Zev Benjamin e03fe9e3f1 Expand subscription settings of newly created streams
(imported from commit 6171014fd712b60d83b2a0ac2953d8065c00a585)
2013-01-24 17:59:03 -05:00
Zev Benjamin 2e7d411ef8 Remove redundant success messages from subscriptions page
The fact that the user sees a change (the button changes or a row
appears) makes it obvious that the operation was a success.  The
success messages were only serving to make the page scroll
confusingly when you couldn't see the top.

(imported from commit 471b9304f71bb8533c98d208b855d4d75c04a886)
2013-01-24 17:59:03 -05:00
Zev Benjamin df712b7794 Move the "create new stream" form into the subscriptions table
(imported from commit 6cfccf01b4253423e271a08c74f6077cbc10fce3)
2013-01-24 17:59:03 -05:00
Zev Benjamin 131167e228 Remove btn-block class from subscribe/unsubscribe buttons
It's not doing anything for us because we also float the buttons.

(imported from commit c63c153821ef392fbfca732d4a6e79a18ea21ff0)
2013-01-24 17:59:03 -05:00
Zev Benjamin 6082222a68 Don't try to show all streams on the subscriptions page for the MIT realm
The query fails anyway, so this is not a safety check.  This commit
makes it so that MIT users actually see their subscriptions instead
of an error.

(imported from commit ee635943728d7d9823e118d9fa51c402b1cd9bf2)
2013-01-24 17:59:03 -05:00
Zev Benjamin 3250e83e66 subs.js: rename render_subscribers() -> should_render_subscribers()
(imported from commit a7273c330ad94001cc008bcd06a60a0e11fb937c)
2013-01-24 17:59:03 -05:00
Zev Benjamin 0d9c2fd7f4 Show all public streams on the subscriptions page
(imported from commit 1f00e864a7ae653aad02328dff1b8683c5d585d9)
2013-01-24 17:59:03 -05:00
Zev Benjamin 72ebecf801 Do initial stream color fetch in subs.js instead of zephyr.js
(imported from commit e819e04951be037241b43c8c7061c7979038b7b8)
2013-01-24 17:59:03 -05:00
Zev Benjamin 6e05a72898 subs.js: Simplify subscriptions management
We now keep around the subscription information for streams that the
user unsubscribed from in stream_info and have a field that
indicates whether the user is currently subscribed.

(imported from commit 973e2f4bd4139157b03d7c1a372db93a1a5130f7)
2013-01-24 17:59:02 -05:00
Zev Benjamin 7f2252cfa8 subs.js: Factor out code to set stream color
(imported from commit 40c907976aef0d860d4963285be96430f719d0a7)
2013-01-24 17:59:02 -05:00
Zev Benjamin 8e7ac23d2b Make subs.js the keeper of the streams list
(imported from commit 566f529757bb83ad8dd4e52d3fc8c1b90c497ca2)
2013-01-24 17:59:02 -05:00
Leo Franchi 556295dd28 Add unit tests for new invite-only streams
(imported from commit 89f19b85a97d4f9a35988d7c7eb29984719523e5)
2013-01-24 17:34:22 -05:00
Leo Franchi b2505bfc22 Add backend support for invite-only streams
Trying to add a user to an invite-only stream that already
exists will result in in error

(imported from commit 910750580a122cee92096d7e83457cb0b8cce616)
2013-01-24 17:34:21 -05:00
Leo Franchi 7d05450411 [schema][manual] Add schema invite_only flag for streams
(imported from commit 6234b67b3c72912bf40e39007bbc884d20774806)
2013-01-24 17:34:21 -05:00
Tim Abbott 2740f930fe Fix PublicURLTest to actually test for public URLs.
Previously it was just testing that sending a GET request to our
POST-only URLs returned a 400 error.

(imported from commit a510734271385046bbf29166b38c0ecbd104d2da)
2013-01-24 10:58:51 -05:00
Tim Abbott 748927ad7c Fix transaction management in create_mit_user_if_needed.
(imported from commit 063eaf5180964ad32a6feb3c899a4cc5beea6fe9)
2013-01-24 10:58:51 -05:00
Jessica McKellar f53e31e118 If a web client is requesting message that are too old, force a reload.
If get_updates requests a message ID that is too old, Tornado will
return a 400, and currently the only way to start caring about newer
message IDs is to reload.

(imported from commit 1638d71868475ffd793162afc7a2731cab14bd75)
2013-01-23 11:33:07 -05:00
Leo Franchi 2c64bf9c89 Add a test for api_get_public_streams
(imported from commit c2409962e61add9f33982f992350bff6051617a9)
2013-01-23 10:46:41 -05:00
Leo Franchi 0e0e5f63bd Add a test class for api_get_profile
(imported from commit e8e06cb14066b4c53b6830a015da84e92c444a62)
2013-01-23 10:46:41 -05:00
Luke O'Malley cde69d5bf8 activity: Add iPhone and Android tabs to /activity
(imported from commit 225ac7a718e5545296137c6703fe13c89d0dbbf5)
2013-01-23 10:25:48 -05:00
Waseem Daher 3b891d2f74 Use Glyphicons font for gear icon, rather than image.
(imported from commit 46e2524ab0bcf4e52bd09525b45d15198a82da03)
2013-01-22 17:23:18 -05:00
Waseem Daher 26fa891b88 Import Glyphicons font.
(imported from commit 6da2b1f0fdfbac321f25136a48fe4157d681ea6e)
2013-01-22 17:23:17 -05:00
Waseem Daher 9e73035cc4 Add Glyphicons cogwheel.
Longer-term this should be done in a more sustainable manner, i.e.
including Glyphicons like we currently include Halflings.

(imported from commit 3f405c969352481626614a0d61874bd77f0388b7)
2013-01-22 17:18:51 -05:00
Waseem Daher 1f103231e4 Unbreak scroll-position-restoring for the settings page.
(imported from commit 81dcf4d81189764710506294ee4f9400ecd5d883)
2013-01-22 17:18:51 -05:00
Waseem Daher 34bc6c8034 More reasonably scroll when you switch to the subscriptions page.
(imported from commit 549521cb3f8125b90728d62ce0e334f5a6c1a9e5)
2013-01-22 17:18:51 -05:00
Waseem Daher 01ee0ccc9c Return to home view if a search is initiated from elsewhere.
(imported from commit a7453f269cabc2dd349a9711fcb6e84de18fecd7)
2013-01-22 17:18:50 -05:00
Waseem Daher 4b1ea32a66 Don't cause gear icon to always be pressed in, and fix scroll position.
This commit both causes the settings button not to be drawn as
pressed, but also fixes the issue we were experiencing where,
e.g. changing from "Home" to "Settings" and back to "Home" would cause
you to lose your place.

(imported from commit 5084b280a202f6bf8f811834bf9d2734a034c8c1)
2013-01-22 17:18:50 -05:00
Waseem Daher 66b24c8738 Don't color searchbox when narrowed.
No longer appropriate in this redesign.

(imported from commit 8c585e8bc0e31027d51d502e1537778b00ffab27)
2013-01-22 17:18:50 -05:00
Waseem Daher 56ffad03e8 Make clicking on "Humbug" equivalent to picking "Home".
(imported from commit 5712a225faedb45e2d2d442798b1e250ffc67b41)
2013-01-22 17:18:50 -05:00
Waseem Daher 504dff9a51 Move search and navigation menu into a "settings" gear at the top.
This is really the first step of implementing the "Oppa Gmail Style!"
redesign, and is largely an HTML/CSS-based change, with some
slight JS tweaks to deal with things being renamed or being no
longer necessary.

(imported from commit e05adc283ea066f0f90009cf712c4f3657c2485a)
2013-01-22 17:18:50 -05:00
Waseem Daher f08dc13f73 Add a fixed navbar at the top of the page.
(imported from commit 1e131932503afe97ddd08e8538b2a0f43727313c)
2013-01-22 17:18:50 -05:00
Waseem Daher 35b05dda95 [third] Make a .container in a navbar mirror a normal .container behavior
Prior to this commit, at <979px, the .container in a .navbar has
`width: auto`, but a normal .container has width 724px, which causes
the two to drift out of sync.

This fixes that.

(Arguably, it's weird for us to waste ~200px scrunching
this down to 724px at this ratio, but we can solve that
as a separate issue later.)

(imported from commit 1f431ca1e2168db75821ea0be43941d29fd3e6b8)
2013-01-22 17:18:50 -05:00
Waseem Daher 059dac95aa [third] Disable responsive navbar.
We always want the navbar to stick at the top, no matter what
the screen size, and we want it to consistently look the same
height, etc. regardless of our page width.

This is possibly also accomplished via position: absolute !important
and other overrides in our own CSS, but this actually seems
slightly cleaner in a way.

(imported from commit 340fafb49bcbc1088a816897d320e252c4615d19)
2013-01-22 17:18:50 -05:00
Waseem Daher 22ce2c04e3 [third] Bootstrap bug fixup - dropdowns not closing on fix
Some time between the 2.0.4 and the 2.1.0 upgrade, Bootstrap broke in
a way such that clicking on a dropdown did not cause it to close.

Here's the bug thread about it:
https://github.com/twitter/bootstrap/issues/4497

I've implemented this workaround discussed there, though the bug is
fixed in 2.1.1, so when we upgrade this will go away (which is why I
only reluctantly tag it 'third', since the diff will not need to be
carried forward.)

(imported from commit f8d9cf65b33306a426d864c9b503bb3446614111)
2013-01-22 17:18:49 -05:00
Jeff Arnold fc0b7c00f1 Improve selecting, copying, and pasting multiple messages
Addresses Trac #289

(imported from commit 53078abc23f4939b3f5ffba084f16c340e4928c5)
2013-01-21 21:30:43 -05:00
Jeff Arnold bb19978397 Reset the new message count whenever the user mouses over the window
(imported from commit 5813398dbc59acc9f9e53c1e0631fc7d327de50d)
2013-01-21 15:54:02 -05:00
Jeff Arnold 621dbcaac0 Firefox on Ubuntu claims falsely to be able to do webkit notifications
(imported from commit d4778f38eaefc4fe95d93c6f3dcb5e43bbef5bb2)
2013-01-21 15:53:52 -05:00
Jeff Arnold 360737d928 Fix lowercasing issue with notifications for people with same name
(imported from commit 7f9c6f040c428af2c53929e4251861dea9361f2f)
2013-01-18 18:02:14 -05:00
Jeff Arnold 5b9cb1ebcd Fix notifications for users whose username is their first or last name
(imported from commit 66a58e81571f4eed3c840950bde63ef245ca4d48)
2013-01-18 17:02:17 -05:00
Waseem Daher dfadc79dc9 activity: Display the user portion of the email address rather than short_name.
Apparently short_name is not consistently the person's username
in our system -- for many MIT people, it's their full name.

(imported from commit d975300a59c7afe5ee20b4a0db1bd51110c3df33)
2013-01-18 13:47:43 -05:00
Waseem Daher 068c702883 activity: Display short name instead of full email address.
As of this writing, short_name is the part before the @-sign,
and we already display the realm, so no need to display it
twice.

(imported from commit f5f9b29bff99b36b0c23176348c2869193467c38)
2013-01-18 13:34:39 -05:00
Waseem Daher 764047e113 activity: Add names to the table.
(imported from commit d4554690a9381dd0b72c7c03116dc01145960a5b)
2013-01-18 13:29:53 -05:00
Tim Abbott 13bbf20260 Restore original 25000 message cache size.
(imported from commit 5eb0da70a8514f75addcc042d1a3e3aa98711e25)
2013-01-17 16:20:18 -05:00
Tim Abbott 03ca42a988 tornado: On user_message/stream_message cache misses, query the database.
This should fix the issues we saw where users who hadn't received a
message in the cache would not be able to receive new messages.

(imported from commit 3834dd5bd5a10c7a603194b540d78afd8a966017)
2013-01-17 16:20:18 -05:00
Tim Abbott 8cb8c0065c Move get_stream to models.py and accept an id for the realm argument.
(imported from commit 7ce09b7ed450cfa3ddf1de22bbb0b19abfc4a2a2)
2013-01-17 16:20:18 -05:00
Tim Abbott b6345e6c3d tests: Remove incorrect default 'last' value of '1'.
(imported from commit b2cfce7e7197b69d7d7c6c3253c21d0f8d341a98)
2013-01-17 16:18:53 -05:00
Reid Barton 07edc87cb9 Fix subscribe-and-send
When not in lurk mode, lurk_stream is undefined which caused
lurk_stream.toLowerCase() to fail.

(imported from commit 63ce79083b55a37cb0455871237a76d724fbbbea)
2013-01-17 15:37:36 -05:00
Reid Barton b8d56433f0 Send customer29.invalid signups to customer29.invalid too
Eventually there should be a database table or something where we can
configure this for each realm.

(imported from commit 5f3e6823f420e113da8ff8c521cc706175299fa4)
2013-01-17 14:37:52 -05:00
Zev Benjamin 747df69de1 Show a loading indicator while the subscriber list is loading
(imported from commit 83c6d64f665e82d1cff6e9654342d2a6c4bf6f36)
2013-01-17 14:19:37 -05:00
Zev Benjamin 661632673b Show a loading indicator on the subscriptions page
(imported from commit f5c4847e016921827354df09a544d98ceef16bee)
2013-01-17 14:19:37 -05:00
Zev Benjamin 4637b20f43 Set up the subscriptions page when the page is shown instead of when its about to be shown
This is needed for the next commit so that the loading indicator is
created while its associated div is visible.

(imported from commit 72d6ccc14158b49e0ea640ab818114869aa548bf)
2013-01-17 14:19:37 -05:00
Zev Benjamin 1b58e6eb9c Hide loading indicators when they're destroyed
(imported from commit e83204771b4ac7c0f0a7b19b6c306440d5cedabb)
2013-01-17 14:19:37 -05:00
Luke Faraone 63d43aa152 Notify us when a Hunt user signs up.
(imported from commit 10d4eea99427c16f8936f7fc2e2a821e7fbf73c6)
2013-01-17 13:54:52 -05:00
Tim Abbott d4ad38882d Increase the usermessage cache to 50000 messages.
(imported from commit 3b937a45339c8ab68fe07901518df1b97885afd3)
2013-01-17 13:14:02 -05:00
Reid Barton 3e928cec48 Simplify navbar at phone size in lurk mode
(imported from commit b4e7336174d4cde4947c96fa82473c311c6ed2b5)
2013-01-17 12:17:06 -05:00
Tim Abbott 0ab3b3947e Use a smaller cache for stream messages.
This is a hack to work around the fact that the query here takes far
longer than it should.

(imported from commit e6ee00c0636fe85cd946e4e3f2bbb2bda2da1f26)
2013-01-17 11:32:20 -05:00
Reid Barton 8c90808491 Reduce some horizontal padding/margins in skinny windows
(imported from commit 47e2cc9a035acdfbc2e475bf770f15f90d896ac0)
2013-01-17 11:02:32 -05:00
Reid Barton ef8c7d78ac Keep the search box from overflowing in skinny windows
A hack, but better than the status quo.

(imported from commit 3a523904ffee7b2c64e5fc118eeb8e2f7575541c)
2013-01-17 11:02:32 -05:00
Tim Abbott 9f93d9f46b tornado: Speed up Stream message cache initialization query.
The stream message cache query was grabbing an overly broad set of
columns and related models (e.g. the sender's user_profile), so that
Tornado would spend too long doing the query.

(imported from commit 6a692bc0e31957d4b9d9528d348c4b07a09eb15c)
2013-01-17 10:54:39 -05:00
Luke Faraone a3f412b193 Add functions for CUSTOMER30 registration.
(imported from commit c4b6f744ffa5b41df4170735f081bbe5655a54fe)
2013-01-17 10:49:10 -05:00
Jessica McKellar 8d1ccad29b Prominently display the user in Django 500 emails.
As a side-effect of customizing the e-mail, this also makes the host
on which the error happened a part of the subject line.

(imported from commit 7d5e9ad108b48fd34528512c5955567119935d4e)
2013-01-17 09:47:10 -05:00
Jessica McKellar e3b852b79e Filter out stream names in subscription and message requests.
(imported from commit bf1cf085361e45da21d512e77829059fe35c95c0)
2013-01-17 09:47:10 -05:00
Reid Barton 949dcbfbc7 Fix inverted logic for autofocus field in set_mode
This meant that the "New stream message" button would focus the wrong
text field.

(imported from commit 5e34f0fb936b94b8c1515e915e8059d19feba45e)
2013-01-16 16:04:17 -05:00
Zev Benjamin 93c706a610 Fix subscriptions page for MIT users
Prior to this commit, they weren't able to subscribe or unsubscribe
from streams or change stream colors.

(imported from commit 7f690c724bec3e7e6ba3b45ac7b41d1f7296b6f1)
2013-01-16 15:00:35 -05:00
Zev Benjamin e6c5b309ce Use consistent terminology for loading indicators and spinners
(imported from commit 54d14c7176e8feb125de253d1bf6205013d53760)
2013-01-16 14:45:23 -05:00
Zev Benjamin 9d27878abf Destroy spinners with a new abstraction instead of hiding them
If you create a spinner in a hidden element and then show the
element, the spinner is placed differently than if you had created
the spinner while the element was visible.  This commit makes it so
that we never create spinners while their parent is hidden.

(imported from commit a21e68976d70fcceece30ee35f5e7cf6f9490497)
2013-01-16 14:45:23 -05:00
Zev Benjamin 5e76815c43 Use not-tables for loading indicators
(imported from commit 37a18feea4366e66d4e0a42d8f66edc55928c5f7)
2013-01-16 14:45:23 -05:00
Zev Benjamin beea0f747e Rename loading_{indicator,spinner} to page_loading_{indicator,spinner}
(imported from commit e1222569f62ac693d45d2f057ef6b05c883c900e)
2013-01-16 14:45:23 -05:00
Zev Benjamin 1b1d5ff92a Use a helper function to create spinners
This allows us to use a uniform style across all our spinners.  It
also cuts down on boilerplate HTML.

(imported from commit 9879f38e0f1ca8edd40a937753811e329447262d)
2013-01-16 14:45:23 -05:00
Zev Benjamin 03adc138c5 Remove dead CSS
(imported from commit fcabfeca475be71c19e326f938e4112bd71794b9)
2013-01-16 14:45:23 -05:00
Reid Barton 2797a41fd8 Automatically subscribe on send when lurking
(imported from commit 636c07346e766615a0012e4532f35d328bb7984d)
2013-01-16 14:19:06 -05:00
Reid Barton 64ebbc6c73 Restrict lurk mode compose box stream to the lurk stream
(imported from commit f187f619fc77645a294ab4cb90baf802f55d3326)
2013-01-16 14:19:06 -05:00
Reid Barton 169fb36674 Don't move the pointer when in lurk mode
(imported from commit 6acda4b6d924d605e8ade945e1e4f10ce1e2864e)
2013-01-16 14:19:06 -05:00
Reid Barton 9e23907259 Add "Lurk" mode
/?lurk=foo will show all messages to the stream "foo", regardless of
whether you're subscribed.

(imported from commit 049d98b3ee8df19ef0a9dc392ae941dd463f8dd5)
2013-01-16 14:19:06 -05:00
Reid Barton ed29f22069 Implement single-stream get_old_messages/get_updates
(imported from commit 22a5c4985f36c38cf2490ecf26da294b502f8e46)
2013-01-16 14:19:05 -05:00
Reid Barton c9e2fed3f9 Preparatory changes to Tornado server for receiving a single stream's messages
Doesn't yet add the API for actually doing so.

(imported from commit a2062d71544441256a41f817388bb0c7ea6891ff)
2013-01-16 14:19:05 -05:00
Reid Barton 7b7f6390f9 Add a notion of "public" stream
A public stream is one for which any user can view all messages sent
to the stream, regardless of whether the user was subscribed when
those messages were sent.

For now, to avoid a database schema change and to facilitate testing,
public streams are all streams on the customer29.invalid or
humbughq.com realms.

(imported from commit 7a71fd788d585a6f5b3e494e771ec85b632bb36e)
2013-01-16 14:19:05 -05:00
Zev Benjamin d3dd0a805a Inlucde the current user in the people list
(imported from commit a596b61a68453126726bd6f56a6c421022e1e395)
2013-01-15 17:40:30 -05:00
Zev Benjamin 14cccd9787 Be more robust when creating names for the subscriber lists
(imported from commit fca2c0f2d9dcee4830394c9be5b08ce81379e4a6)
2013-01-15 17:40:30 -05:00
Keegan McAllister a15a1702e1 search: Only highlight actual message or recipient header text
Before, a whitespace-only search would "highlight" the pointer and all kinds of
other interstitial space, which totally broke the page layout.

Fixes #408.

(imported from commit e7e0e251551a9da5a2ea53e36b9cce16e3e30634)
2013-01-15 17:28:07 -05:00
Waseem Daher 7a6068c3ad Colorize the stream bar in the composebox based on where we're writing.
(imported from commit 8e9bddf465661826d63fe0f79e3f1bd6b903cf4d)
2013-01-15 17:22:47 -05:00
Zev Benjamin 45927e19eb Rename subscribers list section to "Members"
(imported from commit a684200fa66b2e376588a0aa87fa8ee271eedf6d)
2013-01-15 17:02:39 -05:00
Zev Benjamin 0e2401199a Show full names in stream subscriber lists
(imported from commit 6be00256da74db6af9a6dd14e70929679c19db52)
2013-01-15 17:02:39 -05:00
Zev Benjamin cb8c67b325 Keep a dictionary of user email address to person object
(imported from commit 16d63fefff3bda33cfc2f90398539b5e2d9bb499)
2013-01-15 17:02:39 -05:00
Zev Benjamin 26f38065cd Insert text for the subscriber lists into the DOM as text nodes
This effectively escapes the names.

(imported from commit 68cfdaba2376a8863baf7e7325c4d8a77273de7f)
2013-01-15 17:02:39 -05:00
Zev Benjamin 28a2832415 Use get_stream in more places to avoid case-sensitivity errors
(imported from commit 9b7109d4e23db4359751b0283025b7ff60e06836)
2013-01-15 17:02:39 -05:00
Zev Benjamin 4ffc6a2de1 When subscribing to streams, send back the canonical stream name
(imported from commit 7803409878cca4627447bc64735ad71f56701a5c)
2013-01-15 17:02:39 -05:00
Zev Benjamin 17e92ebe13 Sort the subscription member lists
(imported from commit 54457c2cbe971cd8f29f0d682890c18f9ca05bd5)
2013-01-15 17:02:39 -05:00
Zev Benjamin 1d4a34aeba Clean up stream subscribe/unsubscribe button code
(imported from commit ac8fc7058534aaa3fdcb161c2aead4cc397980cf)
2013-01-15 17:02:39 -05:00
Zev Benjamin 044fc61be2 Restrict the get_public_streams query to non-MIT or superusers
(imported from commit ede1dff6176e6a39da126948ce307941e6dffaec)
2013-01-15 17:02:39 -05:00
Zev Benjamin 76b1e4778d Expose get_public_streams to the JSON API
(imported from commit 2ef9e000e4cd9fcc075e66d3da9c4bce63d68a4d)
2013-01-15 17:02:39 -05:00
Zev Benjamin 97e7cae796 Rename subs.fetch -> subs.setup_page
(imported from commit 385ff00cc5ebaafe9127974471ed2d55f0cdf546)
2013-01-15 17:02:39 -05:00
Zev Benjamin 717513cc07 Only draw a color picker when it is shown
(imported from commit 3ad2f3dbc753a1e04429ac365aa1c9d244742cbc)
2013-01-15 17:02:39 -05:00
Zev Benjamin 3442ac05b8 Be more clever about whitespace in typeahead for adding subscribers
* Ignore beginning and ending whitespace when submitting the form
* Ignore beginning and ending whitespace when doing autocomplete
* Don't autocomplete on just whitespace

(imported from commit b3231e08f6797a38bafbcef2e694f4bae059c20f)
2013-01-15 17:02:39 -05:00
Zev Benjamin cd60f18752 Add typeahead to 'add subscriber' input box
(imported from commit 49e9a75d3153e1ac97e924a1bdc971df46d6bc10)
2013-01-15 17:02:39 -05:00
Zev Benjamin 5ffc646972 Add control to subscriptions settings to add other users to streams
(imported from commit c013c41f288b438e7462f8024b6c1c6e817e06ee)
2013-01-15 17:02:39 -05:00
Zev Benjamin 4191d2f024 Use a span instead of headings for subscription setting titles
(imported from commit 0453417affe440d411dc018c92c9a41b89b99cd9)
2013-01-15 17:02:39 -05:00
Zev Benjamin 2544cef6bb Add the ability for users to subscribe others in their realm to streams
Right now we mitigate abuse by sending the principal user a Humbug
informing them that they've been subscribed.  Longer term, we want
some sort of stream invitation system, instead.

(imported from commit bf1f1ee0c5d3803cead1ddd9a766ff02043b629e)
2013-01-15 17:02:39 -05:00
Zev Benjamin 526abfccc3 [manual] Add Humbug notification bot user
The production database will need to have this user created before
this commit is pushed

(imported from commit cc8356d8afa0f0747486b7b4c82337c60499d3fd)
2013-01-15 17:02:38 -05:00
Zev Benjamin 82ac1fb317 Don't render the subscribers list for the mit.edu realm
(imported from commit 0577cfd644b55982e8fa0e7bb18cca3f883f8c1f)
2013-01-15 17:02:38 -05:00
Zev Benjamin 67511e2ac6 Show the list of subscribers for each stream on the subscriptions page
(imported from commit 1d092f8ad36d48e1f83df185c2b4f2a9667d4943)
2013-01-15 17:02:38 -05:00
Zev Benjamin 45de8fd25b Add a query to fetch the subscribers of a stream
(imported from commit 286bb42980619a3f8e575a4e2984ad1c4b3fe099)
2013-01-15 17:02:38 -05:00
Zev Benjamin f5e25d2e64 Clear removed_streams when we repopulate the subscriptions table
(imported from commit e9f90425b097f54188e4085828a3fed4c4885954)
2013-01-15 17:02:38 -05:00
Zev Benjamin a1b017eea6 Fetch subs when the subscription page is shown, not when the button is clicked
Fixes #643

(imported from commit c28103c6ec787d1cafa9c845d3b6a771f3c12c05)
2013-01-15 17:02:38 -05:00
Keegan McAllister b5a0147e26 Log events to a file named after today's date
We need this so that we can safely expunge old events without interfering with
the running server.  See #414.

(imported from commit 4739e59e36ea69f877c158c13ee752bf6a2dacfe)
2013-01-15 14:37:36 -05:00
Zev Benjamin 3a127871f0 Move search element event handler binding to ui.js
This is hopefully a fix for #679

(imported from commit cd82f763d904fd5dbed366e56aca664a1b75c496)
2013-01-15 14:19:32 -05:00
Waseem Daher f4d5186541 Rearrange keyboard shortcuts dialog so it all fits on one screen.
So that it is, in fact, navigable via keyboard shortcut.  It's not the
most beautiful way to do this; in the ideal world the layout would be
more properly responsive and could fill up the screen for you when you
have the room for it.

The issue is that the version of Bootstrap we're running doesn't
easily allow for variable-sized modals, and the hassle of showing
and hiding a div manually didn't seem worth it.

The pixel sizes are specified manually as well, in a way that
isn't particularly responsive, because of a few competing
desires:
1) For them to appear side-by-side when wide enough
2) For them to stack when not wide enough
3) The fact that they're awkwardly between a span2 and a span3,
   so we can't just use the Bootstrap responsive layout stuff

Finally, the diff here is best viewed with -w. (I also swapped the
order of Narrowing and Navigation, which unfortunately clutters the
diff.)

(imported from commit 62cfa7959d48ce515562713eb48f9d9b33c8cc16)
2013-01-14 17:37:17 -05:00
Keegan McAllister 67a83e4ef5 tests: Remove inconsistent use of keyword args with InviteUserTest.invite
(imported from commit 5d19da3800ae3c4c63ce22b5cc907f768bf55da9)
2013-01-14 15:58:45 -05:00
Keegan McAllister 38f2498015 tests: Remove set literal in InviteUserTest.test_invalid_stream
This isn't valid syntax in Python 2.6.

(imported from commit 0dc8ef72a27f1c9d559b59d4243948818d1cb75a)
2013-01-14 15:57:54 -05:00
Tim Abbott e592e71515 [manual] Use rabbitmq queue to process UserActivity.
Before this is deployed, we need to install rabbitmq and pika on the
target server (see the puppet part of this commit for how).

When this is deployed, we need to start the new user activity bot:

./manage.py process_user_activity

in the screen session on the relevant server, or user_activity logs
won't be processed (which will eventually result in all users getting
notifications about how their mirrors are out of date).

(imported from commit 44d605aca0290bef2c94fb99267e15e26b21673b)
2013-01-14 13:28:23 -05:00
Tim Abbott 6a2bf7c4f3 Move update_user_activity to actions.py.
(imported from commit a81669d01e699fbf809a02f91e6007b7f61e5518)
2013-01-14 13:28:23 -05:00
Jeff Arnold 030fbbccad Autocomplete @names in the compose box
(imported from commit a6df85d4dbeaecaceaa4ed76d1adff4a000392c5)
2013-01-14 13:27:20 -05:00
Waseem Daher 5a77e16fbe Pad out the bottom of the composebox in a symmetrical way.
(imported from commit f0db908755417c6f032b2c02e710fef04032c343)
2013-01-14 13:00:43 -05:00
Waseem Daher 7e9242c796 Reminder of tab-enter to send.
I'd like to phase this out in favor of something you actually
see only when you don't use Tab-Enter, but that's more challenging
than I'm prepared to tackle right this second.

(imported from commit eeda53b0ed69d0e528b00ea9e7c7a20edb35df34)
2013-01-14 13:00:43 -05:00
Waseem Daher b464896fda Decrease composebox typeahead suggestion count to 2.
Now that the box is shorter, we don't have room for more!

(imported from commit 7fd06120df095d46ee087a59f20b745fdd483ca7)
2013-01-14 13:00:43 -05:00
Waseem Daher 5b473a18c3 Have the "New stream/new PM" buttons no longer clear message contents.
If you're currently composing a message and you click one of those, it
now no longer clears out your old message contents, making it more
analogous to the job the old selector used to play.

(imported from commit b935a3bf307bdbd82f1ee7db31d3a3c89c623195)
2013-01-14 13:00:43 -05:00
Waseem Daher bfa1e98e35 Eliminate the stream-or-PM selector.
(imported from commit eda85e19ac6c4557dde14a51f58f1f9a14fc7ab9)
2013-01-14 13:00:43 -05:00
Waseem Daher b25380c8b6 More compact composebox.
Accomplished by:
- Hiding the stream/PM selector
- Eliminating the "tab to send" reminder
- Moving send and formatting links to the right
- Reducing the size of the 'subject' box
- Generally tightening up whitespace

To be fixed later in this series:
- A Tab-Enter reminder
- Completely eliminating the stream/PM selector

(imported from commit 7efe04adcbe373f99a36d3ba23b32944c17aa099)
2013-01-14 13:00:43 -05:00
Luke Faraone 155cd1e821 Reintroduce updated internal_send_message to support sending personals.
internal_send_message now has the ability to send personals as well as
stream messages.

This change was accidentally lost during a rebase.

(imported from commit 153a3929c5c64be82288293c1f0cc02fcc03c08d)
2013-01-14 12:41:18 -05:00
Tim Abbott 47b2b1cb1c tornado: Fill the message memcached in a child process.
(imported from commit 3a7b4c0f4aad37319f4cfa7892709e99883f6a87)
2013-01-14 12:28:51 -05:00