Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

recent_view: Place new sort arrows.

Karl Stolley492541f1e2aa
diff --git a/web/styles/recent_view.css b/web/styles/recent_view.css
index df62310763a..516970d0aaa 100644
--- a/web/styles/recent_view.css
+++ b/web/styles/recent_view.css
@@ -402,22 +402,30 @@
border-bottom: 1px solid hsl(0deg 0% 0% / 20%) !important;
z-index: 1;
- &.active::after,
- &[data-sort]:hover::after {
- content: " \f0d8";
- white-space: pre;
- padding-top: 3px;
- font: normal normal normal 12px/1 FontAwesome;
- font-size: inherit;
+ .table-sortable-arrow {
+ /* Sub alignment works perfectly in this context,
+ where the table header is a text node. */
+ vertical-align: sub;
+ transform: rotate(180deg);
+ opacity: 0;
+ transition: opacity 100ms ease-out;
+ }
+
+ &.descend .table-sortable-arrow {
+ transform: rotate(0deg);
+ }
+
+ &:not(.active)[data-sort]:hover .table-sortable-arrow {
+ opacity: 0.3;
+ }
+
+ &.active .table-sortable-arrow {
+ opacity: 1;
}
&.active {
opacity: 1;
transition: opacity 100ms ease-out;
-
- &.descend::after {
- content: " \f0d7";
- }
}
&[data-sort]:hover {
@@ -426,10 +434,6 @@
--color-background-recent-view-table-thead-sort-header
);
transition: background-color 100ms ease-in-out;
-
- &:not(.active)::after {
- opacity: 0.3;
- }
}
}
diff --git a/web/templates/recent_view_table.hbs b/web/templates/recent_view_table.hbs
index 2520433fe7a..4efdce442c1 100644
--- a/web/templates/recent_view_table.hbs
+++ b/web/templates/recent_view_table.hbs
@@ -14,13 +14,20 @@
<table class="table table-responsive">
<thead id="recent-view-table-headers">
<tr>
- <th class="recent-view-stream-header" data-sort="stream_sort">{{t 'Channel' }}</th>
- <th class="recent-view-topic-header" data-sort="topic_sort">{{t 'Topic' }}</th>
+ <th class="recent-view-stream-header" data-sort="stream_sort">{{t 'Channel' }}
+ <i class="table-sortable-arrow zulip-icon zulip-icon-sort-arrow-down"></i>
+ </th>
+ <th class="recent-view-topic-header" data-sort="topic_sort">{{t 'Topic' }}
+ <i class="table-sortable-arrow zulip-icon zulip-icon-sort-arrow-down"></i>
+ </th>
<th data-sort="unread_sort" data-tippy-content="{{t 'Sort by unread message count' }}" class="recent-view-unread-header unread_sort tippy-zulip-delayed-tooltip hidden-for-spectators">
<i class="zulip-icon zulip-icon-unread"></i>
+ <i class="table-sortable-arrow zulip-icon zulip-icon-sort-arrow-down"></i>
</th>
<th class='recent-view-participants-header participants_header'>{{t 'Participants' }}</th>
- <th data-sort="numeric" data-sort-prop="last_msg_id" class="recent-view-last-msg-time-header last_msg_time_header active descend">{{t 'Time' }}</th>
+ <th data-sort="numeric" data-sort-prop="last_msg_id" class="recent-view-last-msg-time-header last_msg_time_header active descend">{{t 'Time' }}
+ <i class="table-sortable-arrow zulip-icon zulip-icon-sort-arrow-down"></i>
+ </th>
</tr>
</thead>
</table>