[ticket/13713] User Mentions (GSoC 2018) #5225
This Pull Request is the result of GSoC 2018 Project “User Mentions”.
This project is intended to add the ability to mention specific users in forum topics so that they will receive a notification (just like in many modern messengers and websites).
This PR is backwards-compatible and works well with phpBB 3.3's BBCode parser (that was newly added in phpBB 3.2).
How it works
Users can type the
Besides general user and group sources, built-in name sources include:
Extension developers can add their own sources to give certain users and groups higher priorities based on other conditions.
Special cases taken into consideration:
The name of mentioned user/group becomes a link to its profile highlighed in the colour of that user/group.
Users are able to disable mention notifications in the same way as for other types of notifications (on Edit notification options page in User Control Panel).
This feature uses the At.js library for displaying mention dropdown.
User Mentions work. There'll be a PR to development documentation for how to add a new name source in your extension.
Tracker ticket (set the ticket ID to your ticket ID):
referenced this pull request
May 30, 2018
hanakin left a comment
Our stupid file structure is starting to really annoy me with a need to split colors. Please combine all css in a new file called mentions.css except for the colors. And include the new file please.
@hanakin what about
As for ES6, PhpStorm is complaining every time about
P.S. Needed to type this reply the second time, mobile Internet chewed my text
No do not split admin.css my bad. We no longer really use our lint for js as it’s antiquated and broken. I am working on a fix to switch to xo which is based on eslint which is far better. So for now maybe externalize everything into a function call so we can easily refactor
hanakin left a comment
when you get time can you provide a screenshot of the rendered html/css also due to the sheer amount of changes can you also please post the rendered html code, that would help a lot?
<div class="atwho-container"> <div id="atwho-ground-message"> <div class="atwho-view" id="at-view-64" style="display: none; top: 356.267px; left: 83.4503px;"> <ul class="atwho-view-ul"> <li class="mention-name cur"> <span class="mention-avatar"><i class="fa fa-user"></i></span><span>test</span> </li> <li class="mention-name"> <span class="mention-avatar"><i class="fa fa-group"></i></span><span>Administrators</span> </li> <li class="mention-name"> <span class="mention-avatar"><i class="fa fa-group"></i></span><span>Global moderators</span> </li> <li class="mention-name"> <span class="mention-avatar"><i class="fa fa-user"></i></span><span>LavIgor</span><span class="mention-rank">Site Admin</span> </li> </ul> </div> </div> </div>
According to caniuse.com, IE 11 complies with this requirement. As we've discussed with @CHItA IE is actually the same as Edge and is no longer supported, but I personally use it sometimes.
Should I split regular styles or leave them all as is now?
I've done that already, the function is named
@lavigor for prosilver only separate out the colors, put the rest in a new css file called mention.css and import it before colours.css, please... hmm as I suspected the structure is actually pretty similar to the pm structure. Which is a port of https://codepen.io/hanakin/pen/vrgOGG?editors=1100. I will have some cleanup for you by Monday ;)