[RFC] Ability to @mention specific users in posts

Discuss requests for comments/changes posted in the Issue Tracker for the development of phpBB. Current releases are 3.2/Rhea and 3.3/Proteus.
Post Reply
User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC] Ability to @mention specific users in posts

Post by JoshyPHP »

I don't understand, why would a BBCode be easier? You need custom code to handle the mention, a BBCode doesn't help with that.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Ability to @mention specific users in posts

Post by DavidIQ »

Because there isn't a better way of doing it right now without taking into account username variations? I mean I'm sure to you it would simply work by just using:

Code: Select all

@JoshyPHP
Which is fine but what should happen if your name had a space in it?

Code: Select all

 @Joshy PHP
Do we notify user Joshy or user Joshy PHP? A BBCode would handle edge cases like that in the following way:

Code: Select all

[mention]Joshy PHP[/mention]
The BBCode name is obviously up for debate but doesn't matter right now as that would be up to the extension developer to decide if they even want to use a BBCode. Once we have a proper WYSIWYG editor in place this will be much prettier plus even with that you would end up with a BBCode in the background anyways.
Image

User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC] Ability to @mention specific users in posts

Post by JoshyPHP »

Ok, I didn't take it that way. I was looking at it from a technical standpoint, not in terms of UI. From a purely technical standpoint, there are other ways to match those names without using BBCodes. For example, if you match @foo followed by a space, you can look for usernames that match "foo %" in the database and see if any of those match if you consume a bit more text. That's not what I'd recommend though. If you want to give the user a format that handles spaces and other characters, how about optionally enclosing the username in quotation marks? e.g. @"john doe"

@-mentions are so much easier to use than BBCodes. Whatever other mechanism is implemented to deal with usernames with spaces, I hope that @-mentions will be available. On this board, only 1.6% of usernames contain a space. If I only count those who have posted, that's only 0.48% of all users.

User avatar
Mess
Registered User
Posts: 199
Joined: Wed Jun 13, 2012 10:14 am

Re: [RFC] Ability to @mention specific users in posts

Post by Mess »

I would add 2 options. One for "normal" usernames and a bbcode solution for the few % which fail.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Ability to @mention specific users in posts

Post by DavidIQ »

Mess wrote:I would add 2 options. One for "normal" usernames and a bbcode solution for the few % which fail.
That's no good. How do you determine if it will fail? Try one method and if it fails try the other one, by which time a notification has already been created for the failed example? That's not only annoying but confusing so I would say that's a no go.

There might be an auto-complete plugin by jQuery that might work for this though and won't need the WYSIWYG editor so that as one types the "@" without any text before it and follows it with letters or numbers one can select from a list and the user gets inserted. Would be kind of like Facebook does it I guess.
Image

leschek
Registered User
Posts: 163
Joined: Tue Aug 28, 2012 1:30 pm

Re: [RFC] Ability to @mention specific users in posts

Post by leschek »

I would like to be able to mention user in this way:

Code: Select all

[mention=Joshy PHP]Joshy PHP[/mention]

In this case the important part is in [mention=Joshy PHP] and user can write anything between the tags. (e.g. [mention=Joshy PHP]Joshy[/mention])

Maybe it could work in similar way as Magic Links, so user could write [mention=Joshy PHP]Joshy PHP[/mention] or [mention]Joshy PHP[/mention].

I would prefer not to use character @, because in some languages it is not part of default keyboard, so user has to switch to En keyboard (if he/she has it installed), then write @ and switch back to first language again to finish post.

User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC] Ability to @mention specific users in posts

Post by JoshyPHP »

Is there really a keyboard/layout that cannot create an at-sign? If you can't make it with Shift, try AltGr. If there is such a keyboard, is it really easier to create two pairs of brackets?

leschek
Registered User
Posts: 163
Joined: Tue Aug 28, 2012 1:30 pm

Re: [RFC] Ability to @mention specific users in posts

Post by leschek »

Well at least Czech keyboard doesn't have at-sign (our alphabet has more letters than English so we have to use it for another letter).

Neither "Shift" nor "AltGr" works. Writing brackets is as difficult as writing at-sign (I have to switch into En keyboard), but it is easy to click on BBCode button.

Also I would like to use BBCode, because we use declension in names. I wrote about that here.

Not sure if it's possible, but why not make it similar as magic URLs - users would be able to write any of the following forms:

[@=JoshyPHP]Joshy PHP[/@] or [@]Joshy PHP[/@] or @=Joshy PHP

I would be able to click on BBCode and you could write at-sign.

User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC] Ability to @mention specific users in posts

Post by JoshyPHP »

leschek wrote:Well at least Czech keyboard doesn't have at-sign
Have you tried AltGr+V? That's what Wikipedia shows in this image.
leschek wrote:it is easy to click on BBCode button
I agree but if you use a button then it doesn't matter what the text looks like, right? Mentions could use an Unicode snowman; It wouldn't change a thing. ☃

Your only concern then is about declension.

leschek
Registered User
Posts: 163
Joined: Tue Aug 28, 2012 1:30 pm

Re: [RFC] Ability to @mention specific users in posts

Post by leschek »

JoshyPHP wrote:
leschek wrote:Well at least Czech keyboard doesn't have at-sign
Have you tried AltGr+V? That's what Wikipedia shows in this image.
Thank you, it works. I feel kind of stupid now.
JoshyPHP wrote:
leschek wrote:it is easy to click on BBCode button
I agree but if you use a button then it doesn't matter what the text looks like, right?
You could write [@=leschek]☃[/@] and I would know you mentioned me (if it will be connected with notifications).
JoshyPHP wrote:Your only concern then is about declension.
Yes.

Post Reply