Skip to content
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

New channel wildcard mentions are rendered as "unimplemented" #1064

Open
sm-sayedi opened this issue Nov 18, 2024 · 6 comments · May be fixed by #1073
Open

New channel wildcard mentions are rendered as "unimplemented" #1064

sm-sayedi opened this issue Nov 18, 2024 · 6 comments · May be fixed by #1073
Assignees
Labels
a-content Parsing and rendering Zulip HTML content, notably message contents

Comments

@sm-sayedi
Copy link
Collaborator

While working on #889, I realized that the channel wildcard mentions (@all, @everyone, @channel, @stream) are rendered as "unimplemented". This behavior is only for newer messages (after #31075 is merged in zulip), the older messages with these wildcard mentions are rendered correctly. This is how the HTML text for older and newer messages looks like:

// older messages
<span class="user-mention" data-user-id="*">@all</span>

// newer messages
<span class="user-mention channel-wildcard-mention" data-user-id="*">@all</span>

There seems to have been an additional class (channel-wildcard-mention) added. So, I think we have to support both the previous format and the current one.

@PIG208 PIG208 added the a-content Parsing and rendering Zulip HTML content, notably message contents label Nov 18, 2024
@gnprice
Copy link
Member

gnprice commented Nov 20, 2024

Hmm! Interesting, thanks for the report.

Can you link to an example message with this format? Or is it not currently possible to generate on chat.zulip.org for some reason?

Using the survey tool from #190, I don't see any examples of this in public messages on chat.zulip.org. See e.g. the output copied in the description of #921.

@gnprice gnprice added this to the Beta 4: Fall 2024 milestone Nov 20, 2024
@sm-sayedi
Copy link
Collaborator Author

I couldn't find any such message on chat.zulip.org and because I don't have permission to use @all and similar mentions, I couldn't generate one too. I spotted this in my own organization which I use for test purposes.

Using the survey tool from #190, I don't see any examples of this in public messages on chat.zulip.org.

I am not sure, but maybe that's because there are no new messages with such mentions.

Here are the screenshots (of my organization) both from the web and mobile:

Web

image

Mobile

@gnprice
Copy link
Member

gnprice commented Nov 20, 2024

Aha, that'd do it. Yeah, we have this permission set:
image

Who can notify a large number of users with a wildcard mention (i)
Admins and moderators

so in most channels, nobody can use @-all and the like except admins and moderators, and I guess in practice we never do.

@rajveermalviya would you put this issue on your queue? Looks like probably a small one.

For making an example message to point to in the test, you can send to an ad-hoc testing channel with few users — see the help page linked in the quote above.

It seems like this was an earlier case of the same process failure that caused #1046 to arise suddenly a couple of weeks ago. But this one was back in August, before that discussion.

@sm-sayedi
Copy link
Collaborator Author

@gnprice Can I work on this one? I also plan to work on #892 first and then return to #889 so that all the related mentions are parsed correctly!

@sm-sayedi
Copy link
Collaborator Author

By the way, here's the link to a CZO message with channel wildcard mentions:
https://chat.zulip.org/#narrow/channel/497-my-test/topic/channel.20wildcard.20mentions/near/1984716

@gnprice
Copy link
Member

gnprice commented Nov 20, 2024

Sure! Please go ahead.

sm-sayedi added a commit to sm-sayedi/zulip-flutter that referenced this issue Nov 22, 2024
For channel wildcard mentions, the class in the corresponding HTML used
to be the same as the user mentions (class="user-mention"), but now
there's an additional class added. Now it looks like the following:
class="user-mention channel-wildcard-mention".

Fixes: zulip#1064
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
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants