Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
banners: Hide empty banner-action-buttons using CSS.
Maneesh Shuklabfdd28c638f8
diff --git a/web/styles/banners.css b/web/styles/banners.cssindex f245e6852c3..1662794fdbc 100644--- a/web/styles/banners.css+++ b/web/styles/banners.css@@ -63,6 +63,10 @@gap: 0.5em; /* 8px at 16px/1em */}+.banner-action-buttons:empty {+ display: none;+}+.banner-close-button {display: flex;grid-area: banner-close-button;diff --git a/web/templates/components/banner.hbs b/web/templates/components/banner.hbsindex e8062fd429e..59d4f40ebce 100644--- a/web/templates/components/banner.hbs+++ b/web/templates/components/banner.hbs@@ -9,6 +9,8 @@</span>{{#if buttons}}<span class="banner-action-buttons">+ {{!-- squash whitespace so :empty selector works when no buttons --}}+ {{~!-- squash whitespace --~}}{{#each buttons}}{{#if this.intent}}{{> action_button .}}@@ -16,6 +18,7 @@{{> action_button . intent=../intent}}{{/if}}{{/each}}+ {{~!-- squash whitespace --~}}</span>{{/if}}</span>