Commit Graph

590 Commits

Author SHA1 Message Date
Steve Howell fd9d48f6df [staging] Double-clicking on stream row toggles its zoom level.
If you double-click on a stream that you've narrowed to, it
will either zoom in or zoom out the left sidebar view.  Zooming
in shows just that stream; zooming out shows all streams.

This is feature flagged to staging only.

(imported from commit 6fdb3cacd68635f313f2a8a81edf2d6101cce2cb)
2013-11-26 10:34:09 -05:00
Steve Howell 44f575c812 Add topic-zooming hooks.
This commit doesn't actually add the final UI to zoom/unzoom
topics, because I want to keep those in separate commits, in
case we change how to enable the feature.  But this commit
adds a toggle_zoom() function that zooms/unzooms topics.

Zooming is minimally invasive, because we don't really introduce
many extra elements to the UI; instead, we just make the list of
streams be a list of length one (i.e. the active stream).  This
gives us a lot of stuff for free, basically, like unread counts, etc.

(imported from commit 814c1361b6210d1591b4174bed1d6e0c98a3f255)
2013-11-26 10:34:08 -05:00
Steve Howell 1080b4239d Move sidebar click handlers into stream_list.js.
(imported from commit b284508b3abd2edc3fa4edf432307eee8f034b58)
2013-11-26 10:34:08 -05:00
Steve Howell 60a8e6e769 Make sure click handlers are called from sidebar menu.
This is a subtle change, to make sure that list items
from stream_filters always go through click handlers, which
ensures, e.g., consistent behavior on opening the compose box.

(imported from commit cd734901def8959c8c8a29c164c7a60730ae0915)
2013-11-26 10:34:08 -05:00
Steve Howell d39141039b Remove dead code related to streamlist_expand class.
(imported from commit b4dd57fdd77b74f9fe570b2267a6f96ec12937d6)
2013-11-26 10:34:08 -05:00
Steve Howell 01f141e2b6 Show more topics in search suggestions.
Search suggestions were limiting you to the last 10 topics
in a stream, not the last 10 *matching* topics in a stream.
This was just a bug, where the slice() call was supposed to
come after the filter() call.

(imported from commit 7ad8f8409315d8ca389aa5bb085275a60f6e08c0)
2013-11-25 16:26:22 -05:00
Tim Abbott 3378fc74c7 Enable conversation narrows (but not single-message narrows) for everyone.
(imported from commit 48123d77f9f9dc5d858718888dedf763328a9774)
2013-11-25 14:00:28 -05:00
Tim Abbott 8952d8d428 Add 'narrow to this conversation and time' narrowing.
(imported from commit 3bc5ea09d333c2caa37557419d54d48bbbb5a639)
2013-11-25 14:00:28 -05:00
Tim Abbott 40b6761e37 Fix short-circuiting of filters with certain narrow keywords.
(imported from commit 663646bb6eea921c1f8f845ede94fb5284d4543a)
2013-11-25 14:00:28 -05:00
Tim Abbott be2d546ffe Fix narrowing links in message popovers.
This should make it possible to either open these using middle-click
or copy the links for e.g. putting in a bug tracker ticket.

(imported from commit 0c531453cdd7197f932079c245700948b416a3d5)
2013-11-25 14:00:28 -05:00
Kevin Mehall 8bf8798e0c Remove problematic unused variable in "outside narrow" notification.
`$(message.content)` breaks on /me messages because they are not
wrapped in `<p>` so the message content is interpreted as a selector.

The message text is no longer used, so this line  can simply be removed.

(imported from commit ee8d48c1f5fc489cc577cc466f629891ea65d55f)
2013-11-25 13:41:37 -05:00
Leo Franchi baf2b5a275 Only scroll to a stream once the streams have loaded
(imported from commit 535c7900eae025a5ffc6d7167b8a56c20b1076d0)
2013-11-25 11:47:00 -05:00
acrefoot 36e9f512c4 remove unnecessary comment
(imported from commit aaeaf0f9a0a97ae81b62315c0bfd88752615cfd6)
2013-11-22 17:12:52 -05:00
acrefoot 4cd1d69ea0 Add the ability to unsubscribe all users from a stream
This resolves Trac #2022

(imported from commit 23d5129a6bec40c33eaf71953cd41ec387646a39)
2013-11-22 17:12:51 -05:00
Waseem Daher 5403a2d9b0 Experiment: Clicking desktop notification jumps you to the message in a narrow.
This seems to only work in Chrome and Safari.
Firefox (at least my version) simply doesn't fire an onclick
event, and our desktop app has its own native code that decides
what to do when a notification is clicked.

(imported from commit 30bacec4726b9e6c022dd2c74f83d37747260dba)
2013-11-22 16:33:41 -05:00
Steve Howell a74d503d51 Turn on single message narrowing for everybody.
(imported from commit b860ce0d48157462b432d9b915edca67a8e03556)
2013-11-22 15:33:23 -05:00
Steve Howell 688cc4963c Rename sort_narrow_list() to build_stream_list().
(imported from commit 533dbe4171b859077c496f656f8c2476107b318c)
2013-11-22 14:52:04 -05:00
Steve Howell 9a68022516 Extract build_subject_list().
(imported from commit 7ce2ec353c465e05e3e4dea3ce9be1651db2d86c)
2013-11-22 14:52:03 -05:00
Tim Abbott 0d7e65ea77 Don't try to cleanup expired events queues.
(imported from commit 45329bd32442f4a706a853939b70b50469d408e4)
2013-11-22 12:36:30 -05:00
Steve Howell 837b066f49 Turn on huddle list for everybody.
(imported from commit 812106231b192d8b0c0ab7b0e54e25677df56245)
2013-11-22 10:35:35 -05:00
Jessica McKellar 10c5517414 In Safari, have shift-tab on edit message buttons do the right thing.
Safari doesn't let you (shift-)tab to buttons, so we have to support
this ourselves in several cases.

(imported from commit 1b8ae28d6950fd9686b442948d71ab300c7328dd)
2013-11-21 17:40:04 -05:00
Allen Rabinovich e10549a310 Lighten the message controls and show them on hover
(imported from commit 09953116ebef779ea99327ff7c76428e908e2e31)
2013-11-21 11:05:07 -08:00
Tim Abbott 654b384980 Disable use_socket for now.
(imported from commit e5b40075b3a418a17ad23e538400db0ccdeebf3f)
2013-11-21 13:50:54 -05:00
Tim Abbott d385b35547 Improve copy for new webathena error.
(imported from commit 497f19220d1ab460b6bc0fa4f6bad2dd72733098)
2013-11-21 11:21:10 -05:00
Waseem Daher ce29c4dd34 Prefill the existing topic when editing a message topic.
This is a behavior that basically only administrators can trigger
today, with the exception of the fact that anyone can edit a no-topic
message.

(imported from commit d50eded79ddf3438d87e3dc6a8641fbfb034d50c)
2013-11-21 10:38:36 -05:00
Tim Abbott bfd01454f8 Don't allow Zephyr users to send messages when not linked to webathena.
(imported from commit 03362a52e958aa1913ffb8bfa22ba57fa1697d7c)
2013-11-20 18:54:26 -05:00
Tim Abbott 511856eba2 Cleanup event queues when browser windows reload.
(imported from commit ec06517ecc64af1724115bc94a0996a2822e2292)
2013-11-20 18:34:16 -05:00
Zev Benjamin 0ad0e18c49 socket: Correctly reference the socket object inside event handlers
(imported from commit d5954007764f5e5e30b15d1af8e9b3c43a3ebde9)
2013-11-19 18:19:15 -05:00
Jessica McKellar 7b7dd7d8ca Give notifying on sends not in view to everyone.
(imported from commit cae30d82e3647c3b710c568e47cc217457d3ab03)
2013-11-19 17:19:27 -05:00
Jessica McKellar 657e1f1f9a Don't show the out of view banner for messages further down.
This makes the notification slightly more conservative as we do our
initial roll out. In particular, it avoids cases like being notified
when you are almost at the bottom of your feed for a message in your
narrow.

(imported from commit 9c834b1c344d8c429de92fb3512f32494fc02379)
2013-11-19 17:17:33 -05:00
acrefoot dbd236b514 Autocomplete emails on streams subscriptions input
This resolves Trac #1867

(imported from commit 80ee6cc3a6b7ccacd8bd1bde71f1da8e3804ab79)
2013-11-19 16:43:37 -05:00
Steve Howell 8339a40acd Prevent stale avatars from showing in new messages.
When you upload a 2nd avatar to Zulip, the URL doesn't actually
change, so even new messages can show the old avatar, if your
browser is caching.  We work against the cache by having the
"stamp" argument, which we vary at reload time and also when
we upload the new avatar.  The browser still benefits from
cached images as new messages come in.

(imported from commit 84869c8d7f251c9f2498026a5e9e3b2451784879)
2013-11-19 16:04:41 -05:00
Steve Howell 2c2d18bc7a Allow search hotkey to work from outside the home tab.
(imported from commit 9b8944ce57a6b7466e7b115258e2501afd7cb5b1)
2013-11-19 15:12:35 -05:00
Jessica McKellar d1619b3f3c Use a more accurate "is admin?" check.
UserProfile.show_admin was intended to be a check for users that have
administrative rights in other realms, which we've harmlessly but
erroneously been using to check if they are an admin in their realm.

Use the more straightforward check instead, with a more intuitive
name.

(imported from commit d81050c7dbbb19e59c5e31750be303a4630e1456)
2013-11-19 14:31:02 -05:00
Jessica McKellar 2c841042ae Allow admins to rename any topic.
(imported from commit 5b557e8244e5196c9aa0ee29d4efb00986434528)
2013-11-19 14:31:02 -05:00
Zev Benjamin 39c9ac79ae socket: Resend messages on reconnect when the server never received them
(imported from commit 1810a76adf663e40c2d5292b48eb98553b47181d)
2013-11-19 11:06:14 -05:00
Zev Benjamin 36ecaea338 socket: Reconnect if we don't get an ACK for a request
(imported from commit ec7698f50c6bc21482539e11e574d9444bc6c35e)
2013-11-19 11:06:14 -05:00
Zev Benjamin 15a837d12e [manual] socket: Send explicit ACKs
There will be browser errors on staging when this is deployed due to the socket
protocol changing.

(imported from commit f1eda5b5c2ec9c60c23b3ca96277a61debadf5bb)
2013-11-19 11:06:14 -05:00
Zev Benjamin beb7f519a9 socket: Try to reconnect on unsuspend
(imported from commit f4d630ccc4c2dc622f6e9b7cbbb1f318a7f4b430)
2013-11-19 11:06:13 -05:00
Zev Benjamin 5d93cf9ea5 Trigger an event when we detect that we've unsuspended
(imported from commit a26414a3083af1267bf30c165cf721ab9f5a80be)
2013-11-19 11:06:13 -05:00
Zev Benjamin 17cc606eee Socket: Reconnect if we miss server heartbeats
(imported from commit 52bd5ebdbec6e89f54dc67ad19a538dce910fe47)
2013-11-19 11:06:13 -05:00
Zev Benjamin 1562ba7439 socket: Clean up reconnection logic
(imported from commit 3060803452bbb29417388cf612669785237f84f9)
2013-11-19 11:06:13 -05:00
Zev Benjamin 2df532313a socket: Rename _timeout_id to _reconnect_timeout_id
(imported from commit a1f5c86adf9397bc4147cbc4875e036ba6844160)
2013-11-19 11:06:13 -05:00
Steve Howell f783d24892 Make sure user list shows when you open it with the toggle button.
If you don't call ui.resize_page_components(), then the user
list will have zero height.  Now we call it.

(imported from commit ca2e295319550509360e4d2278489f9a328335ff)
2013-11-19 10:56:25 -05:00
Steve Howell 197ddd6edb Turn off left side userlist on staging.
(imported from commit 2c137eaaadbe94ec4f9e3cd9a02766f962641785)
2013-11-19 09:22:40 -05:00
acrefoot e2c388c49c Attempt 2: Notifications in the composebox
This moves the notify-not-in-view notifications into the composebox area.
It also tries to be a bit smarter about what action it links and what it displays.

(imported from commit 1c79bd0d9ef972059a006b17501a09b72e961ee3)
2013-11-18 16:09:34 -05:00
Waseem Daher 35dd1153ea Don't use a spinner in the "Create bot" form.
Just disabling the button with a status message is probably
sufficient.

(imported from commit dd46e5ac3d2224d84dc32d057469c434007001fa)
2013-11-16 13:03:56 -06:00
Tim Abbott 6497f330ea Fix missing table headers on admin page.
(imported from commit e5c97838e1b5b11c90384d8c49aa2087fd8fc219)
2013-11-16 11:35:26 -05:00
Tim Abbott b55e406f93 Display deactivated users at the bottom of the admin users page.
(imported from commit 1a5d5d64fffc9ed7633d468b975dd56c28f85ccf)
2013-11-16 11:35:26 -05:00
Tim Abbott c1ddc0908f Admin: Put bots in a separate table.
(imported from commit 21330e28b486e10aff6af5f48280ea675cbd5697)
2013-11-16 11:35:26 -05:00