Username mentions in comments now send notifications
Another feature update courtesy of open-source contributors - @Celeo was brave and took this complex update on as a first contribution to the Tildes code.
Mentioning a username in a comment will now send them a notification. Any of the following formats work:
It won't send a notification if you mention yourself, or if you mention someone that already would have gotten a notification for the comment anyway (the author of the parent topic/comment).
Edits should be handled as well, so if you edit in a mention that wasn't there previously it will generate the notification at that point, and if you edit one out it will delete that notification (whether the user has seen it yet or not).
Please let me know if you notice any issues or strange behavior (and please don't use this maliciously to annoy people).
Super welcome. It was a really fun project to work on, and I'm glad Deimos and I got it done.
Indeed, great job @Celeo! It's really amazing to see users contributing so much already and makes me incredibly optimistic for the future of the site.
Though now everyone is definitely going to have to be far more cognizant of when they use the @ before a username, since not every reference to another user is necessarily intended to be a notification. I suspect Deimos' poor notification box is going to explode if people don't remember that. ;)
Yeah. For some reason I was thinking about user notifications this morning, even before I came on to Tildes, and I thought that if Tildes ever turned on user notifications, poor Deimos' inbox would be flooded.
Is there a limit on the number of users who can be notified in a single comment?
Not currently. I'll probably add some sort of limit, but overall my inclination is to punish people that misuse tools instead of hurting their functionality for everyone.
https://gitlab.com/tildes/tildes/commit/420ea5a15bb3fe80639aa8df599a7367590f10ad
There's code here which probably will reveal the limit, if any.
Edit: I don't see one.
Only in comments for now. It shouldn't be too difficult to make it work in topics as well, but that'll take some more work to be supported. I'll add an issue for it though.
Only in comments, yup.
Here I am wishing I could be contributing, but am stuck focusing on work and university instead. Really really good job everyone.
Brilliant Celeo!
I waited so much to contribute but the full stack python is holding me back :(
Is there a preferred "official" Tildes format for username mentions? Most platforms choose just one format.
Using
@
would definitely be the "recommended" method, the/u/
support is mostly just for all the people accustomed to it from reddit that do it out of habit.I seem to remember you writing, somewhere in the deep dark past, that copying habits from other sites such as Reddit just because that's the way people are used to doing things is not the way Tildes would work. :P
It would be nice if the notifications of username mentions were differentiated from the notifications of comment replies - like messages are differentiated. At the moment, mentions and replies are all shown in one combined list as "X comments".
I think it could be useful to modify the behavior slightly:
@Tau_Zero
- A mention, triggers notification and replaced with link to user profile (as it does now)user/Tau_Zero
oruser:Tau_Zero
- Replaced with link to user profile, no notification (syntax mirrors the profile url path)I agree with Algernon elsewhere in the thread that we should probably have a canonical notification syntax. It avoids confusion and reduces chances of accidental notifications.
Further, sometimes you want to mention someone but it's not worth spamming a notification (e.g. every time Deimos is mentioned in discussions about tildes). An argument could be made that if the discussion is about someone, they should be notified, and thus no link-only syntax, but that's already easy to get around with the existing markdown
[Tau_Zero](https://tildes.net/user/Tau_Zero)
Please tell me your username comes from Poul Anderson's novel.
It's not often someone recognizes the novel Tau Zero, though I guess I'm not surprised you would given what you've shared about your scifi interests, haha. I got a copy many years ago from my high school AP physics teacher who was cleaning out his collection and I absolutely loved it. The scientific and technological detail in fiction, which I'd later learn was called "hard science fiction", was new and exciting to me. Having the world firmly grounded in (possible future) reality made the human element much more impactful.
I found it in my high school library. It made a big impact on me, the combination of real science and a human interest story. It's still one of my favourite sci-fi novels.
Is this a feature that can be turned off?
Not as of now. I may eventually add the ability to disable it, but I think it's nice to know that if you mention someone, they'll definitely get a notification. Once you make it possible to disable, mentions stop being "dependable".
Not currently. Are you interested in that being an option?
I don't think I'll need it, but I could see it being useful for administrators or rather popular users.
@Deimos would love this.
I'm sorry, I tried to resist
Given that you replied to Deimos' own post, he was going to be notified of your comment anyway. :P