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.

right_sidebar: Show underline on user-toggle icon when sidebar visisble.

Aman Agrawal9515dd45ee52
diff --git a/web/src/sidebar_ui.ts b/web/src/sidebar_ui.ts
index 46535f85084..e40408954dd 100644
--- a/web/src/sidebar_ui.ts
+++ b/web/src/sidebar_ui.ts
@@ -19,11 +19,14 @@ export let right_sidebar_expanded_as_overlay = false;
export function hide_userlist_sidebar(): void {
$(".app-main .column-right").removeClass("expanded");
+ $("body").removeClass("right-sidebar-expanded");
right_sidebar_expanded_as_overlay = false;
}
export function show_userlist_sidebar(): void {
+ // TODO: Refactor to only use class added to body.
$(".app-main .column-right").addClass("expanded");
+ $("body").addClass("right-sidebar-expanded");
resize.resize_page_components();
right_sidebar_expanded_as_overlay = true;
}
diff --git a/web/styles/right_sidebar.css b/web/styles/right_sidebar.css
index 52179b0ecb4..35ba45fae0f 100644
--- a/web/styles/right_sidebar.css
+++ b/web/styles/right_sidebar.css
@@ -292,8 +292,6 @@ $user_status_emoji_width: 24px;
}
#userlist-toggle-button {
- /* Same color as icon but a bit darker. */
- box-shadow: inset 0 -2px 0 hsl(241.36deg 27.48% 37.73%);
text-decoration: none;
color: hsl(0deg 0% 60%);
@@ -302,6 +300,13 @@ $user_status_emoji_width: 24px;
}
}
+/* This makes a play on specificity for displaying box-shadow. */
+#userlist-toggle-button,
+body.right-sidebar-expanded #userlist-toggle-button {
+ /* Same color as icon but a bit darker. */
+ box-shadow: inset 0 -2px 0 hsl(241.36deg 27.48% 37.73%);
+}
+
.right-sidebar-items:first-of-type #userlist-header {
border-top: none;
}