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(); e.preventDefault();
}); });
$('#user_presences').on('click', '.user-list-arrow', function (e) { $('#user_presences').on('click', '.user-list-sidebar-menu-icon', function (e) {
e.stopPropagation(); e.stopPropagation();
// use email of currently selected user, rather than some elem comparison, // 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 () { 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(); e.stopPropagation();
const elt = e.target; 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(); 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_li = $(elt).closest('.narrow-filter').expectOne();
const stream_id = elem_to_stream_id(stream_li); const stream_id = elem_to_stream_id(stream_li);
const topic_name = $(elt).closest('li').expectOne().attr('data-topic-name'); 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_stream_handlers();
exports.register_topic_handlers(); exports.register_topic_handlers();

View File

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

View File

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

View File

@@ -12,6 +12,6 @@
<div class="count"><div class="value"></div></div> <div class="count"><div class="value"></div></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> </div>
</li> </li>

View File

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

View File

@@ -12,5 +12,5 @@
</a> </a>
<span class="count"><span class="value">{{#if num_unread}}{{num_unread}}{{/if}}</span></span> <span class="count"><span class="value">{{#if num_unread}}{{num_unread}}{{/if}}</span></span>
</div> </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> </li>

View File

@@ -13,7 +13,7 @@
<span class="value"></span> <span class="value"></span>
</span> </span>
</a> </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>
<li class="top_left_private_messages"> <li class="top_left_private_messages">
<div class="private_messages_header top_left_row"> <div class="private_messages_header top_left_row">
@@ -54,7 +54,7 @@
<span class="value"></span> <span class="value"></span>
</span> </span>
</a> </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> </li>
</ul> </ul>
<div id="streams_list" class="zoom-out"> <div id="streams_list" class="zoom-out">