I'm pleased to say that Forem now supports autocomplete for usernames π
This functionality is already available in the comment section of all Forems, and will shortly roll out to the post editor.
How it works
When you type '@' followed by another two characters, search results will automatically start being fetched and displayed in a dropdown. Search results are based on username only at this time.
For screen-reader users, as soon as search results start fetching, the component conforms to the Combobox pattern; announcing the number of search results found and how to interact with them.
Selecting a user either by click or by keyboard will populate the full username in the text area. When your comment/post is published, this is turned into a link to that user's profile β¨
We hope you find this feature useful!
Top comments (8)
I also requested this feature in one of my PRs to DEV. Now it's happening and I'm much excited.
Let me give it a try...
@s_aitchison
@kvaibhav01 we're all going to be mentioning so many users π
Let the game begin! π
This is awesome. There is one issue though if I search for "Suzanne" it does not search the display name but only searches username. So I have to look up the username for the user before mentioning the user.
That's right, at the moment it only searches by username. Hopefully in the future we'll extend it to name as well π
greaat @s_aitchison !
Niiiiece!!
@s_aitchison even works on mobile, cool! βΊοΈ