Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
css: Use a variable to track bottom_whitespace height.
Aman Agrawal086db7621ca7
diff --git a/web/src/resize.js b/web/src/resize.jsindex 62c718c8339..c6b568505ba 100644--- a/web/src/resize.js+++ b/web/src/resize.js@@ -120,7 +120,7 @@ export function reset_compose_message_max_height(bottom_whitespace_height) {export function resize_bottom_whitespace() {const bottom_whitespace_height = get_bottom_whitespace_height();- $("#bottom_whitespace").height(bottom_whitespace_height);+ $("html").css("--max-unexpanded-compose-height", `${bottom_whitespace_height}px`);// The height of the compose box is tied to that of// bottom_whitespace, so update it if necessary.//diff --git a/web/styles/recent_topics.css b/web/styles/recent_topics.cssindex 7c45f23662f..6c70f012c6f 100644--- a/web/styles/recent_topics.css+++ b/web/styles/recent_topics.css@@ -91,7 +91,7 @@expensive repaint. The downside of not doing so is that the scrollbar is not visible to user whenuser is at the bottom of scroll container when the compose box is open.*/- margin-bottom: 40vh;+ margin-bottom: var(--max-unexpanded-compose-height);}#recent_topics_filter_buttons {diff --git a/web/styles/zulip.css b/web/styles/zulip.cssindex c47be13a81b..0e390b70bf7 100644--- a/web/styles/zulip.css+++ b/web/styles/zulip.css@@ -118,6 +118,14 @@ body {We expect `resize.js` to update this once UI is initialized. */--recent-topics-filters-height: 50px;+ /*+ Maximum height of the compose box when it is not in expanded state. This+ is equal to the height of `#bottom_whitespace`. We expect resize.js to+ replace it with its pixel calculation since even if `vh` has great support,+ it can change depending on browser / OS on mobile devices.+ */+ --max-unexpanded-compose-height: 40vh;+/* Colors used across the app */--color-background-private-message-header: hsl(46deg 35% 93%);--color-background-private-message-content: hsl(45deg 20% 96%);@@ -2346,7 +2354,7 @@ nav {#bottom_whitespace {display: block;- height: 300px;+ height: var(--max-unexpanded-compose-height);}.operator_value {