Commit Graph

868 Commits

Author SHA1 Message Date
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
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
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
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
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
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 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 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 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 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 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
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
Jeff Arnold 030fbbccad Autocomplete @names in the compose box
(imported from commit a6df85d4dbeaecaceaa4ed76d1adff4a000392c5)
2013-01-14 13:27:20 -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
Reid Barton 389a52de6e Fix test for adding to top or bottom of zhome/zfilt
It's possible for selected_message_id to not exist in zhome. For
instance, when you open the page to a narrowed URL, there is a race
between loading the narrowed messages and loading all your
messages. If the narrowed message request completes first, it will
update selected_message_id to your initial_pointer if the latter
happens to be among the narrowed messages. Even if it is not, you can
select a message by clicking on it before the zhome request finishes.

Then the old code would never add that selected_message_id to the
zhome table, so it wouldn't show up in the Home view or if you
re-narrowed.

I'm pretty sure there are still cases where the selected_message_id
might be outside the range of messages in zhome, in which case adding
to zhome might put old messages at the bottom. I observed this twice
on staging but was unable to reproduce it consistently.

(imported from commit 162feff3090f8806cc67140db0cfabb6e965aece)
2013-01-14 10:33:51 -05:00
Waseem Daher d9e50117be Frontend for invitations.
(imported from commit 8afab7cc5a4a5c14b605f1b27b48036c9414f7d0)
2013-01-14 10:25:26 -05:00
Jeff Arnold 3c8b30d043 Revert "Autocomplete @names in the compose box"
This reverts commit d60d1693e77bdd045a1bd20491c6d6efed918b39.

(imported from commit 796036e146eaf917b74dc0bac01e92aa6a682d16)
2013-01-11 13:49:23 -05:00
Jeff Arnold 09a6dc6c42 Autocomplete @names in the compose box
(imported from commit d60d1693e77bdd045a1bd20491c6d6efed918b39)
2013-01-11 13:00:34 -05:00
Jeff Arnold 279ded6072 Notify when we see our username or our name plus punctuation
(imported from commit 158c78de264ef31f61670694764d025a773ae840)
2013-01-11 13:00:34 -05:00
Waseem Daher e3e8d9b939 Revert recent set of floating_recipient_bar changes.
We suspect that these seem to be causing a regression where scrolling
in narrowed views gets really sluggish, but we haven't totally been
able to figure out why since it's challenging to reproduce locally.
(It currently manifests itself on staging but not prod.)

So for now we'll back them out. Here's the full set of things:
Revert "Cause update_floating_recipient_bar to get called less frequently."
This reverts commit a6c1518c4001a2dde44d7b512236795da3ccd351.

Revert "Remove double-scroll in un-narrowing code."
This reverts commit 3dde6c27ffa1e8afa1a084b1b2baee3bc0512962.

Revert "Reset our scroll position if we change our hash to "#"."
This reverts commit 925b44d770c96dafaabebc9e0114f9a3b8f53c4d.

Revert "Properly update floating subject bar when you are at top of page."
This reverts commit 6633cc8a81aedcbb31b30d7c1f27816f8808c700.

(imported from commit a273730581cef30c33bedf701659ee084434f8ad)
2013-01-11 10:58:04 -05:00
Waseem Daher 66af2da9ed Cause update_floating_recipient_bar to get called less frequently.
Putting update_floating_recipient_bar in the old location caused it to
be called on every single keypress, which is unnecessarily
expensive. Instead, just call it once when we think we might actually
need it: after initiating a narrow.

(imported from commit a6c1518c4001a2dde44d7b512236795da3ccd351)
2013-01-10 14:19:29 -05:00
Jeff Arnold 97e8fb893b Fire a notification for an @name match anywhere in the msg content
(imported from commit 1b6932b1b1094af6f0de2346ca721805e264490d)
2013-01-10 13:44:06 -05:00
Waseem Daher 7796940c72 Remove double-scroll in un-narrowing code.
select_message_by_id with then_scroll: true already recenter_views
on the selected message; no need to also call scroll_to_selected.

(imported from commit 3dde6c27ffa1e8afa1a084b1b2baee3bc0512962)
2013-01-10 11:38:50 -05:00
Waseem Daher a9112155da Reset our scroll position if we change our hash to "#".
Changing the hash to "#" causes Chrome to jump to the top of the page
on Mac OS X. This commit doesn't actually fix any bug, but it
is necessary for my *next* commit, where otherwise you'd have to
ensure that the scroll code came *after* the hashchange code.

(imported from commit 925b44d770c96dafaabebc9e0114f9a3b8f53c4d)
2013-01-10 11:37:44 -05:00