diff --git a/static/js/popovers.js b/static/js/popovers.js
index a407a1ad01..be2f3ec8ed 100644
--- a/static/js/popovers.js
+++ b/static/js/popovers.js
@@ -159,7 +159,7 @@ exports.register_click_handlers = function () {
});
- $('body').on('click', '.user_sidebar_entry', function (e) {
+ $('#user_presences').on('click', 'span.arrow', function (e) {
var last_sidebar_elem = current_user_sidebar_elem;
popovers.hide_all();
diff --git a/static/js/stream_list.js b/static/js/stream_list.js
index e20db05f7d..2c3947a315 100644
--- a/static/js/stream_list.js
+++ b/static/js/stream_list.js
@@ -292,6 +292,10 @@ $(function () {
rebuild_recent_subjects(op_stream[0], subject);
process_visible_unread_messages();
}
+ var op_pm = event.filter.operands('pm-with');
+ if (op_pm.length === 1) {
+ $("#user_presences li[data-email='" + op_pm[0] + "']").addClass('active-filter');
+ }
});
$(document).on('narrow_deactivated.zulip', function (event) {
diff --git a/static/js/ui.js b/static/js/ui.js
index e152922bc5..e35c7fb806 100644
--- a/static/js/ui.js
+++ b/static/js/ui.js
@@ -1158,8 +1158,8 @@ $(function () {
timerender.set_full_datetime(message, time_elem);
});
- $('#user_presences').on('click', 'a', function (e) {
- var email = $(e.target).closest('a').attr('data-email');
+ $('#user_presences').on('click', '.selectable_sidebar_block', function (e) {
+ var email = $(e.target).parents('li').attr('data-email');
narrow.by('pm-with', email, {trigger: 'presence list'});
compose.start('private', {private_message_recipient: email,
trigger: 'presence list'});
diff --git a/static/styles/zulip.css b/static/styles/zulip.css
index 40cae29a68..c2d4f2cad3 100644
--- a/static/styles/zulip.css
+++ b/static/styles/zulip.css
@@ -304,8 +304,11 @@ a:hover code {
}
#stream_filters .narrow-filter {
- display: block;
padding-left: 1.5em;
+}
+
+.narrow-filter {
+ display: block;
position: relative;
padding-right: 10px;
}
@@ -389,18 +392,6 @@ a:hover code {
border-color: gray;
}
-#user_presences .arrow {
- font-size: 1em;
- width: 2em;
-}
-#user_presences .arrow-real {
- display: none;
-}
-#user_presences li:hover .arrow-real {
- display: inline;
- cursor: pointer;
-}
-
#user_presences a {
color: #333;
}
@@ -1641,10 +1632,13 @@ table.floating_recipient {
#stream_filters .subscription_block {
padding-bottom: 4px;
- display: inline-block;
line-height: 12px;
- width: 100%;
padding-top: 4px;
+}
+
+.selectable_sidebar_block {
+ display: inline-block;
+ width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
diff --git a/static/templates/stream_sidebar_row.handlebars b/static/templates/stream_sidebar_row.handlebars
index 85c43f4a3b..75c4db0e37 100644
--- a/static/templates/stream_sidebar_row.handlebars
+++ b/static/templates/stream_sidebar_row.handlebars
@@ -7,10 +7,11 @@
takes up no space and you don't see the background color. Thus, add a
to get the inline-block behavior we want. }}
-
+