Commit Graph

1268 Commits

Author SHA1 Message Date
Jason Michalski 22e6ab4028 Change out the gemoji emoji for android version
(imported from commit 6810746b991e597a668fca443189a16da93aa83c)
2014-02-27 20:25:22 -05:00
Luke Faraone 8075c6e5a8 Allow cycling between streams with shift+{A,D}
Closes trac #2273.

(imported from commit 858ffd47aa6dbb372d426fe94b860dfe1c1cce34)
2014-02-20 13:27:43 -05:00
Steve Howell 187796c3d4 Remove transitional defensive code in filter.js
(imported from commit b28877e8b187e3b019635b7b52a7d0a157466ce0)
2014-02-20 11:38:50 -05:00
Steve Howell 5631e7e624 Remove transitional defensive code in hashchange.js
(imported from commit b02de9a51426339f3fdbe74fb61b89f5dd4ce8d4)
2014-02-19 16:20:29 -05:00
Steve Howell 2dd3776bc1 Consider .user-list-filter in right sidebar calculations.
(imported from commit f94100ba78d5756f20729ab6d752bc48af68ea3c)
2014-02-19 15:16:37 -05:00
Leo Franchi 07140e7f11 Don't overwrite already reified people
(imported from commit ab82e5b6b8bedfbd39e7c36892c0b401796a5fdb)
2014-02-19 12:49:39 -05:00
Steve Howell 2ce57fa5b9 Make sure Group PMs show in right sidebar.
If you have a lot more individual users in your realm than group
PMs in your recent history, we were squeezing out the Group PMS.
We now max out the ratio for any sub-section in the right sidebar,
as well as bumping up the min.

(imported from commit f7c44367f2a518d27406993cb6358cc96d1aae92)
2014-02-19 12:45:49 -05:00
Steve Howell 8ce5404777 Describe negated search terms correctly.
This changes Filter.describe and Filter.operator_to_prefix
to handle negated terms correctly.

(imported from commit 673c0d3a5a77784e95772c14e12534ad2daecda2)
2014-02-19 11:05:31 -05:00
Steve Howell 8611cc3977 Extract 'verb' variable in Filter functions.
Extract 'verb' in Filter.operator_to_prefix() and
Filter.describe().  This doesn't change any functionality;
it is designed to make a subsequent change have a less
noisy diff.

(imported from commit e9c4b6edc498d88ec1783ccdba079d980def9438)
2014-02-19 11:05:31 -05:00
Steve Howell 44564274a1 Move methods from search_suggestion to filter.
The methods describe() and operator_to_prefix() are
now in filter.js.  They seem like they eventually
may be useful outside the scope of search suggestions,
and they seem to go hand in hand with other Filter
responsibilities.

(imported from commit 55f14c3ee848febb2e7c8c6a27afd690569b4e08)
2014-02-19 11:05:30 -05:00
Jason Michalski 0244b50f0b Split bot deactivation from user deactivation
(imported from commit 153a870b244e040e3b5976f639866dbace5563f6)
2014-02-18 15:09:22 -05:00
Jason Michalski d177f49a96 Change the create bot API to use rest_dispatch
(imported from commit 0fac290be2ed04178c4df866f5bc958441b2d320)
2014-02-18 15:09:20 -05:00
Jason Michalski 9d973ff106 Change get_bots API to use rest_dispatch
(imported from commit 921895dd636ba118a0f57e60a7bcb9dca1c7c605)
2014-02-18 15:09:19 -05:00
Allen Rabinovich 7822be5cd9 Fix failing stream sidebar node test
(imported from commit 3187a8f34389bf1f0b37e80edec9fb56f7281306)
2014-02-18 12:50:32 -07:00
Allen Rabinovich d0572f50fb Miscellaneous style fixes for narrow window mode
(imported from commit f0a33be1640b2cb8810a0e7af52f453421cf0fe4)
2014-02-18 12:50:32 -07:00
Allen Rabinovich b00ebd1bdf Miscellaneous fixes to message pane redesign
(imported from commit 8cedb21cb3a520dd9a28c943e047e8f73f410cae)
2014-02-18 12:50:32 -07:00
Allen Rabinovich cff698d210 Restyle unread markers
(imported from commit 70a363cb50eebdd0bd2f11ab56074e46301117b3)
2014-02-18 12:50:32 -07:00
Allen Rabinovich 56f1c023ab Redesign elements in left sidebar
(imported from commit 37ae516325a4bd4db7a9e45e7862af6fee3af46e)
2014-02-18 12:50:32 -07:00
Allen Rabinovich cdd43baf5d Add sticky class and an extra recipient bar wrapper
(imported from commit 17724a9e31d5baa5a011ead6d521dd7a4e6fe0e2)
2014-02-18 12:50:32 -07:00
Allen Rabinovich b0d768b16b Visual adjustments for redesign
(imported from commit 79ab506f15671ae2c3d7c6d06213f24125eca603)
2014-02-18 12:50:32 -07:00
Allen Rabinovich 01a04c3169 Add offsets to fixed elements based on the width of the browser scrollbar.
(imported from commit 2026725165dead381d0b99181ef84a67a5bd6626)
2014-02-18 12:50:31 -07:00
acrefoot 8af170a3c3 update old messages' stream-color text class
(imported from commit 998611bd5b4e25985be73c9262a5c1e772f87ce1)
2014-02-18 12:50:31 -07:00
Allen Rabinovich dc71961dd9 Fix showing stream names on dark background
(imported from commit 82185ac2717b380e81656630d34f377094d16c38)
2014-02-18 12:50:31 -07:00
Allen Rabinovich de65bb8194 Move the header and its menus to the top z-index
(imported from commit bbbc1f0f3868782959b13c0585435ca02300f9cb)
2014-02-18 12:50:31 -07:00
Allen Rabinovich 4c4cd1ed8e Fix top notification display to appear above the floating recipient bar
(imported from commit 0a5915af3589db09ee2bc294afced0a21352fde2)
2014-02-18 12:50:31 -07:00
Allen Rabinovich da3ac9ae1b Implement new unread marker style as background for timestamp
(imported from commit e7782d98216f77f6a018c4c01e88aa57eb05144e)
2014-02-18 12:50:31 -07:00
Allen Rabinovich 48476fcbc5 Code cleanup: remove commented code and console logs
(imported from commit 20058b87775653f2d526c2d3249549402bc36807)
2014-02-18 12:50:30 -07:00
Allen Rabinovich 2c56e692a2 Fix floating recepient bar hiding when switching to settings pages
(imported from commit 9a643075197a53e84df196c3dcc1ce04766d3d4e)
2014-02-18 12:50:30 -07:00
Allen Rabinovich 235baf5187 Fix showing the private message floating recipient bar
(imported from commit 1ee76153dfe72627cbe43ea07b746407e5461da7)
2014-02-18 12:50:30 -07:00
Allen Rabinovich 9dd8779a3a Fix stream color change logic
(imported from commit 45dbc57bf28d6b4536fe7683b4a9ce1331d3d072)
2014-02-18 12:50:30 -07:00
Allen Rabinovich 9d68048d1d Fix edited message squashing against the timestamp
(imported from commit c3d39accc75930841ea1795d8df65d39f02574b6)
2014-02-18 12:50:30 -07:00
Allen Rabinovich 78a3da7fbe Fix issues with message editing and status message layouts
(imported from commit 3ec5c6ccf6c20a6c102075887b6ff36afc613bdd)
2014-02-18 12:50:30 -07:00
Allen Rabinovich 25331d8bb2 Adjust dividing line darkness, compose pane width
(imported from commit 5a0b59a5a967eb2e26291e9892ad89413b8fdd61)
2014-02-18 12:50:29 -07:00
Allen Rabinovich ee3cb60e3c Redesign styles for message pane
(imported from commit 394249d58f1cc3b976b432bbc421b99510e7fff9)
2014-02-18 12:50:29 -07:00
Allen Rabinovich 8f90baf1eb Remove borders around messageboxes
(imported from commit 7ffaf256773daa2c2d79a6043c6e252e283fbaa9)
2014-02-18 12:50:29 -07:00
Allen Rabinovich 34f9cf3aa6 Restyle subject editing form
(imported from commit f2093939fa8069b73e7c785a4dd835eab4c825cd)
2014-02-18 12:50:29 -07:00
Allen Rabinovich dbdc0a9721 Switch message pane headers to new design
(imported from commit f640641553779450f9d9d15e5586ef38e068367b)
2014-02-18 12:50:29 -07:00
Allen Rabinovich e7e2f3a79c Modify crumbbar style to look like an arrowbar
Also:
  * Change fixed element positioning and fix bugs
  * Move settings dropdown back to the right and add left padding to left sidebar

(imported from commit fcf903b59617687f94618a01ce7544b69f408130)
2014-02-18 12:50:29 -07:00
Allen Rabinovich 29250a6692 Move crumbbar to header and change visual appearance
(imported from commit 435e3b46b615f6c496be10b7d170ed3e4201787d)
2014-02-18 12:50:29 -07:00
Steve Howell f1ee2c6503 Put "Link to this conversation" lower in the message menu.
(imported from commit 73d75ac40f097c161f7168a5590c069c1b9e0641)
2014-02-18 13:19:39 -05:00
Steve Howell bbfd33185c Remove narrowing options from message chevron menu.
Remove the options to narrow by topic/person from the menu,
because there are better ways to do this in the UI, and
remove the time travel option, because the "Link to this
conversation" achieves mostly the same effect.

(imported from commit b7e0cfe64c0760e5a7bf7a8c9c05ed1a5b747300)
2014-02-18 13:19:39 -05:00
Steve Howell 580b6949cc Remove reply-to-person-only option from message chevron menu.
(imported from commit 469ebc9b01ee60eb8c0a673099e0dc735ea95a0e)
2014-02-18 13:19:39 -05:00
Steve Howell 64ff916ca2 Be concise in popover menus.
Say Edit/Reply/Collapse/etc. and omit phrases like "this message".

(imported from commit bcf0a8690683c1e0d54b7a6a58fe78b787271357)
2014-02-18 13:19:38 -05:00
Steve Howell 14281de262 Fix brittle layout for "Keyboard shortcuts" help.
Adding one row to the Navigation table made the
Keyboard shortcuts dialog look ridiculous, and it
was caused by a design based around float-left-ing
that broke down when the size of the "Navigation" box
was bigger than the "Composing messages" box.

Now we use a div to enclose the top two boxes in
the modal.

(imported from commit 90288ec288d4cf3d50ed7f5bcb48c8bb3d033f19)
2014-02-18 13:04:36 -05:00
Steve Howell 2c6d7e8e18 Support q hotkey to Search people.
(imported from commit eafaf5900461e2df52de9ddbdc49823bf6d9e403)
2014-02-18 13:04:36 -05:00
Steve Howell 2d09036466 Have ESC blur Search people if it is empty.
(imported from commit d816c8b24cabfbea964fec9cb043f8a00c05f205)
2014-02-18 13:04:35 -05:00
Luke Faraone c33eeeee23 Open a PM from the peoplesearch list on <enter>
Closes trac #2274

(imported from commit 3238abe37b82a994769eebacbd5fced37fca9609)
2014-02-14 09:55:10 -05:00
Luke Faraone 4ebc4a4ef1 Expand characters allowed after an alertword.
We now support .';[ before a word and ';]! after.

Closes trac #2283.

(imported from commit b3e3cb3d8d49a8e74d0b6a108c5ec73e9d9b5f32)
2014-02-13 17:14:53 -05:00
Tim Abbott d7e4429bb7 Revert "Add adjustments for browsers with fixed scrollbar"
This reverts commit 462a3eb5e6b83f9d8091b83e3f8dc458236938ed.

We're reverting this to see if it is the cause of our recent CSS
performance issues.

(imported from commit 6a0b041cfcb6770bbfda0d354444bad2d64459ab)
2014-02-13 16:41:03 -05:00
Tim Abbott 36e2929ee2 Revert "Add radix arguments to parseInt calls"
This reverts commit fd77a988f1aa5bbdf430fbbb710dc9774fa85aaa.

(imported from commit 3865250797dd2ae8ebc9d26f491b0decf1786e21)
2014-02-13 16:41:02 -05:00
Leo Franchi acec697fe7 Report unnarrow times as well as narrow times
(imported from commit b3a889aa11dc112508c5a1d213f68e5223a879fc)
2014-02-13 14:45:22 -05:00
Steve Howell aa90e265c2 Handle negated terms in operands/has_operand/has_operator.
For the Filter helper functions above, we generally want to
ignore negated search terms, since their existence should
really only impact filter predicates and nothing else on the
JS side.  The exception is search, where even the existence
of a negated search needs to be noted to know that we can't
apply a filter locally.

(imported from commit 8bbb410a85fefed549d359e4c779a134ad830c11)
2014-02-13 14:14:25 -05:00
Steve Howell 76ff3a526c Set negated flag explicity to false in JS code.
For negated search terms, we weren't explicitly setting
"negated" to false when callers left it undefined, which was
mostly fine, since undefined is falsey, but it is better to
define it explicitly for debugging/testing purposes.

(imported from commit 68a2790b510d17caed8ca11c38188545d1dcc347)
2014-02-13 14:14:24 -05:00
Steve Howell 2fb7c0059d Support negated searches on staging.
Behind a feature flag you can now do searches like this:

    -pm-with:othello@example.com is:private

The "-" in front of "pm-with" tells us to exclude messages
with Othello from our search.  We support "-" in front of
all operators, although the behavior for "-search:" and
and "-near:" doesn't really change in this commit.

Note that the filtering out of "negated" predicates only
happens on the client side in this commit.  On the server
side we ignore negated predicates and send back a superset
of the results.

(imported from commit 6cdeaf32f2d493fbbb838630f0da3da880b1ca18)
2014-02-13 14:14:24 -05:00
Waseem Daher 98737a012e Properly prepopulate realm name on admin page.
Also, don't call it that.

(imported from commit baacd95be5b01373aa9423071ca72d917480e341)
2014-02-13 13:18:18 -05:00
Jason Michalski 044e3ced4f Fix how the hash URL is build for IE support
IE sometimes returns the pathname without a leading slash. Also
location.origin is not supported and must be build manually.

(imported from commit fb64478aeaac0f17d31021b7c370ff56781b48d1)
2014-02-13 12:39:24 -05:00
Waseem Daher cf13874c9d Change audible notification to a "knock" sound.
Sound is public-domain, from:
http://www.freesound.org/people/Vidsyn/sounds/113619/

(imported from commit e2f6f891f30bbb11496ef725f09587967022dd97)
2014-02-12 17:09:39 -05:00
Steve Howell f4db89c7e9 Supported negated terms in filter predicates (JS).
(imported from commit b50527620b5b451b4d6e0dc073de4036fe2b7e1f)
2014-02-12 16:58:08 -05:00
Jason Michalski dd345bdece Make sure the hash we change to always starts with a #
(imported from commit b27d4a3b9b89b2576d4b1339d55d54ba338a576d)
2014-02-12 16:30:07 -05:00
Jessica McKellar 3a6df13360 Don't fade messages on different topics but the same stream.
(imported from commit 1bc2d49b346619609e73794d237faf2352b974b3)
2014-02-12 16:26:57 -05:00
Tim Abbott 19dcc3f385 Disable centering narrows around first unread message on server.
(imported from commit 11b17c2874370d63528e2c9e978eb605da8005e4)
2014-02-12 15:34:33 -05:00
Jason Michalski bd9cccffce Use pushState where supported to change the URL hash
This this removed one forced relayout of the page on unnarrow. This
saves about 100ms for me.

(imported from commit 0755f425abbe3d99b8a99765549a5bbf3c620b9a)
2014-02-12 15:19:10 -05:00
Tim Abbott fcb8c106b1 Fix saving of pointer on server-initiated reload when narrowed.
Previously, we saved the current_msg_list selected id and then
restored it as the home_msg_list selected id, which could result in
the home view loading to the wrong place.

This takes some already bad code and makes it even more in need of
refactoring, but it does fix a pressing bug.  We should definitely
refactor both:

* the top of narrow.js
* the save/restore code in reload.js

after this, though.

(imported from commit bb2040219e4f545ba90bb04a696996cec2831484)
2014-02-12 14:40:38 -05:00
Tim Abbott f4c514fbf3 hashchange: Fix indentation on main switch statement.
(imported from commit 1420cc2513e1bf6b80c8e52a6c0d3d66e82a5a1d)
2014-02-12 14:40:38 -05:00
Leo Franchi eaa777b612 Use feature detection for bootstrap typeahead key handling
(imported from commit 1ce443d3e61920bf5842b31263141d4f175a6514)
2014-02-12 14:31:56 -05:00
Allen Rabinovich 15da5628a9 Add radix arguments to parseInt calls
(imported from commit fd77a988f1aa5bbdf430fbbb710dc9774fa85aaa)
2014-02-12 11:24:27 -07:00
Leo Franchi 502852541b Enable local echo for customer15.invalid redux
(imported from commit 88f13b58cfc8b68dc439138cc62aea3ff72868f1)
2014-02-12 11:53:50 -05:00
Allen Rabinovich addfcbfc30 Add adjustments for browsers with fixed scrollbar
(imported from commit 462a3eb5e6b83f9d8091b83e3f8dc458236938ed)
2014-02-12 10:47:54 -05:00
Leo Franchi c63f881518 Fix inverted boolean check for local messages in topic propagation
(imported from commit 2daf7c0c8729a785c3a1105803cbaed31f32128e)
2014-02-12 10:08:19 -05:00
Steve Howell bf08e33648 Revert "Ensure server still gets narrow operators as tuples."
This reverts commit 64aced74012101f3bdbd3a4e6066b46ad8e1f4ea,
which was always intended as temporary code until we upgraded
the back end to support dictionary-style narrow operators.

(imported from commit b8d3a19f3aad3d9d6a26b9dcc07f502c55b18edd)
2014-02-11 13:56:23 -05:00
Steve Howell afe893b324 Remove filter_term() shim function.
The filter_term() function was supporting the transition
from using tuples for search terms to using dictionaries,
but now all of the JS code should be dictionary-compatible.
(We had already abandoned the tuples safety net on staging,
and a couple days of use have given me confidence we can
pull the shim code.)

The one side effect this change has is that search terms will be
initialized to {} instead of [].  This distinction matters
when it comes to calling JSON.stringify on the search terms.

(imported from commit 1fbe11011d8953dbea28c0657cbf88384d343e00)
2014-02-11 13:52:17 -05:00
Steve Howell c87b77e52e Report errors due to legacy tuples in hashchange.operators_to_hash.
(imported from commit f639ba52f85bf103afdd26dc4f279e1f03570119)
2014-02-11 11:45:44 -05:00
Zev Benjamin 92b249a0a1 Replace curly quotes with regular quotes on the front-end before performing a search
(imported from commit 1be7384cea8808f9fceec889ecee6434e9bad6c2)
2014-02-11 11:45:44 -05:00
Jason Michalski 3de8bb7f80 Add a detailed description to event loop errors
(imported from commit b842b59912929d08f3d46dafaf49276d311f4ed2)
2014-02-10 17:08:11 -05:00
Tim Abbott 37dffa0f2d channel: Improve handling of non-JSON format 403 responses.
(imported from commit 942a830155c84741e67605672c837b431cca8af7)
2014-02-10 17:05:34 -05:00
Jason Michalski c028dbe6b9 Put the reload GC changes behind a feature_flag
(imported from commit b009c2f4e5d76573902f335fb1a3b74622af6191)
2014-02-10 15:41:32 -05:00
Jason Michalski 47ca6b2800 Add ajax request tracking and aborting to channel
The channel module now keeps track pending ajax requests and has an
abort_all function to angle all pending requests.

(imported from commit 4e78ab24d2295bd67de5633e3a200dfa489825b1)
2014-02-10 15:41:32 -05:00
Steve Howell 6b93315cc3 Prevent browser errors for stream: searches.
When we typed "stream:" into the search bar, the empty operand
triggered an error in the Dict class for an undefined key, because
we were using opts[0] as a "defensive" workaround to opts.operand,
but opts.operand of '' is more correct than opts[0] being undefined.

Now we only fall back to opts[0] whe opts.operand is undefined, and
we emit a blueslip error when that happens.

(imported from commit 88a196d3bc3d67689c36bc036f378da744c652f9)
2014-02-10 15:11:43 -05:00
Steve Howell 10b24f77b6 Fix misc. uses of search tuples.
(imported from commit c7dc47c1396eb0d9f6821cafcb3dc90d283b4764)
2014-02-10 15:11:43 -05:00
Leo Franchi 74b86c88b8 Enable local echo for customer15.invalid
(imported from commit 737d1efedd37d7c2138b3575fddef694d69378f0)
2014-02-10 13:23:28 -05:00
Leo Franchi 9a2bf4f359 Remove blueslip debug for localecho
(imported from commit 88682c42ed398dfe7afecd7260db2aefa7d474ba)
2014-02-10 13:23:28 -05:00
Steve Howell 72ee636571 Use stream_id as key for subscription removals.
Have the server send down the stream's id for removal
events, and have the client use that id to look up the
stream in its internal data structures.  This sets the
stage for eventually just sending the stream id (and not
the stream name) down to clients, once all our clients
are ready to use the stream id.

(imported from commit 922516c98fb79ffad8ae7da0396646663ca54fd0)
2014-02-10 13:23:27 -05:00
Steve Howell 194464f596 Extract subs.mark_sub_unsubscribed().
Splitting out subs.mark_sub_unsubscribed gives the calling
code flexibility to track down the "sub" as it sees fit.

(imported from commit 4052f5a2a0f6fd58a2177f2b5961ce72f052cf94)
2014-02-10 13:23:27 -05:00
Steve Howell bb0608b55a Use real stream ids in our stream-related UI widgets.
Before this change, we were using sequentially generated ids
on the client side to identify streams.  Now we just use
the ids from the server.  The goal here is to reduce the
confusion of having two different ids attached to a stream.
Also, not that it matters a ton, but this also means that
the browser basically has an immutable id for each stream
that is future-proof to reloads, multiple create_sub calls, etc.
It also a bit easier to grep for ".stream_id" than ".id".

(imported from commit 057f9e50dfee127edfe3facd52da93108241666a)
2014-02-10 13:23:27 -05:00
Steve Howell 2fb70eb38c Remove tuples safety net for narrow filters on staging.
We have shim code that makes our internal narrow operators
support both a tuple interface and an object interface.  We
are removing the shim on staging to help expose any dark
corners of the code that still rely on operators being
represented as tuples.

(imported from commit f9d101dbb7f49a4abec14806734b9c86bd93c4e1)
2014-02-10 13:23:27 -05:00
Steve Howell 5c2a41f8b7 Ensure server still gets narrow operators as tuples.
(imported from commit 64aced74012101f3bdbd3a4e6066b46ad8e1f4ea)
2014-02-10 13:23:27 -05:00
Steve Howell 8d81ea33da Have pick_empty_narrow_banner() use operator/operand.
This is part of phasing out the internal tuple representation.

(imported from commit aa8788efbdc0f8d08d99bae154f68a3b60272c65)
2014-02-10 13:23:26 -05:00
Leo Franchi 1c332f5d6a Standardize on 'subscription' as event type name for subscription changes
Our overall guideline is the type names for events are singular, and the list of
events of that type are plural. 'subscriptions' was not following this guideline
and (potentially as a result) had a bug where it was impossible for clients to explicitly
subscribe to subscription change events properly.

(imported from commit 7b3162141fd673746e0489199966c29ea32ee876)
2014-02-06 17:07:38 -05:00
Jason Michalski f1e110c177 Empty large collections and remove event listeners before reload
Chrome was showing a memory leak after many auto-reloads. Emptying the
the collections and removing the event listeners reduces the severity.
Before this change 40 reloads would would grow to about 140MB, now it
stays around 50MB.

(imported from commit 55fbeff9bdd0363bb95929f2981a2de238ff35d8)
2014-02-06 16:42:38 -05:00
Steve Howell fc78a2cc66 Stop using tuples in search_suggestions.js and Filter.unparse().
This is yet another change related to phasing out the
[operator, operand] tuple data structure for representing
terms in a narrow.

(imported from commit 508e58fc4eebae8a24a8ae59919ba5d94fc66850)
2014-02-06 16:42:38 -05:00
Steve Howell 90f6eb0661 Keep track of subs by stream_id inside of stream_data.js.
The JS code can now call stream_data.get_sub_by_id() to get
a sub from a stream_id.  Subs have stream_id due to a prior commit,
and we keep track of the mapping in stream_data's subs_by_stream_id
variable.

(imported from commit 409e13d6d2e79d909441a66c85ee651529d15cd2)
2014-02-06 12:09:52 -05:00
Steve Howell 3a96686cbc Add stream_id to page_params.{subscriptions,unsubscribed}
This isn't used by the client yet, but it should be harmless.

(imported from commit e09ac65ca802f5cf16375b8a93d34e0dfbcb76b4)
2014-02-06 12:09:52 -05:00
Steve Howell 07e337ff8a Simplify calling mark_(un)subscribed in server_events.js
(imported from commit a5faae42642c5d2c2410021bb33917827577d9a2)
2014-02-06 12:09:52 -05:00
Steve Howell 583dae72a3 Change how the tutorial overrides the default stream color.
The tutorial introduces "engineering" messages that might not
be in the user's normal subscription, and they would get a gray
border if we did not override the stream color.  Before this change,
we accomplished this by overriding the core data structure in
stream_data.js.  Now we are a bit more future-proof; we only
override stream_color.default_color.

(imported from commit 0d0845b72f766912679f5aa7641ae9a60fdbb4ce)
2014-02-06 12:09:51 -05:00
Steve Howell dbcc406272 Fix blueslip warning for stream email_address updates.
(imported from commit 6cc105113072eadff3781bdbf9e08e43974ade4c)
2014-02-06 12:09:51 -05:00
Tim Abbott 02d69f18ac Clean up codepath for selecting a message on unnarrowing.
This does have a small functional change of using use_closest even for
the current_msg_list.last().id case, but that's harmless; and it does
reduce a lot of code duplication and confusing logic here.

(imported from commit 7c4ecaa197120cc6d5c05ce4887f33c7d94a9c59)
2014-02-06 10:25:35 -05:00
Tim Abbott 1bd9e5809c Restore the browser's scroll position on server-initiated reload.
(imported from commit 934659c0f1a2c014cfd2811fe49ea31abad262b2)
2014-02-06 10:25:35 -05:00
Leo Franchi d961829355 Tell the desktop app the source of a desktop notification
(imported from commit ed697d50e35589a61746ad66bff5ae50becead77)
2014-02-05 12:02:27 -05:00
Jason Michalski 515e64175f Add extra logging when the selected row can not be found in the cache
The leading theories this will test are:

1) MessageList._items becomes unsorted and the binary search starts
returning the wrong index from selected_idx.

2) MessageListView.render is not rendering the message or it is not
being inserted into the cache.

(imported from commit 926b7d7bf9df338320a8cba6241038176ce4b47d)
2014-02-05 10:27:33 -05:00
Jason Michalski 0dd61e9222 Blueslip has a warn not warning function
(imported from commit 1f18331cac451c62a089f042b316278030c41965)
2014-02-04 23:08:19 -05:00