left_sidebar: Show PM section in topics zoomed view.

This is important to preserve the invariant that the unread count for
private messages is always visible.

Fixes #23391.
This commit is contained in:
Aman Agrawal
2022-11-02 04:16:11 +00:00
committed by Tim Abbott
parent 1b304c5296
commit 46967002dd
3 changed files with 7 additions and 9 deletions

View File

@@ -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();

View File

@@ -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();

View File

@@ -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%);