topic_popover: Add a 'Default' option and Show 'Unmute' conditionally.
The 'Unmute' option is available in not-muted streams only when it is the current value. Add a 'Default' option. Available in both muted and not-muted streams. 'Default' corresponds to the 'INHERIT' visibility policy. Summary: * In muted streams: Four options: Mute, Default, Unmute, and Follow. * In not-muted streams: Three options: Mute, Default, and Follow. The fourth option, 'Unmute' is available only when it is the current value. Reason for conditional availability of 'Unmute' option: In a not-muted stream, 'Unmute' has no special significance. We only show 'Default' because both 'Default' and 'Unmute' has the same behaviour in the not-muted stream. This avoids the big design downside of showing this fourth nearly-identical option to users who are just in the normal default state of a normal topic within a normal stream We only show the 'Unmute' option in the not-muted stream to users. if they have followed a sequence of steps that led them to 'Unmute' state in a not-muted stream. For example: Mute a stream > Unmute a topic > Unmute the stream By doing so, we avoid destroying information. The user, when mutes the stream again, the topic will retain the 'Unmute' state. New icons for Mute, Default, Unmute, and Follow.
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 582 B After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 4.5 KiB |
|
@ -14,9 +14,14 @@
|
|||
<div class="tab-option tippy-zulip-tooltip {{#if (eq visibility_policy all_visibility_policies.MUTED)}}selected-tab{{/if}}" data-visibility-policy="{{all_visibility_policies.MUTED}}" data-tippy-content="{{t 'Mute' }}" aria-label="{{t 'Mute' }}">
|
||||
<i class="zulip-icon zulip-icon-mute-new"></i>
|
||||
</div>
|
||||
<div class="tab-option tippy-zulip-tooltip {{#if (eq visibility_policy all_visibility_policies.INHERIT)}}selected-tab{{/if}}" data-visibility-policy="{{all_visibility_policies.INHERIT}}" data-tippy-content="{{t 'Default' }}" aria-label="{{t 'Default' }}">
|
||||
<i class="zulip-icon zulip-icon-inherit"></i>
|
||||
</div>
|
||||
{{#if (or stream_muted topic_unmuted)}}
|
||||
<div class="tab-option tippy-zulip-tooltip {{#if (eq visibility_policy all_visibility_policies.UNMUTED)}}selected-tab{{/if}}" data-visibility-policy="{{all_visibility_policies.UNMUTED}}" data-tippy-content="{{t 'Unmute' }}" aria-label="{{t 'Unmute' }}">
|
||||
<i class="zulip-icon zulip-icon-unmute-new"></i>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="tab-option tippy-zulip-tooltip {{#if (eq visibility_policy all_visibility_policies.FOLLOWED)}}selected-tab{{/if}}" data-visibility-policy="{{all_visibility_policies.FOLLOWED}}" data-tippy-content="{{t 'Follow' }}" aria-label="{{t 'Follow' }}">
|
||||
<i class="zulip-icon zulip-icon-follow"></i>
|
||||
</div>
|
||||
|
|