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.

ui_init: Add a class to `body` to specify the current sidebar state.

Aman Agrawal803092f9f028
diff --git a/web/src/ui_init.js b/web/src/ui_init.js
index 6f15a18496e..3cb3d42a700 100644
--- a/web/src/ui_init.js
+++ b/web/src/ui_init.js
@@ -279,6 +279,13 @@ export function initialize_kitchen_sink_stuff() {
$("body").addClass("more_dense_mode");
}
+ // To keep the specificity same for the CSS related to hiding the
+ // sidebars, we add the class to the body which is then later replaced
+ // by the class to hide right / left sidebar. We can take our time to do
+ // this since we are still showing the loading indicator screen and
+ // the rendered sidebars hasn't been displayed to the user yet.
+ $("body").addClass("default-sidebar-behaviour");
+
$(window).on("blur", () => {
$(document.body).addClass("window_blurred");
});