Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
inbox: Add description to FILTERS dropdown.
Aman Agrawal861ac9274743
diff --git a/web/src/inbox_ui.js b/web/src/inbox_ui.jsindex 67613902818..ad515f3861e 100644--- a/web/src/inbox_ui.js+++ b/web/src/inbox_ui.js@@ -502,6 +502,7 @@ function filters_dropdown_options() {{unique_id: views_util.FILTERS.FOLLOWED_TOPICS,name: $t({defaultMessage: "Followed topics"}),+ description: $t({defaultMessage: "Only topics you follow"}),bold_current_selection:filters_dropdown_widget &&filters_dropdown_widget.current_value === views_util.FILTERS.FOLLOWED_TOPICS,@@ -509,6 +510,7 @@ function filters_dropdown_options() {{unique_id: views_util.FILTERS.UNMUTED_TOPICS,name: $t({defaultMessage: "Standard view"}),+ description: $t({defaultMessage: "All unmuted topics"}),bold_current_selection:filters_dropdown_widget &&filters_dropdown_widget.current_value === views_util.FILTERS.UNMUTED_TOPICS,@@ -516,6 +518,7 @@ function filters_dropdown_options() {{unique_id: views_util.FILTERS.ALL_TOPICS,name: $t({defaultMessage: "All topics"}),+ description: $t({defaultMessage: "Includes muted topics and streams"}),bold_current_selection:filters_dropdown_widget &&filters_dropdown_widget.current_value === views_util.FILTERS.ALL_TOPICS,diff --git a/web/styles/inbox.css b/web/styles/inbox.cssindex 37a93379d48..bf59b97097a 100644--- a/web/styles/inbox.css+++ b/web/styles/inbox.css@@ -565,6 +565,24 @@}.inbox-filter-dropdown-list-container .dropdown-list-wrapper {- width: var(--width-inbox-filters-dropdown);+ width: 100%;min-width: unset;}++.inbox-filter-dropdown-list-container .dropdown-list-item-common-styles {+ padding: 5px 10px;+}++.inbox-filter-dropdown-list-container .dropdown-list-item-name {+ white-space: nowrap;+ font-weight: 500;+ padding: 0;+ margin: 0;+}++.inbox-filter-dropdown-list-container .dropdown-list-item-description {+ white-space: nowrap;+ font-weight: 400;+ opacity: 0.8;+ padding: 0;+}diff --git a/web/templates/dropdown_list.hbs b/web/templates/dropdown_list.hbsindex ac0ae2cae0a..a9bbfb597a3 100644--- a/web/templates/dropdown_list.hbs+++ b/web/templates/dropdown_list.hbs@@ -1,5 +1,19 @@{{#with item}}<li class="list-item" role="presentation" data-unique-id="{{unique_id}}" data-name="{{name}}" tabindex="0">+ {{#if description}}+ <a class="dropdown-list-item-common-styles">+ <span class="dropdown-list-item-name">+ {{#if bold_current_selection}}+ <span class="dropdown-list-bold-selected">{{name}}</span>+ {{else}}+ {{name}}+ {{/if}}+ </span>+ <span class="dropdown-list-item-description">+ {{description}}+ </span>+ </a>+ {{else}}<a class="dropdown-list-item-common-styles">{{#if stream}}{{> inline_decorated_stream_name stream=stream show_colored_icon=true}}@@ -15,5 +29,6 @@{{/if}}{{/if}}</a>+ {{/if}}</li>{{/with}}