Commit Graph

823 Commits

Author SHA1 Message Date
acrefoot 3542b63bb7 show notification for @-mentions in muted topics and muted streams
(imported from commit 7c6303a083f1f7d364920462e42360b71d7159b5)
2013-12-09 20:09:11 -05:00
Tim Abbott 40c95c971c Increase restart_get_updates timeout.
(imported from commit 858b5ef8a470b3e68bd9601f001e34510f8ebec8)
2013-12-09 13:45:39 -05:00
Jessica McKellar 81b493ba0b Change pointer semantic to better support side bar users.
There are now 2 cases for narrowing:

1. We narrowed, but only backwards in time (ie no unread were
read). In this case, try to go back to exactly where we were before
narrowing. This behavior is unchanged.

2. We read some unread messages in a narrow. Instead of going back to
where we were before the narrow, go to our first unread message (or
the bottom of the feed, if there are no unread messages). This is new.

This means that after catching up through the sidebar, on returning
home you'll be at the bottom of your feed.

Searching for the first unread message in a message list with 40,000
messages only takes 17ms according to:

function timeit() {
    var t0 = new Date().getTime();
    _.find(current_msg_list.all(), unread.message_unread);
    var t1 = new Date().getTime();
    console.log('Find first unread: ' + (t1 - t0) + ' ms');
}

(imported from commit 87c467578a2cced0aa976d8ae2924371b85d2445)
2013-12-09 10:41:26 -05:00
Jessica McKellar 7c9e7e57b9 Remove message_list:get_messages, which is redundant with all().
(imported from commit 100eb775b89c54c45f70cf903018bdaefa99d3f6)
2013-12-09 10:41:26 -05:00
Jessica McKellar d4fae47430 Don't nudge pointer after unnarrowing.
This is in preparation for changing the pointer semantics later in the
branch.

(imported from commit 705ac2a48d7f36531d7683c5cf585cc89188a210)
2013-12-09 10:41:26 -05:00
Steve Howell 47e20f9ecd Revert "Expand left sidebar when browser is super wide."
This reverts commit f81f4b2739cbf8e3d3c2db5e467cf55b65f0c2bd.

Conflicts:
	static/styles/zulip.css

(imported from commit 6e62619a5f16f120134b222b331a066a57b7cfc6)
2013-12-07 15:28:38 -05:00
Steve Howell 4490881685 Expand left sidebar when browser is 1600px wide.
(imported from commit acdb1c5a92c3b0aa3923cd5c502d324b3ee39a3f)
2013-12-06 19:00:54 -05:00
Zev Benjamin a9d37ebfb9 Align names in group PM list
(imported from commit 21d6a28b8ade617968a1fe9b07d804f0372fb64c)
2013-12-06 17:54:05 -05:00
Zev Benjamin 6f0477f491 Increase number of names shown in group PM list from 2 to 3
(imported from commit eff308fb1405290488f74d9064fd859d33c99558)
2013-12-06 17:54:05 -05:00
Zev Benjamin 0bf60e243a Let group PM items wrap a little
(imported from commit a860e7708eb16769b4c7ae35818521f69ecbdc91)
2013-12-06 17:54:05 -05:00
Steve Howell e4f917aa9c Remove "Invite coworkers" link from left sidebar for CUSTOMER7.
(imported from commit 3955b7e10a639fef67948bc49b2f535acd5bc765)
2013-12-06 17:17:26 -05:00
Steve Howell 1c5d642672 Show Group PMs in CUSTOMER7's left sidebar.
(imported from commit ee8068e1cb0408a6bc42381333d05d4d09689d35)
2013-12-06 17:17:26 -05:00
Steve Howell f607b24ee5 Make size_blocks work for > 2 blocks.
This changes the algorithm slightly for the 2-block case, because
I simplified the logic to just divvy up the space naively based
on the relative size of the blocks.

(imported from commit 9498edd916f65e07fb64d138276691d0d5cc0e55)
2013-12-06 17:17:26 -05:00
Steve Howell 90d97a39c6 Extract ui.confine_to_range().
(imported from commit d95fd01e9783d01908a1155e260bac52339eb6ca)
2013-12-06 17:17:26 -05:00
Steve Howell c1dcf38b0a Use size_blocks() in ui.left_userlist_get_new_heights().
This is a functional change.  Before this change, the stream
list and user list were allowed to take equal space in the left
sidebar; now, we take the size of each list in deciding which
proportion each block gets.

(imported from commit febedcb0518353825e18a6ebe60d1883b98bc78d)
2013-12-06 17:17:25 -05:00
Steve Howell c2034c210c Extract ui.size_blocks().
This is just moving code, nothing fancy.

(imported from commit a753aa36fc976409e79e5a3c11ffdf59197b32f6)
2013-12-06 17:17:25 -05:00
Steve Howell f519fa907c Don't let CUSTOMER7 share the love when in narrow mode.
I don't think share-the-love is turned on for CUSTOMER7 in the
first place, but even if it is, we should hide it when they go
into narrow mode, to make room for streams and users.

(imported from commit 2e80eec0f2ddee06753f48248dca5ac4745db6f1)
2013-12-06 17:17:25 -05:00
Steve Howell 6354b712fc Limit jQuery calls in ui.left_userlist_get_new_heights().
Calling $('#foo') is expensive, so if you need it twice, you
should store it in a variable.  I did this for stream_filters
and user_presences, and added the expectOne() call for them as
well.

(imported from commit 69e689e28b1248a93ef426a89c14033d2fb36104)
2013-12-06 17:17:24 -05:00
Steve Howell 2f6d722d9b Extract ui.set_user_list_heights().
This is a simple extraction--just moving code, nothing fancy.

(imported from commit 6c3717db43728b1ef73b17dd923eec4f7d6f6e4c)
2013-12-06 17:17:24 -05:00
Steve Howell 755f2e043e Turn on left_side_userlist on staging.
(imported from commit 650dd2e8231a8923dad0d66fb065e6638a9937c8)
2013-12-06 17:17:23 -05:00
Waseem Daher 0181ec3ef8 Expand scope of "clicking notification causes narrow" experiment.
(imported from commit aa260386c6cf1be9d9c0122bc9daf971650560d0)
2013-12-06 16:37:22 -05:00
Luke Faraone 54d9a733c2 Documentation for the Perforce integration
(imported from commit 0b2eaed618a226d64dcff395467607f4f7d01579)
2013-12-06 11:54:38 -05:00
Tim Abbott 458c066925 Add reporting for how long narrowing takes in the wild.
I'd also like to add a database table to actually store the values
that we get out of this and our send message requests for future
inspection, but for now, grepping logs+statsd is good enough.

(imported from commit 99ef179651850217fe6e82c5e928d122ca91101e)
2013-12-06 10:28:01 -05:00
Steve Howell f923c15ba8 Change signature of ui.process_condensing().
I renamed ui.process_condensing() to ui.condense_and_collapse(),
and, more importantly, it now takes a list of elements, not a single
element, which allows us to do some computations outside the loop.

(imported from commit d5984088030c2a0d4ec8b258c7fcec3e84caf2b1)
2013-12-05 16:42:07 -05:00
Steve Howell 983f29eac4 Inline ui.could_be_condensed().
This sets us up for the next commit, where we will change
process_condensing to loop over several elements, and we will
not need to recompute height_cutoff every time.

(imported from commit 1cc5b44598b85d1e301bc84492e4dc38f41ec16e)
2013-12-05 16:42:06 -05:00
Leo Franchi 2452a5c0b2 Broadcast an event right before and after doing the WebSocket handshake
(imported from commit 29b80c3b72a2f98c25b59dca3d1597cc5e5f2605)
2013-12-05 16:21:59 -05:00
Zev Benjamin e7b31fd6ad Re-enable use_socket on staging
(imported from commit f96c892409ce554109d4bfef9bd1d364db344e8b)
2013-12-05 15:53:50 -05:00
Zev Benjamin 3bd3991d1b socket: Also cancel ACK timeouts on reconnect
We know we'll never get them and we don't want to trigger additional
reconnects.

(imported from commit c8f932cda378cacf0242aa57bbc829d2f51de2e1)
2013-12-05 15:53:50 -05:00
Zev Benjamin 682a1c92e0 socket: Catch INVALID_STATE_ERR on send
(imported from commit 190652bce7e433c6a237ac99c0c222902bb24f55)
2013-12-05 15:53:50 -05:00
Zev Benjamin cd9a44f35b socket: Cancel pending auth requests on reconnect
(imported from commit 02ea7c1592ef48e2596a0dfd4830c2307a3e7df4)
2013-12-05 15:53:50 -05:00
Zev Benjamin 6eeee0a4f3 socket: Ensure the SockJS object is closed when reconnecting
Without an explicit close, we will continue to get messages on the old
connection, even once we replace the _sockjs property.  This leads to
"impossible" situations, such as receiving ACKs after reconnecting.

(imported from commit f8927fdf0551610e5b9d1db29bba00e160e76b6d)
2013-12-05 15:53:50 -05:00
Allen Rabinovich 30de0b3e77 Add a method for switching to full width and a feature flag to enable full width on staging.
(imported from commit bc7b3a5c8c17ca84e192a63711663cd605425b7f)
2013-12-05 12:41:25 -07:00
Tim Abbott 07cbbfdfda Upgrade slow send restart of get_updates requests to blueslip.error.
Now that this is no longer a known problem with our product, we want
to hear about it when it happens.

I worry a bit that a 2s fuse may be too aggressive for the case of
customers in Europe, but it might be OK.

(imported from commit d1bd6b85cd8dffab9c0d0fd410de5331736b00af)
2013-12-05 14:37:01 -05:00
Steve Howell 70b0e73a24 Support sender:me and pm-with:me search syntax.
We convert sender:me to sender:steve@zulip.com at parsing time,
so users will see the canonicalization in the search bar.  Likewise
for pm-with.

(imported from commit aa9951f13d4633cfef85f03e5486d607fdef414f)
2013-12-05 13:49:04 -05:00
Steve Howell 40057b2fd0 Change operand color to maroon in search help.
(imported from commit 2f0ed0548bce32bdb3ee4e07f75059c0d5695e69)
2013-12-05 12:01:34 -05:00
Steve Howell 686c039c81 Turn on topic zooming for everyone.
(imported from commit ca9664d1b838b09615380f48802384fbb33111fa)
2013-12-05 11:38:59 -05:00
Waseem Daher 052b8a3b59 Push experimental background colors out to MIT.
(imported from commit e7420e55b616f2e885a74391b9b3e4452d9bb25d)
2013-12-05 11:16:57 -05:00
Waseem Daher 010475d49f Enable experimental background color for staging.
(imported from commit 833b25ae48e44bc7749463b7dd26418d6e25703a)
2013-12-04 14:15:23 -05:00
Allen Rabinovich 9f226e4cd2 Add a background switcher function.
(imported from commit a9bd0403637c5da04d93c0ff5e1dd0272238f0a6)
2013-12-04 11:07:12 -07:00
acrefoot 1a21db1170 Fix problem with presence list popovers persisting
This addresses Trac #2090

(imported from commit e98a3dae8e946ec7fdb027d3619ae2b0ddbdbf51)
2013-12-04 11:32:59 -05:00
Steve Howell a4c92093a0 Move #users_presence span.arrow click handler in file.
This is purely cosmetic, to keep similar click handlers near
each other.

(imported from commit 6238905462c7a2edae879cad3ee8822f9a854a1d)
2013-12-03 18:39:44 -05:00
Steve Howell d5b0093d0f Remove unused last_sidebar_elem vars.
(imported from commit ec54c62dd0db68956184ec2ed6f07594e023ef64)
2013-12-03 18:39:44 -05:00
Steve Howell 51fe87fcd6 Kill off dead code: show_user_sidebar_popover().
This code isn't really so much dead; it was never even born. :)

(imported from commit 0351b611dae7c0868cc5c3e2c76c010601c1e8ba)
2013-12-03 18:39:44 -05:00
Jeff Arnold ec56e946a7 Only manually update fading if the compose box is staying open
(compose.start() and compose.cancel() both update the fading themselves)

(imported from commit 63ce2f54106c8cce2306b0c1f3ce56e06f24235f)
2013-12-03 16:58:50 -05:00
Jeff Arnold 2cd7c35875 Make c/C compose to a new destination instead of being identical to r/R
R means "I want to send a PM, you can guess the destination"
r means "I want send a stream message, you can guess the destination"
C means "I want to send a PM and specify the destination"
c means "I want to send a stream message and specify the destination"

(imported from commit 4c93cc3029892c21accadd9624da70ee818dec68)
2013-12-03 16:58:50 -05:00
Allen Rabinovich da3f1704ed A different kind of selection fix.
(imported from commit 377b1571cced9f1ed9e404bbc3f70abb16b7e819)
2013-12-03 14:12:48 -07:00
Waseem Daher 30eaae72e4 Revert "Disallow user selection on body, but allow on individual elements"
This reverts commit b3f8f8f79952c34cdf4087683210bab6e4e46a27.

This seems to break some of our copy-and-pasting code.

(imported from commit 052296a0f4bdb47342708a5e520be260863ccafd)
2013-12-03 14:42:47 -05:00
Tim Abbott 6808b5b5fe Disable scrollTop blueslip error for now.
I think we've got plenty of data of user agent strings for when this
warning triggers at this point.

(imported from commit 8bf6601a325b8e35f5127914a447bd522439c531)
2013-12-03 14:32:44 -05:00
Allen Rabinovich 5d79796465 Disallow user selection on body, but allow on individual elements
(imported from commit b3f8f8f79952c34cdf4087683210bab6e4e46a27)
2013-12-03 11:22:44 -07:00
Steve Howell 80ec6ff8bc Remove transitional show_huddles flag.
(imported from commit 37f6cdb4f62076faa1e977ec9b0a53cc461f0d11)
2013-12-03 10:45:01 -05:00