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: Change icon.

Aman Agrawal6fc9762f5ddc
diff --git a/help/left-sidebar.md b/help/left-sidebar.md
index 32d7aa6a401..e856db59ebd 100644
--- a/help/left-sidebar.md
+++ b/help/left-sidebar.md
@@ -75,13 +75,23 @@ information you need in the moment.
{end_tabs}
-### Hide or show the left sidebar
+### Show the left sidebar
{start_tabs}
{tab|desktop-web}
-1. Above the left sidebar, click the <i class="fa fa-reorder"></i> icon.
+1. At the top left corner, click the <i class="zulip-icon zulip-icon-panel-left"></i> icon.
+
+{end_tabs}
+
+### Hide the left sidebar
+
+{start_tabs}
+
+{tab|desktop-web}
+
+1. At the top left corner, click the <i class="zulip-icon zulip-icon-panel-left-dashed"></i> icon.
{end_tabs}
diff --git a/web/shared/icons/panel-left-dashed.svg b/web/shared/icons/panel-left-dashed.svg
new file mode 100644
index 00000000000..d7fcb51c70a
--- /dev/null
+++ b/web/shared/icons/panel-left-dashed.svg
@@ -0,0 +1,3 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M3.33333 2.66502C2.96422 2.66502 2.665 2.96425 2.665 3.33336V12.6667C2.665 13.0358 2.96422 13.335 3.33333 13.335H5.335V12.6667C5.335 12.2994 5.63273 12.0017 6 12.0017C6.36727 12.0017 6.665 12.2994 6.665 12.6667V13.335H12.6667C13.0358 13.335 13.335 13.0358 13.335 12.6667V3.33336C13.335 2.96424 13.0358 2.66502 12.6667 2.66502H6.665V3.33336C6.665 3.70062 6.36727 3.99836 6 3.99836C5.63273 3.99836 5.335 3.70062 5.335 3.33336V2.66502H3.33333ZM3.33333 1.33502H12.6667C13.7703 1.33502 14.665 2.22971 14.665 3.33336V12.6667C14.665 13.7703 13.7703 14.665 12.6667 14.665H3.33333C2.22968 14.665 1.335 13.7703 1.335 12.6667V3.33336C1.335 2.22971 2.22968 1.33502 3.33333 1.33502ZM6 5.33502C6.36727 5.33502 6.665 5.63275 6.665 6.00002V6.66669C6.665 7.03396 6.36727 7.33169 6 7.33169C5.63273 7.33169 5.335 7.03396 5.335 6.66669V6.00002C5.335 5.63275 5.63273 5.33502 6 5.33502ZM6 8.66835C6.36727 8.66835 6.665 8.96609 6.665 9.33335V10C6.665 10.3673 6.36727 10.665 6 10.665C5.63273 10.665 5.335 10.3673 5.335 10V9.33335C5.335 8.96609 5.63273 8.66835 6 8.66835Z" fill="black"/>
+</svg>
diff --git a/web/shared/icons/panel-left.svg b/web/shared/icons/panel-left.svg
new file mode 100644
index 00000000000..f57fd853884
--- /dev/null
+++ b/web/shared/icons/panel-left.svg
@@ -0,0 +1,3 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M3.33333 2.66502C2.96422 2.66502 2.665 2.96425 2.665 3.33336V12.6667C2.665 13.0358 2.96422 13.335 3.33333 13.335H5.335V2.66502H3.33333ZM3.33333 1.33502H12.6667C13.7703 1.33502 14.665 2.22971 14.665 3.33336V12.6667C14.665 13.7703 13.7703 14.665 12.6667 14.665H3.33333C2.22968 14.665 1.335 13.7703 1.335 12.6667V3.33336C1.335 2.22971 2.22968 1.33502 3.33333 1.33502ZM6.665 2.66502V13.335H12.6667C13.0358 13.335 13.335 13.0358 13.335 12.6667V3.33336C13.335 2.96424 13.0358 2.66502 12.6667 2.66502H6.665Z" fill="black"/>
+</svg>
diff --git a/web/src/sidebar_ui.ts b/web/src/sidebar_ui.ts
index bca270e50de..dfd23be05f0 100644
--- a/web/src/sidebar_ui.ts
+++ b/web/src/sidebar_ui.ts
@@ -69,7 +69,8 @@ export function show_userlist_sidebar(): void {
}
export function show_streamlist_sidebar(): void {
- $(".app-main .column-left").addClass("expanded");
+ // Left sidebar toggle icon is attached to middle column.
+ $(".app-main .column-left, #navbar-middle").addClass("expanded");
resize.resize_stream_filters_container();
left_sidebar_expanded_as_overlay = true;
}
@@ -90,7 +91,7 @@ export function show_left_sidebar(): void {
}
export function hide_streamlist_sidebar(): void {
- $(".app-main .column-left").removeClass("expanded");
+ $(".app-main .column-left, #navbar-middle").removeClass("expanded");
left_sidebar_expanded_as_overlay = false;
}
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index 1e796100bb5..7531f2db6cf 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -1526,7 +1526,29 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {
visibility: hidden;
}
+.left-sidebar-toggle-button .zulip-icon-panel-left {
+ display: none;
+}
+
+.column-middle.expanded {
+ .left-sidebar-toggle-button .zulip-icon-panel-left {
+ display: none;
+ }
+
+ .left-sidebar-toggle-button .zulip-icon-panel-left-dashed {
+ display: block;
+ }
+}
+
%hide-left-sidebar {
+ .left-sidebar-toggle-button .zulip-icon-panel-left {
+ display: block;
+ }
+
+ .left-sidebar-toggle-button .zulip-icon-panel-left-dashed {
+ display: none;
+ }
+
.column-left {
display: none;
@@ -2001,6 +2023,13 @@ body:not(.hide-left-sidebar) {
}
}
+.left-sidebar-toggle-button {
+ .zulip-icon-panel-left,
+ .zulip-icon-panel-left-dashed {
+ font-size: 1.25em; /* 20px at 16px em */
+ }
+}
+
#personal-menu {
.header-button-avatar {
width: 1.5em; /* 24px at 16px em */
diff --git a/web/templates/navbar.hbs b/web/templates/navbar.hbs
index 9c965fb8129..c6aedb05068 100644
--- a/web/templates/navbar.hbs
+++ b/web/templates/navbar.hbs
@@ -1,8 +1,9 @@
<div class="header">
<nav class="header-main" id="top_navbar">
<div class="column-left">
- <a class="left-sidebar-toggle-button {{#if embedded}}hide-streamlist-toggle-visibility{{/if}}" tabindex="0" role="button">
- <i class="fa fa-reorder" aria-hidden="true"></i>
+ <a class="header-button left-sidebar-toggle-button {{#if embedded}}hide-streamlist-toggle-visibility{{/if}}" tabindex="0" role="button">
+ <i class="zulip-icon zulip-icon-panel-left-dashed"></i>
+ <i class="zulip-icon zulip-icon-panel-left"></i>
<span class="left-sidebar-toggle-unreadcount">0</span>
</a>
<a href="" class="brand no-style">
@@ -13,7 +14,9 @@
<div class="column-middle" id="navbar-middle">
<div class="column-middle-inner">
<div id="streamlist-toggle" class="tippy-zulip-delayed-tooltip {{#if embedded}}hide-streamlist-toggle-visibility{{/if}}" data-tooltip-template-id="show-left-sidebar-tooltip-template">
- <a class="left-sidebar-toggle-button" role="button" tabindex="0"><i class="fa fa-reorder" aria-hidden="true"></i>
+ <a class="left-sidebar-toggle-button" role="button" tabindex="0">
+ <i class="zulip-icon zulip-icon-panel-left-dashed"></i>
+ <i class="zulip-icon zulip-icon-panel-left"></i>
<span class="left-sidebar-toggle-unreadcount">0</span>
</a>
</div>