Skip to content

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

Open
@chrisbobbe

Description

@chrisbobbe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-contentParsing and rendering Zulip HTML content, notably message contentsa-designVisual and UX designa-msglistThe message-list screen, except what's label:a-content

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions