Commit Graph

2232 Commits

Author SHA1 Message Date
Keegan McAllister 148e47e74a Remove unused CSS rules
(imported from commit 99227b8d9d7fc7d4ac5c3b9c78bf73cba2589767)
2013-02-14 14:39:32 -05:00
Keegan McAllister fc4d80d941 Make various UI elements look and work better when the font size changes
(imported from commit 0229aaf059941892eaaa16fb20a807015136a7ca)
2013-02-14 14:39:32 -05:00
Keegan McAllister 6c12fd3909 Add a basic font size menu
(imported from commit ff0c27ccb177ddc69a31bf8997d31e7cfb5b78b5)
2013-02-14 14:39:32 -05:00
Luke Faraone a9e602c1bb Implement label counts for stream messages.
(imported from commit 45d3d5ba8c2be3ebed8385fb714044ac9419f3c2)
2013-02-14 13:44:06 -05:00
Leo Franchi 86fbdfe183 Add test for ** not matching over newlines
(imported from commit 08556ab9f5a5b9455c4e31dded089776ded9d708)
2013-02-14 11:56:53 -05:00
Leo Franchi 5d82dc5ce2 Don't match ** for strong across newlines
(imported from commit e3bc0b409bd99c3707746c23eb73e11342cfe178)
2013-02-14 11:56:53 -05:00
Leo Franchi 1201fc1144 Add semicolons to js statements to pass lint
(imported from commit b67d30c5944276309c4e41b29afa5e55122530d8)
2013-02-14 11:27:36 -05:00
Leo Franchi a86599fc28 Add grey idle icon
(imported from commit f04d74a999a16d0118fdccccf8dcffe9d3da6bb0)
2013-02-14 10:44:41 -05:00
Leo Franchi 6efcfdf593 Show the users themselves in the activity list, at top
(imported from commit e0b3e52719cd27fe1c2755840ea16a69f9d6169b)
2013-02-14 10:19:32 -05:00
Leo Franchi ddef0c3b28 Sort user list by name not email
(imported from commit cc13d1c65625727a923616e402e4c9fd2b5afbb4)
2013-02-13 23:03:18 -05:00
Tim Abbott 874309b959 Fix sending to stream names that are JSON strings.
(imported from commit 51ca1b577796a6f438d5bba4a9e8e0af3293b423)
2013-02-13 13:08:40 -05:00
Tim Abbott 1612b5c045 Fix sending messages to numeric stream names.
json_to_foo will raise a ValueError if the JSON passed to it is just a
string containing a number, e.g. "1".

Traceback (most recent call last):
  File "/home/tabbott/humbug/zephyr/views.py", line 711, in extract_recipients
    recipients = json_to_list(raw_recipients)
  File "/home/tabbott/humbug/zephyr/decorator.py", line 289, in json_to_list
    return json_to_foo(json, list)
  File "/home/tabbott/humbug/zephyr/decorator.py", line 282, in json_to_foo
    raise ValueError("argument is not a %s" % (type().__class__.__name__))
ValueError: argument is not a list

Fixes #776.

(imported from commit 0c123a610c009eda9004cf0b0b53d60695c4e8d5)
2013-02-13 13:08:40 -05:00
Zev Benjamin d3f92eeab6 Remove narrow.from_popover()
(imported from commit 5214955658cdbd652777dda1c4351d89b5f220af)
2013-02-13 10:56:10 -05:00
Zev Benjamin bcd0bb80e1 Remove narrow.target() and pass the target explicitly
This fixes #861

(imported from commit 244deaae84db2e8c7c5ce3f9b9b25cc33bdd234d)
2013-02-13 10:56:10 -05:00
Waseem Daher feef28da59 Make the presence images have more semantic names.
(imported from commit 9de1a4183b575fb3d88498bd0b17bd566aec2da4)
2013-02-12 18:14:51 -05:00
Waseem Daher 0f798c7783 Add an orange dot "away" status for presence information.
(imported from commit 7adaff6bee4e3ba3164d2d47b32da28e136c56af)
2013-02-12 17:34:57 -05:00
Keegan McAllister 2a556fd002 Re-enable markup for CUSTOMER1
(imported from commit 3d74260796c85216d71d8261020cc149e0b6ce1c)
2013-02-12 17:09:47 -05:00
Jeff Arnold 04d31a12eb Let's not call an expensive function on every mouse movement
(imported from commit 762e4f51210afcc3d394841ee0708dba09e4bc01)
2013-02-12 17:09:35 -05:00
Tim Abbott ff099f9291 logging: Fix super verbose logging of 404 errors.
(imported from commit bb2b4f0c3cf37c16d5c634d22b7cc576ee00e5f4)
2013-02-12 16:36:13 -05:00
Jeff Arnold d0f422979b Change the favicon on notification (great for pinned tabs)
(imported from commit 025ad165d15b2e6d979c246776148f13ebc555fb)
2013-02-12 16:27:07 -05:00
Tim Abbott c38092424e Clean up fetch_table_messages code a bit.
Fixes #792.  I'm really curious what (if anything) this change does to
our Tornado load numbers.

(imported from commit daf81d2dea81f36ec4a3eb19993169b58681e717)
2013-02-12 16:25:45 -05:00
Tim Abbott 2f4b62048e gather_subscriptions: Fix making O(streams) database queries.
This cuts the MIT Zephyr home page load time and also #subscriptions
database-sourced load time for me from about a second to about 50ms on
my laptop.  The home page still takes about 600ms to load due to
templating.

(imported from commit 1cfd8c750301abe6b6a881be4b2857532be947ec)
2013-02-12 16:25:45 -05:00
Luke Faraone ea7005e8e3 Rename is_active to is_inactive.
The purpose of the validator is to ensure the user isn't active, so
let's correctly test for that here.

(imported from commit 772ddb901098f78750efab274405a10f36c49232)
2013-02-12 16:15:29 -05:00
Reid Barton 5d4206056e Dim the pointer when the window loses focus
(imported from commit ccea3148706ac4e96b0ecbefa5ba1623144c919b)
2013-02-12 15:31:49 -05:00
Luke Faraone 54a19e9091 Check whether users are active, not whether they are nonunique.
Previously we checked and bailed when there was a user registered with
an email address, regardless of active status.

This meant that MIT users who had inactive accounts autocreated had
issues where they would be confusingly told they were signed up even
though they had never taken any action on our site directly.

Now we instead check whether there are any current *active* user
accounts with that email address, and proceed with generating an
activation link if the user lacks a corresponding active account.

Security implications of this commit come into play if we start
implementing removing users ability to sign in as deactivation. Since we
lack a user removal story here, this isn't terribly concerning yet and
we'll revist this code when we decide to add such functionality in the
future.

This resolves trac #581 and #631.

(imported from commit c3fb93ce065e63e19b41f63c1f27891b93b75f86)
2013-02-12 15:31:06 -05:00
Waseem Daher 94ceac9980 Add an initial message to greet you.
(And to let you know that it's OK that you have no messages.)

This fixes Trac #850 for the case where you first log in.

(imported from commit 47741856e34f67bfc2cc91bdc21def75ab6fe09d)
2013-02-12 15:21:28 -05:00
Keegan McAllister 3d69db8469 tests: Fail with a useful error message if Pygments is missing
(imported from commit 9c0eba6b5629a28c6171ec316038120acaa3ea44)
2013-02-12 15:04:30 -05:00
Tim Abbott 62c632ceef presence: Fix loop making database queries.
The previous select_related didn't properly get the User object,
containing the email address, and thus would make one query per user
with presernce information.

(imported from commit 3341bc5a65387030fa8737b03ca43f79089ef56b)
2013-02-12 14:52:59 -05:00
Leo Franchi 7e09166f45 Remove sort by PM status in activity list
Now the sorting is done by activity status, then alphabetical.

(imported from commit 202df275f7502eb1c97d6f04880e67392f5cde0d)
2013-02-12 14:41:24 -05:00
Leo Franchi 3fe5ffe293 Add active test for MIT being empty and fix same_realm test
(imported from commit 8f67e594fabc9fe1b1d1356f94f046e7cb562c6a)
2013-02-12 13:57:10 -05:00
Keegan McAllister 6fba03a0a4 activity: Use select_related when querying UserActivity records
On my dev machine this cuts /activity load time with lots of users by more than
2/3.  I expect the gains will be even greater in production due to the greater
relative cost of database queries.

(imported from commit 0391cb29f66b618b4b99902d9fb9ab0a6cff0cb3)
2013-02-12 13:46:16 -05:00
Keegan McAllister 78398fab95 Restore click-to-reply in the blank space between the sender name and timestamp
(imported from commit 12c0b08bdac0eb5eebde4984dee3272b124ee256)
2013-02-12 12:36:39 -05:00
Leo Franchi 78ffe36c2d Hide users list for MIT
(imported from commit 4e9dcef483e0c0d85ba2e7511f1abfa4da06be9e)
2013-02-12 12:30:52 -05:00
Leo Franchi 7ab82019eb Add more url linkify tests
(imported from commit 34e22ede44e8089cc551b1b7350fdf85b3a80cf0)
2013-02-12 12:24:15 -05:00
Leo Franchi 168f8623e4 Add https?: greedy url matching before falling back to our url guesser
(imported from commit 9e6e5a0522e6501b354a56223c2639841d290d4b)
2013-02-12 12:24:15 -05:00
Leo Franchi 7af226398e Only connect to RabbitMQ if it is enabled
(imported from commit 9726595bbb850c903177b5f64612eb4aa82e36ce)
2013-02-12 12:12:28 -05:00
Tim Abbott 54b10a292c Monkeypatch Django cursor to log query times even when DEBUG=False.
I don't like monkeypatching in general, but this will give us logging
of how much time is being spent in total on database queries on our
staging and prod instances for each of the views we have -- which
should help a lot with debugging performance problems.

The code being patched is identical in Django 1.5, so I don't expect
any issues upgrading in the near future.

I may work on a patch to upstream Django to support this as well.

(imported from commit 08624c7a30f1fd192a972973e0380dd6a131d84e)
2013-02-12 12:01:02 -05:00
Waseem Daher c3cb9a6246 Allow the stream and user lists to scroll with mousewheel.
The previous commit stopped the mousewheel event at .bottom_sidebar,
which means it was never getting to our individual scrolling lists.

(imported from commit 92d32c21bb596d0e14d887ff779a857223d45342)
2013-02-12 11:54:34 -05:00
Waseem Daher 55b05d7bd2 Have the stream list and user list share the sidebar.
This isn't perfect, because if, e.g. the stream list is super short,
it still takes up lots of space that the user list might want to use,
but it's an acceptable first pass solution, in my view.

(imported from commit 669737d769258c089b40ffea4abee3229902e857)
2013-02-12 11:54:34 -05:00
Jessica McKellar 7956f859b2 management: add a remove_users_from_stream command.
(imported from commit 4aeefcc5160a382b13f8bcc2321e76eeea55f4d3)
2013-02-12 11:49:22 -05:00
Jessica McKellar 645e7d58be management: fix add_users_to_streams given do_add_subscriptions output change.
(imported from commit bc03ee0bd601122689e2062b6963780743ac7d27)
2013-02-12 11:49:22 -05:00
Tim Abbott d0953bc8a1 Log time spent doing database queries when DEBUG=True.
When DEBUG=False, Django doesn't log the data at all.  We can and
should add tracking of that at some point, but it requires patching
Django; so for now just log the data when DEBUG=True.

(imported from commit 2b9e6a4c68009733373724f38debe4e77313fdeb)
2013-02-12 11:07:36 -05:00
Tim Abbott c24e05f0e9 Log requestor email address for non-error requests too.
This should make it much easier to debug issues where a particular
user is hosing our API, for example.

(imported from commit cbea49fd1e11805cadf564bd9160d3d6bf7e0eca)
2013-02-12 11:07:36 -05:00
Jeff Arnold f93661e798 Make @**Jeff Arnold** only notify me, not every Jeff
(imported from commit 8e59eceebb4c5af298b0251c126b181cf5899d93)
2013-02-12 10:42:52 -05:00
Leo Franchi 495f7835c8 Make linter happy.
(imported from commit 0c30f2ef176249cd1a06a21946e51a20d6ca7a32)
2013-02-12 10:40:21 -05:00
Jeff Arnold 875e125fb9 Cause @all or @everyone to alert everyone
(imported from commit e2d1cd8b6ea4f2cbae82d052643a5b88e979931c)
2013-02-12 10:27:09 -05:00
Jeff Arnold e2f3a85dbd Clean up the notification code
(imported from commit 5bd811ba40b3f535d474ac53e22fd16816f9bac6)
2013-02-12 10:27:09 -05:00
Leo Franchi b30e277f5a One minute interval for keep-alive pings
(imported from commit f41ffc853c42e75a2e2cb365b73cceac44b7d723)
2013-02-12 10:22:11 -05:00
Waseem Daher 30bed51a65 Style the green 'online now' dot entirely in CSS.
This lets us clean up the HTML a little bit in preparation
for a later change which will cause the stream and people
lists to scroll independently of one another.

Also it feels a bit more fun.

(imported from commit b3b49149d7ec2960fd752fe50b41e55d363c1a98)
2013-02-11 23:15:19 -05:00
Waseem Daher 096e1b7727 Cause clicking on a person's name to start a PM with them.
This is actually a tricky one, because:
* Later, probably if we display an unread count by the person's
  name, the action on clicking them might very well be
  "Narrow to PMs with that person"
* But for now, while we don't have that, everything about
  historical precedent really does strongly suggest that
  clicking that person's name is going to get you a PM with
  that person.

So we implement that. For now anyway.

(imported from commit 4d461fd6edec122d542c4a97e23f2e400c31122e)
2013-02-11 22:36:20 -05:00