Commit Graph

1567 Commits

Author SHA1 Message Date
Zev Benjamin 73af933f1f Handle the result of subscriptions by Javascript events
(imported from commit 7b564b1bf076581034021052fa5e2da20cf405c5)
2013-04-01 13:07:48 -04:00
Zev Benjamin bd81706558 Handle realm_user events in web client
We currently only use these events to change the autocomplete lists.
I figure that the presence list will be updated by presence events.

(imported from commit e9c1466659c4bfd463806656e0023984a4ea4177)
2013-04-01 13:07:48 -04:00
Leo Franchi 9817ef3460 Remove url encoding from data-name attribute as we match via iteration
(imported from commit 737418c430991414124daff41b62383284e86dc1)
2013-03-29 15:44:21 -04:00
Keegan McAllister b7bb598e02 Trim search operand from the end until URI decoding succeeds
Fixes #1137.

(imported from commit a23219d2cefdc2b739a165c88780fba409d4d878)
2013-03-29 10:37:02 -04:00
Leo Franchi a8816f81c0 Comment out blueslip scroll finish error to quiet emails
A ticket is filed and this error is not fatal to the UI but rather
a warning to investigate, which we will now do

(imported from commit 3f67ec2b503e91b3921e33b89febd97790e389f1)
2013-03-29 09:38:42 -04:00
Jessica McKellar ce66bdec5b Remove unused hotkeys.in_scroll_caused_by_keypress.
(imported from commit 65223a036e72489a41130a83e4537d0ccb80b90c)
2013-03-28 17:08:25 -04:00
Jessica McKellar 3df47f2025 Do not try to recenter if you were already moving in the right direction.
Before this commit, if you try to arrow around when the selected
message is outside the pointer threshold for recentering, you get a
big jump, even if you are arrowing towards the center of the viewport.

(imported from commit 5c15d5ccccdf027a8bfa8b79bf519fccbfa971d8)
2013-03-28 17:08:25 -04:00
Jessica McKellar 0f02eb17f4 Reduce code duplication in process_visible_unread_messages.
(imported from commit 49c36f704d9937ff06129a0b737a7d9ef32e35ed)
2013-03-28 17:08:25 -04:00
Jessica McKellar 08422009fe Add a `Starred messages` sidebar link.
(imported from commit 0109e64b412afcd8d0d58b5e027d30c82faa970c)
2013-03-28 16:59:59 -04:00
Jessica McKellar 07967e7257 Add the ability to narrow to starred messages with `is:starred`.
(imported from commit f1eb552ddd90a1822fa988b60dc13f88f04cfc79)
2013-03-28 16:59:59 -04:00
Jessica McKellar 3d683a93bf Add the ability to toggle a message star and save it server-side.
(imported from commit 6d9eda14cddee9ce65a85deadac57925b1864f94)
2013-03-28 16:59:59 -04:00
Jessica McKellar 1e9bb457a1 Show a bookmark/favorite star on messages.
(imported from commit af34abb353f3d5b5aace59c31c073d6426b0ff03)
2013-03-28 16:59:59 -04:00
Jessica McKellar 2f560a79db Expose the `starred` flag as a client-side message attribute.
(imported from commit 3046a44e1313d0a91a1aa6ce6d166e29311a0567)
2013-03-28 16:59:59 -04:00
Zev Benjamin 00e5f904a3 Use do_events_register() in home() and pass the results to the initial page load
(imported from commit 532036c01bde1f5d49c43a96ce6aa496ca77cea9)
2013-03-28 16:57:48 -04:00
Zev Benjamin 0624a97d8e Force a reload when the server has garbage collected a client's queue
We have to be careful about timing here.  If Tornado fails to load
existing queues on startup then all clients will reload at once.  On
the other hand, if we don't reload immediately then the client won't
get any events until the reload.  For now, I've opted for the
user-friendly approach, so we need to make sure that Tornado gets a
chance to dump and reload its queues correctly.

(imported from commit 51a6ab31cb461e1e3373486dcec2e57eb12a8077)
2013-03-28 16:57:48 -04:00
Zev Benjamin 4bc9152f71 Inform clients to reload via a 'restart' event sent on Tornado start up
(imported from commit 10bb45547ea0bf34e56fc620ecd7415bb8a825c5)
2013-03-28 16:57:48 -04:00
Zev Benjamin 6cc70d94f6 Add register() call to event system
(imported from commit 0c9fbfec1866591b2169ce2da2bc2af6003f8f31)
2013-03-28 16:57:47 -04:00
Zev Benjamin b12715e3f2 Make web client use get_events instead of get_updates
(imported from commit 15c007fd89f02558b710e7146fc40b785934f76c)
2013-03-28 16:49:51 -04:00
Leo Franchi 0a419e51d0 Fix ui.set_count not finding streams that require url encoding in sidebar
(imported from commit c363669806f56650c6aecb66f7208ea692bfd613)
2013-03-28 14:44:57 -04:00
Luke Faraone 799e2873d3 Run decodeURIComponent over stream names before comparing them.
This resolves an edge case not handled in a previous fix to trac #1050.

(imported from commit 3fc142946b01de8955e1b52d4f4ebb36e584cdeb)
2013-03-28 11:24:38 -07:00
Leo Franchi 23802bc278 Filter out private messages in home view when counting in home unread
(imported from commit 6b42168e880269c8fe14f0e2eab98cf03b480f17)
2013-03-28 13:21:11 -04:00
Leo Franchi 5b2f4462fb Only count messages in home view when determining home_unread_count
(imported from commit 22a0a00bd242a4a12efc5dca723c13f7c9b47f2c)
2013-03-28 11:44:58 -04:00
Luke Faraone 60075e596f stream_exists_backend now returns a 404 if the stream is not found.
Update tests and compose.js to handle the 404.

(imported from commit d9ba4fe59c34bd14d9198e3365a845888fa04f03)
2013-03-28 07:53:37 -07:00
Luke Faraone fc2a071314 Scroll subscription settings into view on click.
Addresses a complaint brought up in our usability study.

We now hook into the "show" event on .subscription_settings elements and
do some obnoxious math to move the scrollbar the way we want.

Closes trac #1015.

(imported from commit 5d9cee1ffc242eb7b743fdccd2bd76bf0a7ba060)
2013-03-28 07:50:49 -07:00
Zev Benjamin 304899cd8a blueslip: Indicate whether users saw an error in the error emails
(imported from commit dd31976a3279df5ea5de2a0433387c82c8f80d41)
2013-03-27 21:53:58 -04:00
Zev Benjamin 4d30089220 blueslip: Only try to report a given error once every 5 minutes
This is in addition to only successfully reporting a given error once
per session.  Previously, if an error was triggered many times before
the ajax call to report the error returned, we'd end up making many
ajax requests to report the error.

(imported from commit 559179e3c8c3fbf03bbb091a67361d447c80b7bb)
2013-03-27 21:52:55 -04:00
Leo Franchi dbb2157457 Make home view unread count only count messages newer than the pointer
(imported from commit 0f699ed23f59380b04606bd30600373956f89ae4)
2013-03-26 18:34:16 -04:00
Leo Franchi 9de2442bd9 Add infomation in JIRA integration in our integrations page
(imported from commit 2aef274c630cc918a6fde8fa33a4598ba8ee7f3f)
2013-03-26 14:14:47 -04:00
Jessica McKellar 297bc7f09b Don't hide the floating recipient bar when scrolling.
We made this change for performance reasons that don't exist now that
we only render a small portion of your messages, and it causes a
distracting flicker when you scroll through messages slowly.

(imported from commit 33379320f6b90d93ec8beac17323b287f8bb2485)
2013-03-26 14:06:27 -04:00
Jessica McKellar 9451451672 tutorial: streamline some sections, and bold user actions.
This may help with compliance.

(imported from commit 8ef250b07a0a1a7023bc74f89a46875c88fadef7)
2013-03-26 14:06:25 -04:00
Jessica McKellar 76dade3b6e tutorial: remove code formatting examples and just link to documentation.
Those examples make the tutorial feel much longer, and they aren't
relevant to people who aren't using Humbug to talk about code.

(imported from commit c3213775d26cf533b3d9bde691de08a53d427939)
2013-03-26 14:05:45 -04:00
Jessica McKellar 2fd56b3745 tutorial: de-emphasize that we don't auto-scroll.
It's not so black and white in a world where we auto-scroll at the
bottom, and we've observed that people trying Humbug over-focus on it.

(imported from commit 2057643f179d5d1666cb33438c5a513977197b37)
2013-03-26 14:05:45 -04:00
Jessica McKellar eaa2cc702e Autoscroll when you are at the bottom of your message feed.
(imported from commit 7ca92b13c874346f846aea8200a638a7914fe7d6)
2013-03-26 14:05:45 -04:00
Keegan McAllister 6d9aca5f1a Move "page parameters" (email, enter_sends, etc) into a single object
(imported from commit 842b2371bf6364982f1358f1cd2d91118c7fb2bf)
2013-03-26 13:50:03 -04:00
Keegan McAllister 38ebefe68f Remove unused variables
(imported from commit c18d43165c1dbdee28107ef21e26e474b819c653)
2013-03-26 13:50:03 -04:00
Waseem Daher 6760e68f94 integrations: Document Capistrano integration.
(imported from commit e26774e3657a71e8f21bf8ef2b1b1a9c289707da)
2013-03-22 14:37:54 -04:00
Leo Franchi 0184f31af0 Reprocess unread counts when subscribing to a stream.
This is required if the stream has unread messages in it
(from a previous subscription period). Otherwise the
unread count will be 0 until reload.

Fixes Trac #1117

(imported from commit 8f3d78eb52fdecb52456b0037cc89665c9027fbc)
2013-03-21 17:13:17 -04:00
Leo Franchi 4edf85e730 Mark messages taller than the screen as read once we have moved past them
(imported from commit c142c2447a8f2b5ed40337a75c1afbaf05f9fecf)
2013-03-21 09:37:10 -04:00
Jeff Arnold a95b1a1a23 Revert "Automatically condense long messages"
This reverts commit 27244550d5d94980d7e33d8cc7c69708427dbbec.

(imported from commit e468051b8052d244beb09ba795605d70124254dd)
2013-03-20 18:45:12 -04:00
Jeff Arnold 795d968b91 Revert "Center the message condenser messages with respect to the message body"
This reverts commit da64f33551b500857bb91cb3ece959aafc9b1eb0.

(imported from commit 004f9a95cf5dfd4c4b8565d6eec15ceac27f7bf2)
2013-03-20 18:45:09 -04:00
Zev Benjamin e5c62d164c 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 da64f33551b500857bb91cb3ece959aafc9b1eb0)
2013-03-20 18:08:39 -04:00
Jeff Arnold c92d664b44 Automatically condense long messages
Addresses Trac #747.

(imported from commit 27244550d5d94980d7e33d8cc7c69708427dbbec)
2013-03-20 17:39:15 -04:00
Keegan McAllister 118cf4edec Modify encoding for URL fragment so Firefox doesn't decode it automatically
Fixes #826.

(imported from commit a4c0ada9559684db7e597686d9354219de742819)
2013-03-20 12:07:53 -04:00
Keegan McAllister e97c6f52ce Don't save narrow operators to the URL fragment if that's where they came from
In Firefox, prevents e.g. a slash in a stream name, which we wanted to store as
%2F, from converting back to a literal slash.

There is some appeal to normalizing the URL fragment after parsing, but in
general this way seems better.  It may decrease page load time on narrowed
views.

Doesn't yet fix #826; the URL is correct but the narrow is still wrong.

(imported from commit 32e3fa9e968139863f34b9698f1c8b39d06f0c14)
2013-03-20 12:07:53 -04:00
Keegan McAllister ae27deb30f Encode search operands using a cleaner-looking variant of URI encoding
Fixes #1098.

(imported from commit 1ed05248f3c6b69a48b9c74c0ce344621fe637b5)
2013-03-20 12:07:52 -04:00
Jessica McKellar 37e58b613d Truncate the tutorial stream name to fit the DB max stream name length.
(imported from commit e267656337f97d3ea14e14e957a405cf4fd2d06c)
2013-03-20 10:15:08 -04:00
Leo Franchi 6263c9ba1e Unify calculation of unread-count for notifications and use it in the title bar
Fixes trac #1004

(imported from commit 6f04d1d3ded198b46cc2ff1733b94b5c17beb581)
2013-03-20 10:09:40 -04:00
Leo Franchi 2ce683421b Only show 'More Messages Below" if there are actually more messages below
This fixes Trac #1004

(imported from commit fa57936aaf5b5f4ec74569bee389d18b989d6b9f)
2013-03-19 16:21:36 -04:00
Waseem Daher e1e7978fae "Lead designer" job posting.
(imported from commit 1f9e00e45f69d47842524d715fe5e8a8a4a8b7df)
2013-03-19 13:28:53 -04:00
Leo Franchi 6d6c3364dc Rewrite message flag handling to fork out to a subprocess for batch handling
(imported from commit 1ef846f542950cabf32f8b176f5591cf5794a0ff)
2013-03-19 09:55:12 -04:00
Waseem Daher 797b5ee63f Add page describing our Humbug apps.
(imported from commit 2e071782a13a497e57225b2a84c41d58f5e120b5)
2013-03-15 19:16:44 -04:00
Zev Benjamin b08dbdfe48 blueslip: Send the user agent string back with the error report
(imported from commit ed77877465b1497cd3d78753c3398329302075ff)
2013-03-15 17:30:07 -04:00
Zev Benjamin 53a68144e0 Don't do processing for a get_old_messages if the message list it was for goes away
This was biting us before when the user would leave a narrow before a
get_old_messages call associated with it finished.  Specifically,
search.maybe_highlight_message() would assume a message was in the
DOM when it wasn't any more.

We also have to hide the 'loading more messages' indicator when
reseting the 'load more' status because otherwise it wouldn't get
hidden like normal in the load_old_messages() continuation, causing a
load_more_messages() not to fire when re-entering a narrow.

(imported from commit 4a136dd01305b039c0970f897b07e603b87d5d8e)
2013-03-15 16:40:05 -04:00
Tim Abbott a46eb8a36c Clean up excessive positional arguments to load_old_messages.
(imported from commit 072c0fcbd59256d55364a0fc6be42d5df8ab99e2)
2013-03-15 16:30:03 -04:00
Zev Benjamin a495b0dfa6 Re-educate rogue emoticon
He was wrecking havoc by confusing the Javascript mode syntax
highlighter.

(imported from commit 27900cf6b6dc7866f2b2f108e79d28d6785aa466)
2013-03-15 12:43:12 -04:00
Leo Franchi 96041be75c Use 'undefined' instead of -1 as sentinel
(imported from commit 30cc280d89cf0c290459f9d90960cd8eaf76a22f)
2013-03-15 10:51:25 -04:00
Leo Franchi 79dfe57840 Mark all messages between start of scroll and end of scroll as read
If the user scrolls super fast, our scroll handler might not catch
the user  passing by some messages.

(imported from commit 14cebffcd1321f02443971ac5e1c922db19648ab)
2013-03-15 10:43:17 -04:00
Leo Franchi 07433b80cc Don't mark your message as read if it comes from the API
(imported from commit 0570d4db590e21b0fadd544b10c9865fa7acd66b)
2013-03-14 15:51:21 -04:00
Leo Franchi 95c9c6817f Mark messages as read as you scroll by them
(imported from commit 7e4595dcbfe900bde7f062e3fe9e2d53c71b6884)
2013-03-14 15:51:21 -04:00
Leo Franchi d3364eef5d Try a different color for mentions
(imported from commit e1f7e4c03abb54b8e7efbdff84314a902ad32697)
2013-03-14 15:38:09 -04:00
Zev Benjamin 719e24a25b blueslip: Use reference counting to try and break the circular references we create
We create a circular reference between handler functions and our
wrappers for them so that we can pass the wrapper to jQuery.off when
users pass the original handler to us.  This reference-counting
system can't break all the circular references we create because
users can unbind event handlers without explicitly naming the
handlers they want to remove (they can remove all bindings on an
element, for example).  For now, we hope that this memory leak isn't
too bad.

(imported from commit 9615b5761b4b09ca7ca52c0d847e9b83330373fa)
2013-03-14 15:07:28 -04:00
Zev Benjamin e8470b9481 blueslip: Also override jQuery.off so that we can pass the correct handlers to the original jQuery.off
Previously, we couldn't actually unbind some event handlers.  The
problem was that when a user called $.off(events, handler), the
passed handler wouldn't match any that were actually bound because
the handler that was actually bound was our wrapper.

This bug specifically caused the handlers for our idle timers to
never be unbound, effectively never cancelling them.

(imported from commit 48efac954994a05c356d326e64a78ab0ace9fe3e)
2013-03-14 15:07:28 -04:00
Zev Benjamin 8709e3f8b4 blueslip: Store the handler wrapper on the original function
We will need this for removing event handlers.  This will
unfortunately create a memory leak, but we'll partially deal with
that later.

(imported from commit e439cb44d245e16d2254d1be053b68015a1f4c79)
2013-03-14 15:07:28 -04:00
Zev Benjamin 122996b656 blueslip: don't double-wrap handlers when invoked with the $.on(types-Object, selector, data) syntax
(imported from commit 458ee9248fc82efc6c2307634b2be6d3ce32246d)
2013-03-14 15:07:28 -04:00
Zev Benjamin 22bb67150c blueslip: Do not catch exceptions from callbacks in debug_mode
(imported from commit 6ea79285dfd9f1f7b5d9f5d663a84247757d8af4)
2013-03-14 15:07:28 -04:00
Zev Benjamin dfe69eef0d Funnel exceptions from ajax handlers through blueslip
(imported from commit 5ad08482989d25a0fd0ee02251b74a23f950a0b9)
2013-03-14 15:07:28 -04:00
Leo Franchi 7510f87eac Select first unread when narrowing by clicking on stream in sidebar
(imported from commit 557751f44e3fee61b6a55f8f8328e2f97e6adc04)
2013-03-14 15:01:13 -04:00
Tim Abbott a0d0bdb5cf Fix copy/paste in compose box.
(imported from commit 075a461136e040b7d5d752e9386d9321d76c956e)
2013-03-14 14:55:14 -04:00
Tim Abbott cd4709c0f1 update_pointer: Only have one request in flight at a time.
Previously, if for some reason pointer updates were not returning from
the server, the client would resend its request every second, rather
than waiting for the previous request to fail before sending a new
one.

(imported from commit d134adc50aabd135c7631913fecab3519aca6640)
2013-03-13 17:41:33 -04:00
Tim Abbott 99d4bc114b Move Zephyr mirroring liveness check to the UserPresence queries.
It's closer to a presence query than an update, and more importantly
this moves this out of Tornado -- previously Tornado was spending at
least 3ms per recipient on messages sent to the MIT realm fetching all
this data to return back to users.  This should save around 100ms per
message sent to a popular stream the MIT realm -- but more
importantly, each such event is 100ms during which Tornado is not
processing other messages.

(imported from commit 134169f0fdcd9f6640fda957edc4a28b07783d8e)
2013-03-13 17:41:29 -04:00
Leo Franchi ff42774551 Refactor unread client handling to use 'read' flags per message
(imported from commit ca48745396e7fbac456e5eb2e7dbe4adc62b3492)
2013-03-13 14:14:45 -04:00
Zev Benjamin b9dd227bb5 Move seemless reposition on render code into _maybe_rerender
We also needed this when rerendering on append, so moving it into
_maybe_rerender allows the two places to share the code.

(imported from commit 027d99cae7864747cf1ec94c95e8ece495b5c907)
2013-03-13 14:07:22 -04:00
Tim Abbott f7ecfea7c1 Fix query for stream_name in compose module.
(imported from commit 8b8069a9fbf32805a77299e8375256e7a27e7ba1)
2013-03-13 11:22:11 -04:00
Waseem Daher 52b3da6668 Make clicking gravatar or "Humbug" take you home.
Looks like this was broken in 546063f88d58fb988363e5c89a13507deeb20afd.

(imported from commit 077186e60bf7a48742e71bbcb4e705c02f1ddc0a)
2013-03-13 11:16:09 -04:00
Tim Abbott 61ee8b1921 Unfade messages after you manually edit the recipient.
It's pretty confusing if this doesn't change.  In some other world we
could update the fade, but since we're currently only fading on reply,
I think it would be weird to update the fade when you're picking a new
recipient.

(imported from commit 8f77419d443d578068b57f847354ac6da7632ee2)
2013-03-13 11:12:25 -04:00
Tim Abbott 1e62ced172 Fix fading when replying to sender.
Previously, we compared the recipients of messages to the message that
you triggered the reply off of -- even if you did a reply-to-sender.
This commit changes the code to instead track what you faded by,
rather than just the message you faded on.

Fixes #1037.

(imported from commit d9e2cb4122501b1bc45e231d4b52c2e7f9284fdd)
2013-03-13 11:12:25 -04:00
Tim Abbott 24a235a091 compose: Move unfade_messages() call inside fade_around.
This makes the API a little cleaner.

(imported from commit c5eb9a4998971cdbe1f8ac3a14fd9759584771bb)
2013-03-13 11:12:25 -04:00
Tim Abbott 6c6a005920 Update recipient on renarrow when compose box is open but empty.
(imported from commit ff50b3b38833e7467ca77714acb1d81c22aeed0c)
2013-03-13 11:12:25 -04:00
Tim Abbott ee8d646d74 compose: Don't clear the compose box when recipient didn't change.
(imported from commit 5188a0f510e499c80d4c188a1ce59af4f2fe3262)
2013-03-13 11:12:23 -04:00
Tim Abbott 10be8d2a12 compose: Fix loss of message fading on renarrow.
Previously, if you renarrowed, all message fading would be cleared
until you close and then reopen the compose box.

Fixes #1024.

(imported from commit 57981ba29ab597c4c84ca6e4e9d04a8284f49117)
2013-03-13 11:10:51 -04:00
Tim Abbott 012f0566a1 compose: Fade all relevant messages on the page, not just neighbors.
(imported from commit 69e11a980b9cbd69753754b9a42248ef0f3d5a21)
2013-03-13 11:10:51 -04:00
Zev Benjamin 05eec2ae19 blueslip: Add some clarifying comments
(imported from commit 8b8ed83593d4dfb8ac3deb2c3442c2614481701a)
2013-03-13 10:55:34 -04:00
Zev Benjamin 09cf339c2b blueslip: Handle exceptions from jQuery event handlers and $(document).ready functions
We treat these exceptions the same way we treat fatal errors: report
the error message to our server and then allow the exception to reach
the top level.

We could also override document.onerror, but don't.  There are a
couple of ramifications of this:
* Exceptions caused by event handlers directly attached to DOM
  elements aren't handled
* Exceptions caused by code at the top level that triggers an error
  (such as parse errors in our Javascript files) aren't handled

The reason we don't override document.onerror is because the
document.onerror handler has a limited interface and doesn't receive
the exception object.  It only gets the message, file, and line
number of the error.  Additionally, exceptions that we allow to
propogate out of blueslip trigger an onerror event when they're never
caught.  In order to avoid handling the error twice (once by blueslip
and once by the onerror handler), we'd have to encode the fact that
the error has already been handled in the error message, which is
pretty ugly.

(imported from commit 7f049ae519dc198a9f7cfd41fd5dd18e584bd061)
2013-03-13 10:55:34 -04:00
Zev Benjamin 5bd4f2ccd7 blueslip: Throw a custom exception type
(imported from commit 4a3612b63bb4481a56901cc3dd6cea9a3d1a1aea)
2013-03-13 10:55:34 -04:00
Zev Benjamin 6d25940299 blueslip: Pass the stacktrace into report_error
This is to let us pass in the stack trace of an existing exception,
which will be required in a upcoming commit.

(imported from commit 421366a7a01deb770b7620417fb4660769c5db53)
2013-03-13 10:55:34 -04:00
Zev Benjamin a5b7c86303 Show an error message to users on fatal errors
(imported from commit a1ee2329e6b9dfa6f575106f1e32574bef0598a2)
2013-03-13 10:55:34 -04:00
Zev Benjamin fb0dd60857 Simply compose.check_stream_existence now that one of its return values isn't used
(imported from commit 8c910032e8ffd12b9691138ce03ceb096156e3f2)
2013-03-13 10:55:33 -04:00
Zev Benjamin 054d377709 Make stream existance error actually go somewhere
The referenced element where the error was supposed to go was removed
in 66fd42914e4fc33719c4f21ad401748989f20b49.  Now the error message uses
the regular compose error message area.

(imported from commit c82a6d863fa327ba982157d0b0607545d7e65cb7)
2013-03-13 10:55:33 -04:00
Zev Benjamin b383ee1dd4 Only report a given error message once per page load
(imported from commit 058fe321a991bbc50eed63b0bdbf75bcfa8afe2b)
2013-03-13 10:55:33 -04:00
Zev Benjamin 1109d20149 Send browser errors back to the server
(imported from commit 8c676017e8b3fc4f17552db15d32266099dba8f2)
2013-03-13 10:55:33 -04:00
Zev Benjamin 65d2f65bbb Check if we need to rerender after appending messages to the MessageList
Previously, if the pointer was high on the page such that there was a
lot of empty space below and the render window was full (a situation
we could get into if we're following new messages arriving), a newly
recieved message would not be rendered even though it would have been
visible on the screen if we had done a rerender.  Adding the
_maybe_rerender() call to the end of append() ensures that we don't
end up in this situation.

(imported from commit 925d3cc62e8221b42f1d5ff1788e99c7d07ccc24)
2013-03-13 00:48:26 -04:00
Tim Abbott c947fbd0e9 Revert "Disable backfilling 1,000 messages on idle"
Now that Zev's message list branch is merged, there's no longer a
performance penalty for loading these old messages, and it improves
our narrowing performance to have them loaded.

This code is slightly different from the original commit
93d47710891cfc4db9fa00beaa5ccd10113aa1c3 since the way to access the
first element in the message list and the API for get_old_messages
have changed since then.

(imported from commit f295f892bea9327eb8316225b7b98f0e3b3fdc9a)
2013-03-12 18:16:55 -04:00
Luke Faraone 10b15640e9 Highlight messages which contain your name.
This was requested by CUSTOMER18 and CUSTOMER4.

Closes trac #705.

(imported from commit a25c6b7ca0ae3ba89c03779b19c4d6b0af93a014)
2013-03-12 18:01:16 -04:00
Jeff Arnold e9cbae67b3 Make clicking notifications give focus to browser
Resolves Trac #1081

(imported from commit d5546ecda53a57b6dbbfc65db923432f8e4cc7b2)
2013-03-12 16:03:42 -04:00
Luke Faraone 3c95013a15 Iconify public/private streams on subs page and new stream modal
This will hopefully make stream privacy more noticeable. We still don't
allow people to modify privacy after stream creation, however.

Since we now use a radio box on the stream creation modal we had to change
the selector used by subs.js to determine if a new stream was to be invite-
only.

(imported from commit 641a4fab74301a9b3ecd4b3859f010dd4ece193e)
2013-03-12 15:14:29 -04:00
Zev Benjamin 26580f2399 Deduplicate messages from get_updates
This is a workaround for bug #1062.

(imported from commit 449b00e653829e263583376a88ae67b1fe4f5eb6)
2013-03-12 14:36:45 -04:00
Waseem Daher 33dc3a2fb7 Properly start tutorial on first run, even if you have new messages.
We were previously having an issue where the tutorial could
be pre-empted if you got a few messages while you were first
logging in.

I have some reservations about this being slightly fragile, and a
better approach might be to just have a bit that we use to determine
whether or not you've already seen a tutorial. (Or potentially that
checks whether or not you've ever sent a message.)

(imported from commit f8858f64a36bcd25887b76314caff283929f340c)
2013-03-12 09:56:57 -04:00
Waseem Daher dffde7714c Don't have the presence list occlude the "More messages" popup.
The issue, prior to this fix, is that the presence list actually
gets drawn *on top of* our "more messages" popup, which is ugly.

(Toggling the z-index on either or both of them did not seem
 necessarily to matter, but that's probably because z-index
 is subtler than I understand.)

This fixes Trac #1078.

(imported from commit a255aadb1884cf6c659085b26a36d378f680e83e)
2013-03-11 23:28:37 -04:00
Jessica McKellar 039178b12e tutorial: remove step telling you to colorize the tutorial stream.
We don't need it now that we auto-color.

(imported from commit 80066849b8f2aeef5e839f4fca40c9659b60a4af)
2013-03-11 16:47:04 -04:00
Jessica McKellar 2314809d73 Auto-color streams.
(imported from commit b669f864b0574e9e9af282ccb8783ccfaa12adfd)
2013-03-11 16:47:03 -04:00