[openstreetmap/openstreetmap-website] Implement a reliable system to @-mention users in comments (Issue #6635)

Andy Allan notifications at github.com
Wed Jan 7 13:25:33 UTC 2026


gravitystorm left a comment (openstreetmap/openstreetmap-website#6635)

> The string `@[user_id:$USER_ID]` would be stored in DB

Not quite - in the database we would have something like `This sentence mentions a user: <action-text-attachment sgid="eyJfcmFpbHMiOnsib…"></action-text-attachment>.`

We can implement this without any UI to start with, by parsing the comment text during save and replacing `@foo` with the action text attachment code. In future, the UI can add in the attachments client-side before saving. Hopefully by using actiontext attachments, the UI can be taken from an upstream project more easily!

We can expand the use of these attachments to cover other things, like embedding references to node, ways, changesets etc and rendering them as links/hovercards/plaintext and so on.

> I don't know how happy consumers like JOSM are with HTML links in a plain text field (changeset discussions are shown in some popup there).

For plain text contexts, we can render a plain text output of just the username, maybe with some quotes or other indications around whitespace.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6635#issuecomment-3718878219
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/6635/3718878219 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260107/d31fc6e8/attachment.htm>


More information about the rails-dev mailing list