inbox: Add description to FILTERS dropdown.

This commit is contained in:
Aman Agrawal 2023-11-22 19:13:38 +00:00 committed by Tim Abbott
parent 1e4f938d82
commit 861ac92747
3 changed files with 37 additions and 1 deletions

View File

@ -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,

View File

@ -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;
}

View File

@ -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}}