Skip to content

content: Highlight non-silent mentions of the self-user #647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
chrisbobbe opened this issue May 7, 2024 · 4 comments
Open

content: Highlight non-silent mentions of the self-user #647

chrisbobbe opened this issue May 7, 2024 · 4 comments
Labels
a-content Parsing and rendering Zulip HTML content, notably message contents a-design Visual and UX design a-msglist The message-list screen, except what's label:a-content

Comments

@chrisbobbe
Copy link
Collaborator

chrisbobbe commented May 7, 2024

This probably makes sense to do after #646.

We should highlight non-silent mentions of the self-user, following web, so that users can easily see when a mention is intended to get their attention.

For some examples (and here I'm logged in as the "Chris Bobbe" account):

image image

Notice the highlighting is done in two ways:

  • The text of the mention itself is styled
  • The whole message gets an interesting background color

Implementation

To determine if the self-user is mentioned, we'll use the corresponding per-user flags on the message. Any of the "mentioned" flags here (some of which are to be added by #894):
https://zulip.com/api/update-message-flags#available-flags
mean that the self-user was mentioned.

That's enough to know we should highlight the message. Then to highlight the mention within the message, if one or more of those flags is set we'll search the message content to find the corresponding mentions.

@chrisbobbe chrisbobbe added the a-content Parsing and rendering Zulip HTML content, notably message contents label May 7, 2024
@chrisbobbe
Copy link
Collaborator Author

(Should we add this to #309?)

@gnprice gnprice added a-msglist The message-list screen, except what's label:a-content a-design Visual and UX design labels May 8, 2024
@gnprice
Copy link
Member

gnprice commented May 8, 2024

Thanks. Yeah, like #646, this is part of #157.

I think rather than add to #309, we can just rely on the a-content label and the milestones.

@alya
Copy link
Collaborator

alya commented May 15, 2024

In case it's helpful, note the unsubscribed channel edge case: zulip/zulip#27765.

@chrisbobbe
Copy link
Collaborator Author

The web app also colors the background of the message's corresponding date separator (if any):

image

We should probably follow web.

gnprice added a commit to gnprice/zulip-flutter that referenced this issue Nov 25, 2024
This should further help make space for adding more logic here,
both for the "channel-wildcard-mention" class (zulip#1064) and for
distinguishing different types of mentions (zulip#646, zulip#647).
gnprice added a commit to gnprice/zulip-flutter that referenced this issue Dec 3, 2024
This should further help make space for adding more logic here,
both for the "channel-wildcard-mention" class (zulip#1064) and for
distinguishing different types of mentions (zulip#646, zulip#647).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-content Parsing and rendering Zulip HTML content, notably message contents a-design Visual and UX design a-msglist The message-list screen, except what's label:a-content
Projects
Status: No status
Development

No branches or pull requests

3 participants