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: Show PM section in topics zoomed view.

Aman Agrawal46967002ddd0
diff --git a/static/js/pm_list.js b/static/js/pm_list.js
index d99900ac474..4a07db88749 100644
--- a/static/js/pm_list.js
+++ b/static/js/pm_list.js
@@ -4,6 +4,7 @@ import _ from "lodash";
import * as pm_list_data from "./pm_list_data";
import * as pm_list_dom from "./pm_list_dom";
import * as resize from "./resize";
+import * as topic_zoom from "./topic_zoom";
import * as ui from "./ui";
import * as ui_util from "./ui_util";
import * as vdom from "./vdom";
@@ -161,6 +162,9 @@ export function toggle_private_messages_section() {
function zoom_in() {
zoomed = true;
+ if (topic_zoom.is_zoomed_in()) {
+ topic_zoom.zoom_out();
+ }
update_private_messages();
$(".private_messages_container").removeClass("zoom-out").addClass("zoom-in");
$("#streams_list").hide();
diff --git a/static/js/stream_list.js b/static/js/stream_list.js
index 08c0812536f..711b8cab27c 100644
--- a/static/js/stream_list.js
+++ b/static/js/stream_list.js
@@ -274,16 +274,9 @@ export function zoom_in_topics(options) {
$elt.hide();
}
});
-
- // we also need to hide the PM section and allow
- // stream list to take complete left-sidebar in zoomedIn view.
- $(".private_messages_container").hide();
}
export function zoom_out_topics() {
- // Show PM section
- $(".private_messages_container").show();
-
// Show stream list titles and pinned stream splitter
$(".stream-filters-label").each(function () {
$(this).show();
diff --git a/static/styles/left_sidebar.css b/static/styles/left_sidebar.css
index 3cdebedb142..0f498265412 100644
--- a/static/styles/left_sidebar.css
+++ b/static/styles/left_sidebar.css
@@ -133,7 +133,7 @@ li.show-more-topics {
&.filter-topics {
padding-bottom: 0;
position: sticky;
- top: 43px;
+ top: calc($sections_vertical_gutter + 43px);
z-index: 2;
background-color: hsl(0, 0%, 100%);
}
@@ -621,6 +621,7 @@ li.topic-list-item {
background-color: hsl(0, 0%, 100%);
z-index: 2;
margin-right: 10px;
+ padding-top: $sections_vertical_gutter;
color: hsl(0, 0%, 43%);
.show-all-streams {
@@ -714,7 +715,7 @@ li.topic-list-item {
.zoom-in {
.narrow-filter > .bottom_left_row {
position: sticky;
- top: 20px;
+ top: calc($sections_vertical_gutter + 20px);
z-index: 2;
padding-bottom: 1px;
background-color: hsl(0, 0%, 100%);