"You've notified but they can't see" message pops up too soon

סיכום מבוסס בינה מלאכותית

The discussion addresses a bug where Discourse incorrectly warns users that a mentioned person cannot see a topic in a restricted category, often triggered prematurely by the autocomplete feature. barryvan notes the warning appears too early, even during partial mentions like @christine, due to the autocomplete popup. sam suggests delaying the warning until a terminating character (like punctuation or whitespace) is entered, but this fails if a user intends to leave a trailing @ mention. An alternative fix involves bypassing the check when autocomplete is active or was shown recently. barryvan proposes using a newline as a terminating character, though this doesn’t solve trailing mentions. codinghorror seeks input from @cpradio, and sam confirms the issue is fixed with a 2-second delay.

When replying to a topic in a restricted category, Discourse (very intelligently) shows you a warning if you @-mention someone who won’t be able to see the topic. It does, however, seem to be a little eager in doing so. For example, if you type @christine, it’ll warn you that she can’t participate – even if you’re just about to finish typing @christinejones, who can.

I think this is tied to the autocomplete popup appearing – the warning banner appears at roughly the same time.

One way to fix this would be to not show this warning until you enter a terminating character – a piece of punctuation or whitespace.

6 לייקים

Yeah possibly, I have run into this as well. Any suggestions @cpradio?

3 לייקים

Agree, this happens to me regularly.

The simple fix fails though cause it would not show the warning when I type @barryvan

Maybe simplest is to bypass the check when “autocomplete” is open OR “autocomplete” was displayed in last 2 seconds.

3 לייקים

Could a newline not be considered a terminating character? Although that still wouldn’t resolve people leaving trailing @-mentions at the end of posts. (Although you could argue that such people are truly, truly awful :squinting_face_with_tongue:!)

The autocomplete fix sounds like it could work well, but I imagine it’d be a bit more complex under the hood.

3 לייקים

I believe you fixed this @sam?

לייק 1

Yes this is fixed, there is a 2 second delay

4 לייקים

This topic was automatically closed after 6 days. New replies are no longer allowed.