Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
navbar: Consolidate view, channel structures and styles.
Karl Stolley5c23d80db8e8
diff --git a/web/styles/message_view_header.css b/web/styles/message_view_header.cssindex aa7bca42e2a..6ee27242685 100644--- a/web/styles/message_view_header.css+++ b/web/styles/message_view_header.css@@ -21,9 +21,6 @@.message-header-stream-settings-button,.navbar_title {- font-weight: 600;- /* 16px at 14px em */- font-size: 1.1429em;padding: 0 2px 0 6px;overflow: hidden;text-overflow: ellipsis;@@ -38,8 +35,6 @@align-items: baseline;.zulip-icon {- /* 14px at 16px em, inherited from .navbar_title */- font-size: 0.875em;/* Pull the icon out of baseline alignment,and center with stream name. */align-self: center;@@ -74,14 +69,12 @@margin: 0 5px;}}-- .narrow_description {- /* 14px at 16px em, inherited from .navbar_title */- font-size: 0.875em;- }}.message-header-navbar-title {+ font-weight: 600;+ /* 16px at 14px em */+ font-size: 1.1429em;/* Allow long navbar titles (e.g., stream names) to collapse. */flex: 0 1 auto;overflow: hidden;@@ -89,38 +82,30 @@}.narrow_description {- /* the actual value of flex shrink does not matter, it is the- ratio of this value to other flex items that determines the- behavior while shrinking, here the other item has the .stream- class and a flex of 1, so the value here *is* the ratio, and- is chosen such that the narrow description shrinks to close- before the stream name must begin to shrink */- flex-shrink: 100;+ /* Flexbox's baseline alignment is responsible for+ matching the description's baseline to the title.+ Here, normal just ensures a comfortable, i18n-friendly+ line height for the description. */+ line-height: normal;background: none;- /* 14px at 14px em */- font-size: 1em;color: inherit;font-weight: 400;padding-left: 10px;overflow: hidden;text-overflow: ellipsis;+ /* The very last element in the navbar is the search icon, the second+ last element is the narrow description (even if it is empty when a+ channel contains no description). The flex-grow property ensures this+ element takes up the entirety of the white space, while flex-shrink+ accommodates narrower viewports. Setting flex-basis 0 enables an+ ellipsis to be displayed, as the 0 takes the place of the max-content+ default that would otherwise run titles under the search box. */+ flex: 1 1 0;+ margin: 0;.help_link_widget,.fa {margin: 0;}}-- /* The very last element in the navbar is the search icon, the second- last element is either the narrow description (for stream narrows) or- the "title" (for other narrows). The flex-grow property ensures these- elements take up the entirety of the white space, while flex-shrink- accommodates narrower viewports. Setting flex-basis 0 enables an- ellipsis to be displayed, as the 0 takes the place of the max-content- default that would otherwise run titles under the search box. */- .navbar_title,- .narrow_description {- flex: 1 1 0;- margin: 0;- }}diff --git a/web/templates/message_view_header.hbs b/web/templates/message_view_header.hbsindex b08d74da40c..9fe49b991a4 100644--- a/web/templates/message_view_header.hbs+++ b/web/templates/message_view_header.hbs@@ -27,4 +27,13 @@<span class="navbar_title">{{> navbar_icon_and_title }}</span>+{{#if description}}+ <span class="narrow_description rendered_markdown">{{description}}+ {{#if link}}+ <a class="help_link_widget" href="{{link}}" target="_blank" rel="noopener noreferrer">+ <i class="fa fa-question-circle-o" aria-hidden="true"></i>+ </a>+ {{/if}}+ </span>+{{/if}}{{/if}}diff --git a/web/templates/navbar_icon_and_title.hbs b/web/templates/navbar_icon_and_title.hbsindex 48471d9f779..446416cad4e 100644--- a/web/templates/navbar_icon_and_title.hbs+++ b/web/templates/navbar_icon_and_title.hbs@@ -4,12 +4,3 @@<i class="fa fa-{{icon}}" aria-hidden="true"></i>{{/if}}<span class="message-header-navbar-title">{{title}}</span>-{{#if description}}- <span class="narrow_description rendered_markdown">{{description}}- {{#if link}}- <a class="help_link_widget" href="{{link}}" target="_blank" rel="noopener noreferrer">- <i class="fa fa-question-circle-o" aria-hidden="true"></i>- </a>- {{/if}}- </span>-{{/if}}