Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
sidebars: Refactor to remove .default-sidebar-behaviour.
Karl Stolley0ce20fb515a3
diff --git a/web/src/ui_init.js b/web/src/ui_init.jsindex 930dae17a96..263db11539a 100644--- a/web/src/ui_init.js+++ b/web/src/ui_init.js@@ -298,13 +298,6 @@ 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");});diff --git a/web/styles/zulip.css b/web/styles/zulip.cssindex d60b7ab5691..dc649b9c4d8 100644--- a/web/styles/zulip.css+++ b/web/styles/zulip.css@@ -1482,35 +1482,33 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {}@media (width < $xl_min) or (height < $short_navbar_cutoff_height) {- .default-sidebar-behaviour {- &.spectator-view.default-sidebar-behaviour {- #navbar-middle {- /* = (width of button, square with header) * 3 (number of buttons) + 10px extra margin. */- margin-right: calc(var(--header-height) * 3 + 10px);- }+ .spectator-view {+ #navbar-middle {+ /* = (width of button, square with header) * 3 (number of buttons) + 10px extra margin. */+ margin-right: calc(var(--header-height) * 3 + 10px);+ }- #help-menu,- #gear-menu {- position: relative;- right: var(--header-height);- }+ #help-menu,+ #gear-menu {+ position: relative;+ right: var(--header-height);}- &.spectator-view #top_navbar .column-right .spectator_login_buttons {+ #top_navbar .column-right .spectator_login_buttons {display: none;}+ }- .header-main .column-right {- /* For a diminutive right column in the navbar,- allow the width to be that of the flexing- button elements. */- width: auto;- }+ .header-main .column-right {+ /* For a diminutive right column in the navbar,+ allow the width to be that of the flexing+ button elements. */+ width: auto;}}%hide-right-sidebar {- .app-main .column-right {+ .column-right {display: none;&.expanded {@@ -1544,7 +1542,9 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {}.hide-right-sidebar {- @extend %hide-right-sidebar;+ .app-main {+ @extend %hide-right-sidebar;+ }&.fluid_layout_width {#compose-content,@@ -1559,7 +1559,7 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {}%hide-left-sidebar {- .app-main .column-left {+ .column-left {display: none;&.expanded {@@ -1586,7 +1586,9 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {}.hide-left-sidebar {- @extend %hide-left-sidebar;+ .app-main {+ @extend %hide-left-sidebar;+ }&.fluid_layout_width {#compose-content,@@ -1605,23 +1607,23 @@ body:not(.hide-left-sidebar) {}@media (width < $xl_min) {- .default-sidebar-behaviour {+ .app-main {@extend %hide-right-sidebar;+ }- .app-main .column-middle {- margin-right: 7px;- }+ .app-main .column-middle {+ margin-right: 7px;+ }- #navbar-middle {- /* = (width of button, square with header) * 4 (number of buttons) + 3px extra margin. */- margin-right: calc(var(--header-height) * 4 + 3px);- }+ #navbar-middle {+ /* = (width of button, square with header) * 4 (number of buttons) + 3px extra margin. */+ margin-right: calc(var(--header-height) * 4 + 3px);+ }- #typing_notifications,- #scheduled_message_indicator,- #compose-content {- margin-right: 7px;- }+ #typing_notifications,+ #scheduled_message_indicator,+ #compose-content {+ margin-right: 7px;}.hide-left-sidebar {@@ -1649,46 +1651,46 @@ body:not(.hide-left-sidebar) {}@media (width < $md_min) {- .default-sidebar-behaviour {+ .app-main {@extend %hide-left-sidebar;+ }- .header-main .column-left {- display: none;- }+ .header-main .column-left {+ display: none;+ }- .app-main .column-middle {- margin-left: 7px;- margin-right: 7px;- }+ .app-main .column-middle {+ margin-left: 7px;+ margin-right: 7px;+ }- #navbar-middle {- margin-left: 0;- }+ #navbar-middle {+ margin-left: 0;+ }- .app-main .column-middle .column-middle-inner {- margin-left: 0;- margin-right: 0;- }+ .app-main .column-middle .column-middle-inner {+ margin-left: 0;+ margin-right: 0;+ }- #streamlist-toggle {- display: block;- }+ #streamlist-toggle {+ display: block;+ }- .top-navbar-container {- margin-left: 40px;- }+ .top-navbar-container {+ margin-left: 40px;+ }- #feedback_container {- width: calc(90% - 30px);- left: 5%;- top: 5%;- }+ #feedback_container {+ width: calc(90% - 30px);+ left: 5%;+ top: 5%;+ }- #typing_notifications,- #scheduled_message_indicator,- #compose-content {- margin-left: 7px;- }+ #typing_notifications,+ #scheduled_message_indicator,+ #compose-content {+ margin-left: 7px;}}