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.

left_sidebar: Rewrite `back to channels` to use css grid.

Shubham Padia847ff6ee214f
diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.css
index 79547dc9df2..60b781f2a9d 100644
--- a/web/styles/left_sidebar.css
+++ b/web/styles/left_sidebar.css
@@ -711,6 +711,7 @@ li.top_left_scheduled_messages {
/* New .topic-box grid definitions here. */
#views-label-container,
+.zoom-in #hide-more-direct-messages,
.top_left_row,
.left-sidebar-navigation-label-container,
.dm-box,
@@ -1396,29 +1397,21 @@ li.topic-list-item {
}
#hide-more-direct-messages {
- display: block;
+ grid-template-columns: inherit;
+ grid-column: 1 / -1;
+ line-height: var(--line-height-sidebar-row);
text-decoration: none;
color: inherit;
/* 12px at 14px/1em */
- font-size: 0.8571em;
- & span {
- display: block;
- /* TODO: Rewrite the show-more and show-less
- buttons as grids alongside the left sidebar
- header rewrites. The 12px left padding here
- aligns the "back to channels" text with the
- DIRECT MESSAGES heading above, which itself
- is offset -3 px to the left, but reserves
- 15px for the arrow marker. 15px - 3px = 12px. */
- padding: 2px 0 2px 12px;
+ .hide-more-direct-messages-text {
+ font-size: 0.8571em;
+ grid-area: row-content;
}
&:hover {
- & span {
- background-color: hsl(120deg 12.3% 71.4% / 38%);
- border-radius: 4px;
- }
+ background-color: hsl(120deg 12.3% 71.4% / 38%);
+ border-radius: 4px;
}
}
diff --git a/web/templates/left_sidebar.hbs b/web/templates/left_sidebar.hbs
index 4414c34f3a1..0e6852de68f 100644
--- a/web/templates/left_sidebar.hbs
+++ b/web/templates/left_sidebar.hbs
@@ -154,11 +154,11 @@
</a>
<span class="unread_count"></span>
</div>
+ <a class="zoom-out-hide" id="hide-more-direct-messages">
+ <span class="hide-more-direct-messages-text"> {{t 'back to channels' }}</span>
+ </a>
</div>
</div>
- <a class="zoom-out-hide" id="hide-more-direct-messages">
- <span> {{t 'back to channels' }}</span>
- </a>
</div>
{{~!-- squash whitespace --~}}
<div id="left_sidebar_scroll_container" class="scrolling_list" data-simplebar data-simplebar-tab-index="-1">