From 71244f4a9409e3c69f63e746633c883380f46d5d Mon Sep 17 00:00:00 2001 From: Prakhar Pratyush Date: Thu, 10 Aug 2023 13:34:26 +0530 Subject: [PATCH] topic_popover: Add a 'Default' option and Show 'Unmute' conditionally. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- web/shared/icons/follow.svg | Bin 628 -> 2540 bytes web/shared/icons/inherit.svg | Bin 0 -> 2109 bytes web/shared/icons/mute-new.svg | Bin 582 -> 2350 bytes web/shared/icons/unmute-new.svg | Bin 499 -> 4604 bytes web/templates/topic_sidebar_actions.hbs | 9 +++++++-- 5 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 web/shared/icons/inherit.svg diff --git a/web/shared/icons/follow.svg b/web/shared/icons/follow.svg index 208151efcb6cf96995b7535d8053a3aa162b8f48..17c368f92aead56976ca2b7e52f94fe5b80860f0 100644 GIT binary patch literal 2540 zcmb`J!E%*142Ac7ihu4NN0Kec?hqEeTX+F>6jG9D8W>0kkKa$ebOt(Ib;^bu|FSF} z9Ub52pTE36p6=c~-d>+HPRH%d-TT`|{?60!cz4ANLQRuTQs+j~{=&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4a458444b3..e00e2a44c9 100644 --- a/web/templates/topic_sidebar_actions.hbs +++ b/web/templates/topic_sidebar_actions.hbs @@ -14,9 +14,14 @@
-
- +
+
+ {{#if (or stream_muted topic_unmuted)}} +
+ +
+ {{/if}}