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.

resize: Increase minimum height for left sidebar blocks.

Aman Agrawal244be5b71b72
diff --git a/static/js/resize.js b/static/js/resize.js
index 250f357a53f..a74375c5856 100644
--- a/static/js/resize.js
+++ b/static/js/resize.js
@@ -36,7 +36,12 @@ function size_blocks(blocks, usable_height) {
for (const block of blocks) {
let ratio = block.real_height / sum_height;
ratio = confine_to_range(0.05, ratio, 0.85);
- block.max_height = confine_to_range(80, usable_height * ratio, 1.2 * block.real_height);
+ const min_block_height = Math.min(250, usable_height / blocks.length, block.real_height);
+ block.max_height = confine_to_range(
+ min_block_height,
+ usable_height * ratio,
+ 1.2 * block.real_height,
+ );
}
}