sidebar: Rename classes for menu icons in sidebars.

This commit is contained in:
Siddharth Varshney
2020-04-16 19:45:39 +05:30
committed by Tim Abbott
parent 7d33bcc02d
commit de47262518
9 changed files with 43 additions and 43 deletions

View File

@@ -868,7 +868,7 @@ exports.register_click_handlers = function () {
e.preventDefault();
});
$('#user_presences').on('click', '.user-list-arrow', function (e) {
$('#user_presences').on('click', '.user-list-sidebar-menu-icon', function (e) {
e.stopPropagation();
// use email of currently selected user, rather than some elem comparison,

View File

@@ -263,7 +263,7 @@ function build_starred_messages_popover(e) {
}
exports.register_click_handlers = function () {
$('#stream_filters').on('click', '.stream-sidebar-arrow', function (e) {
$('#stream_filters').on('click', '.stream-sidebar-menu-icon', function (e) {
e.stopPropagation();
const elt = e.target;
@@ -276,10 +276,10 @@ exports.register_click_handlers = function () {
});
});
$('#stream_filters').on('click', '.topic-sidebar-arrow', function (e) {
$('#stream_filters').on('click', '.topic-sidebar-menu-icon', function (e) {
e.stopPropagation();
const elt = $(e.target).closest('.topic-sidebar-arrow').expectOne()[0];
const elt = $(e.target).closest('.topic-sidebar-menu-icon').expectOne()[0];
const stream_li = $(elt).closest('.narrow-filter').expectOne();
const stream_id = elem_to_stream_id(stream_li);
const topic_name = $(elt).closest('li').expectOne().attr('data-topic-name');
@@ -291,9 +291,9 @@ exports.register_click_handlers = function () {
});
});
$('#global_filters').on('click', '.all-messages-arrow', build_all_messages_popover);
$('#global_filters').on('click', '.all-messages-sidebar-menu-icon', build_all_messages_popover);
$('#global_filters').on('click', '.starred-messages-sidebar-arrow', build_starred_messages_popover);
$('#global_filters').on('click', '.starred-messages-sidebar-menu-icon', build_starred_messages_popover);
exports.register_stream_handlers();
exports.register_topic_handlers();

View File

@@ -294,10 +294,10 @@ li.top_left_starred_messages {
line-height: 1.1;
}
.all-messages-arrow i,
.stream-sidebar-arrow i,
.starred-messages-sidebar-arrow i,
.topic-sidebar-arrow i {
.all-messages-sidebar-menu-icon i,
.stream-sidebar-menu-icon i,
.starred-messages-sidebar-menu-icon i,
.topic-sidebar-menu-icon i {
padding-right: 0.25em;
display: inline-block;
width: 13px;
@@ -307,10 +307,10 @@ li.top_left_starred_messages {
All of our left sidebar handlers use absolute
positioning. We should fix that.
*/
.all-messages-arrow,
.stream-sidebar-arrow,
.starred-messages-sidebar-arrow,
.topic-sidebar-arrow {
.all-messages-sidebar-menu-icon,
.stream-sidebar-menu-icon,
.starred-messages-sidebar-menu-icon,
.topic-sidebar-menu-icon {
position: absolute;
display: none;
}
@@ -319,9 +319,9 @@ li.top_left_starred_messages {
The All Messages and Stream chevrons are
pretty similar.
*/
.all-messages-arrow,
.starred-messages-sidebar-arrow,
.stream-sidebar-arrow {
.all-messages-sidebar-menu-icon,
.starred-messages-sidebar-menu-icon,
.stream-sidebar-menu-icon {
top: 3px;
right: 10px;
font-size: 0.8em;
@@ -332,7 +332,7 @@ li.top_left_starred_messages {
font to show they're "lower" in the hierarchy,
which also affects it positioning.
*/
.topic-sidebar-arrow {
.topic-sidebar-menu-icon {
top: 1px;
right: 10px;
font-size: 0.7em;
@@ -342,10 +342,10 @@ li.top_left_starred_messages {
When you hover over list items, we hover
the relevant chevrons in light gray.
*/
li.top_left_all_messages:hover .all-messages-arrow,
li.top_left_starred_messages:hover .starred-messages-sidebar-arrow,
#stream_filters li:hover .stream-sidebar-arrow,
li.topic-list-item:hover .topic-sidebar-arrow {
li.top_left_all_messages:hover .all-messages-sidebar-menu-icon,
li.top_left_starred_messages:hover .starred-messages-sidebar-menu-icon,
#stream_filters li:hover .stream-sidebar-menu-icon,
li.topic-list-item:hover .topic-sidebar-menu-icon {
display: inline;
cursor: pointer;
color: hsl(0, 0%, 53%);
@@ -355,10 +355,10 @@ li.topic-list-item:hover .topic-sidebar-arrow {
If you hover directly over the chevron itself,
show it in black.
*/
.starred-messages-sidebar-arrow:hover,
.all-messages-arrow:hover,
.stream-sidebar-arrow:hover,
.topic-sidebar-arrow:hover {
.starred-messages-sidebar-menu-icon:hover,
.all-messages-sidebar-menu-icon:hover,
.stream-sidebar-menu-icon:hover,
.topic-sidebar-menu-icon:hover {
color: hsl(0, 0%, 0%) !important;
}

View File

@@ -308,11 +308,11 @@ on a dark background, and don't change the dark labels dark either. */
#searchbox .search_icon,
#searchbox .search_button,
.close,
#user_presences li:hover .user-list-arrow,
li.top_left_all_messages:hover .all-messages-arrow,
li.top_left_starred_messages:hover .starred-messages-sidebar-arrow,
#stream_filters li:hover .stream-sidebar-arrow,
li.topic-list-item:hover .topic-sidebar-arrow {
#user_presences li:hover .user-list-sidebar-menu-icon,
li.top_left_all_messages:hover .all-messages-sidebar-menu-icon,
li.top_left_starred_messages:hover .starred-messages-sidebar-menu-icon,
#stream_filters li:hover .stream-sidebar-menu-icon,
li.topic-list-item:hover .topic-sidebar-menu-icon {
color: hsl(236, 33%, 80%);
}
@@ -326,11 +326,11 @@ on a dark background, and don't change the dark labels dark either. */
color: hsl(0, 0%, 100%);
}
#user_presences li .user-list-arrow:hover,
.all-messages-arrow:hover,
.starred-messages-sidebar-arrow:hover,
.stream-sidebar-arrow:hover,
.topic-sidebar-arrow:hover {
#user_presences li .user-list-sidebar-menu-icon:hover,
.all-messages-sidebar-menu-icon:hover,
.starred-messages-sidebar-menu-icon:hover,
.stream-sidebar-menu-icon:hover,
.topic-sidebar-menu-icon:hover {
color: hsl(0, 0%, 100%) !important;
}

View File

@@ -33,7 +33,7 @@
white-space: nowrap;
text-overflow: ellipsis;
.user-list-arrow {
.user-list-sidebar-menu-icon {
position: absolute;
top: 0px;
right: 10px;
@@ -54,7 +54,7 @@
}
&:hover {
.user-list-arrow {
.user-list-sidebar-menu-icon {
display: inline;
cursor: pointer;
color: hsl(0, 0%, 53%);

View File

@@ -12,6 +12,6 @@
<div class="count"><div class="value"></div></div>
</div>
<span class="stream-sidebar-arrow"><i class="fa fa-chevron-down" aria-hidden="true"></i></span>
<span class="stream-sidebar-menu-icon"><i class="fa fa-chevron-down" aria-hidden="true"></i></span>
</div>
</li>

View File

@@ -7,7 +7,7 @@
<div class="value">{{unread}}</div>
</div>
</span>
<span class="topic-sidebar-arrow">
<span class="topic-sidebar-menu-icon">
<i class="fa fa-chevron-down" aria-hidden="true"></i>
</span>
</li>

View File

@@ -12,5 +12,5 @@
</a>
<span class="count"><span class="value">{{#if num_unread}}{{num_unread}}{{/if}}</span></span>
</div>
<span class="user-list-arrow"><i class="fa fa-chevron-down" aria-hidden="true"></i></span>
<span class="user-list-sidebar-menu-icon"><i class="fa fa-chevron-down" aria-hidden="true"></i></span>
</li>

View File

@@ -13,7 +13,7 @@
<span class="value"></span>
</span>
</a>
<span class="arrow all-messages-arrow"><i class="fa fa-chevron-down" aria-hidden="true"></i></span>
<span class="arrow all-messages-sidebar-menu-icon"><i class="fa fa-chevron-down" aria-hidden="true"></i></span>
</li>
<li class="top_left_private_messages">
<div class="private_messages_header top_left_row">
@@ -54,7 +54,7 @@
<span class="value"></span>
</span>
</a>
<span class="arrow starred-messages-sidebar-arrow"><i class="fa fa-chevron-down" aria-hidden="true"></i></span>
<span class="arrow starred-messages-sidebar-menu-icon"><i class="fa fa-chevron-down" aria-hidden="true"></i></span>
</li>
</ul>
<div id="streams_list" class="zoom-out">