Skip to content

message: Improve muted sender design.#34794

Merged
timabbott merged 6 commits into
zulip:mainfrom
apoorvapendse:improve-muted-sender-ui
Dec 4, 2025
Merged

message: Improve muted sender design.#34794
timabbott merged 6 commits into
zulip:mainfrom
apoorvapendse:improve-muted-sender-ui

Conversation

@apoorvapendse

@apoorvapendse apoorvapendse commented Jun 2, 2025

Copy link
Copy Markdown
Member

Fixes: #32945.

If the message needs to be hidden because the sender was muted,
we replace the sender's avatar with that of a muted sender
and name them as "Muted sender".

This also introduces a new reveal button to show the message.

We hide the muted message notice on mobile widths.

Discussion: https://chat.zulip.org/#narrow/channel/101-design/topic/muted.20users/near/2185476
Fixes: #32945.

CZO: #design > muted users

Follow-up items

  • Add a "Hide" button when a hidden message is revealed. czo.
  • Make the muted user avatars clickable to get information about the muted user's identity without showing the message itself: message: Improve muted sender design. #34794 (comment)
    - [ ] Figure out pills for muted participants in DMs and group DMs czo

Updated version can be found at #34794 (comment)

Screenshots and screen captures:

light dark
image image

In a mobile breakpoint we can hide the message and just have something like this:

I am doing this with cq_sm_min as the breakpoint for now.

light dark
image image

I hid the reveal label muted sender message notice at the cq_mm_min breakpoint to avoid truncating "Muted user" on small screens and reduce visual clutter.
Feedback welcome.

Device: iPhone 12 Pro (390x844)

Without breakpoint With breakpoint
without_breakpoint_(iPhone 12 Pro) with_breakpoint_iPhone 12 Pro

dark_mode_large_screen
light_mode_large_screen
dark_mode_responsive
light_mode_responsive

Self-review checklist

@apoorvapendse apoorvapendse marked this pull request as draft June 2, 2025 11:55
@apoorvapendse apoorvapendse force-pushed the improve-muted-sender-ui branch 2 times, most recently from 27da778 to 19804a2 Compare June 2, 2025 12:23
@apoorvapendse

Copy link
Copy Markdown
Member Author

@whilstsomebody, can you do a buddy review if you find time?
Thanks.

@apoorvapendse apoorvapendse force-pushed the improve-muted-sender-ui branch from 19804a2 to 48c9f1a Compare June 2, 2025 13:18
@whilstsomebody

Copy link
Copy Markdown
Collaborator

Tag me again when this is ready for a review.

@apoorvapendse apoorvapendse force-pushed the improve-muted-sender-ui branch from 48c9f1a to eaa498b Compare June 3, 2025 06:11
@apoorvapendse

Copy link
Copy Markdown
Member Author

tagging @alya, @terpimost for a design review

@apoorvapendse apoorvapendse force-pushed the improve-muted-sender-ui branch 2 times, most recently from 6a8d7a0 to b38fc49 Compare June 4, 2025 12:05
@chrisbobbe

Copy link
Copy Markdown
Contributor

How about "Muted user" in place of "Muted sender"? That's our plan in mobile; the fact that it's the sender is already communicated by the position of the text. (Thanks @sm-sayedi for mentioning this at zulip/zulip-flutter#1429 (comment) )

@apoorvapendse apoorvapendse force-pushed the improve-muted-sender-ui branch from b38fc49 to 36b317f Compare June 6, 2025 05:36
@apoorvapendse apoorvapendse force-pushed the improve-muted-sender-ui branch from 36b317f to a17f0de Compare June 19, 2025 14:51
Comment thread web/styles/message_row.css Outdated
@apoorvapendse

Copy link
Copy Markdown
Member Author

Updated Screencast and screenshots for this and this suggestion.

image
image

update_muted_sender

@apoorvapendse apoorvapendse marked this pull request as ready for review June 19, 2025 15:26
@apoorvapendse

Copy link
Copy Markdown
Member Author

tagging @whilstsomebody for buddy review.
@zulipbot add "buddy review".

@zulipbot zulipbot added the buddy review GSoC buddy review needed. label Jun 19, 2025

@whilstsomebody whilstsomebody left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments.
Looks good in the manual testiing.

Comment thread web/src/message_list_view.ts Outdated
Comment thread web/styles/message_row.css Outdated
Comment thread web/templates/single_message.hbs Outdated
@@ -1,5 +1,5 @@
<div id="message-row-{{message_list_id}}-{{msg/id}}" data-message-id="{{msg/id}}"
class="message_row{{#unless msg/is_stream}} private-message{{/unless}}{{#if include_sender}} messagebox-includes-sender{{/if}}{{#if mention_classname}} {{mention_classname}}{{/if}}{{#if msg.unread}} unread{{/if}} {{#if msg.locally_echoed}}locally-echoed{{/if}} selectable_row"
class="message_row{{#unless msg/is_stream}} private-message{{/unless}}{{#if include_sender}} messagebox-includes-sender{{/if}}{{#if mention_classname}} {{mention_classname}}{{/if}}{{#if msg.unread}} unread{{/if}} {{#if msg.locally_echoed}}locally-echoed{{/if}} selectable_row {{#if is_hidden}}muted_message_sender{{/if}}"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

muted-message-sender and not muted_message_sender.

@apoorvapendse apoorvapendse force-pushed the improve-muted-sender-ui branch 2 times, most recently from 9dcd249 to f0968e3 Compare June 20, 2025 17:18
@apoorvapendse apoorvapendse changed the title [WIP] message: Improve muted sender design. message: Improve muted sender design. Jun 21, 2025

@whilstsomebody whilstsomebody left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@zulipbot zulipbot removed the buddy review GSoC buddy review needed. label Jun 21, 2025
@apoorvapendse

Copy link
Copy Markdown
Member Author

@zulipbot add "mentor review"

@zulipbot zulipbot added the mentor review GSoC mentor review needed. label Jun 23, 2025
@apoorvapendse

Copy link
Copy Markdown
Member Author

Thanks @whilstsomebody!
@punchagan, @vinitS101 tagging you for mentor review.

@apoorvapendse apoorvapendse force-pushed the improve-muted-sender-ui branch from fed6773 to c03325c Compare November 27, 2025 13:02
@apoorvapendse

apoorvapendse commented Nov 27, 2025

Copy link
Copy Markdown
Member Author

We should have a bit of margin between the text and the button (when hovered).

For this, I introduced a margin-left: 0.1em.
Tagging @karlstolley, in case he has better ideas.

Light, no hover Light, hover
image image

previous version:

Light, no hover Light, hover
image image

@apoorvapendse apoorvapendse force-pushed the improve-muted-sender-ui branch from 8c7f8da to 4f9ae38 Compare November 27, 2025 13:17
@karlstolley

Copy link
Copy Markdown
Contributor

The margin-left approach is probably fine for now.

@alya

alya commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

@karlstolley Any more feedback from your side before this goes to integration review?

@karlstolley

Copy link
Copy Markdown
Contributor

Should we address the state of the UI when viewing a DM conversation with a muted user, either here or as a follow-up? As in main, we're not showing an avatar here. We also have "Muted user" in the left sidebar and sender row, but then the compose box shows the pill and name, plain as day:

muted-user-dm-state

@karlstolley

Copy link
Copy Markdown
Contributor

Left a question about what looks now like some dead CSS. Commit history also needs to be cleaned up and finalized before we can mark this one for integration review.

@apoorvapendse apoorvapendse force-pushed the improve-muted-sender-ui branch from 4f9ae38 to 72418d3 Compare December 4, 2025 01:17
@apoorvapendse

Copy link
Copy Markdown
Member Author

Addressed the comment and updated the commit history.

@apoorvapendse apoorvapendse force-pushed the improve-muted-sender-ui branch from 72418d3 to 8a1d55c Compare December 4, 2025 01:28
@alya

alya commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

The DM part can be a follow-up if it's not a regression in this PR.

@apoorvapendse

apoorvapendse commented Dec 4, 2025

Copy link
Copy Markdown
Member Author

This is how it looks like on my end, I think the pills have to be updated to show the Muted user name and avatar.

screenshot image

Probably worth addressing as a follow-up?

Edit: But wait, what if there are multiple users in these pills, say for a group DM and all are muted, I don't think having multiple pills showing "Muted user" makes sense in that case.

Example: Assume I muted Tim and Alya here image

I imagine this will also require performing multiple clicks to show/hide the users behind these muted user pills, so not sure how useful this pill masking feature might be.

Maybe knowing who the DM participants are but with hidden messages (so you know you muted them) is better UX wise?

@karlstolley

Copy link
Copy Markdown
Contributor

Cool. Yes, let's address the DM issue as a prompt follow up.

@apoorvapendse, probably worth opening a #design discussion about the group DMs case, if a search of CZO doesn't turn up previous discussions of that.

@alya alya added integration review Added by maintainers when a PR may be ready for integration. and removed maintainer review PR is ready for review by Zulip maintainers. labels Dec 4, 2025
@alya

alya commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

@karlstolley I think the PR is ready for integration review, then?

@apoorvapendse

Copy link
Copy Markdown
Member Author

Opened #design > muted user UX for DMs for the follow-up discussion.

@@ -1,6 +1,6 @@
<div class="u-{{msg/sender_id}} message-avatar sender_info_hover view_user_card_tooltip no-select" aria-hidden="true" data-is-bot="{{sender_is_bot}}">
<div class="u-{{msg/sender_id}} message-avatar {{#unless is_hidden}}sender_info_hover view_user_card_tooltip{{/unless}} no-select" aria-hidden="true" data-is-bot="{{sender_is_bot}}">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the tooltip for viewing the user card being disabled here? I feel like it's totally reasonable to want that tooltip to work for muted users, if we're going to show an avatar element.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just removing this conditional seems to not make that work. I think we can change this in a follow-up; added it to the list at the top of the PR.

Comment thread web/templates/message_controls.hbs Outdated
<i role="button" tabindex="0" class="message-controls-icon star zulip-icon {{#if msg/starred}}zulip-icon-star-filled{{else}}zulip-icon-star{{/if}}"></i>
{{/unless}}
</div>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not add a blank line here in this commit.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this myself so we can merge this.

If the message needs to be hidden because the
sender was muted, we replace the sender's avatar
with that of a muted sender and name them as
"Muted sender".

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
This is reworded because we will introduce
a reveal button instead of the "Click here
to reveal" link.

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
We want to avoid showing the hidden message notice
on mobile widths.

Discussion: https://chat.zulip.org/#narrow/channel/101-design/topic/muted.20users/near/2189225
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
We keep the reveal button invisible until hovered.

This mechanism is only followed for devices where
hover is possible, on touchscreens the "Reveal"
button is visible by default.

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
Fixes: zulip#32945.
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
@timabbott timabbott force-pushed the improve-muted-sender-ui branch from 8a1d55c to 290524c Compare December 4, 2025 21:18
@timabbott timabbott merged commit 290524c into zulip:main Dec 4, 2025
5 of 6 checks passed
@timabbott

Copy link
Copy Markdown
Member

Merged with the changes detailed in #34794 (comment), thanks for all the work on this @apoorvapendse and @karlstolley!

@apoorvapendse please consider the two follow-ups to be priorities; it'd be nice if those made it to Zulip Cloud at the same time as this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration review Added by maintainers when a PR may be ready for integration. size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve design of messages by muted sender

9 participants