openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.2k stars 912 forks source link

parse for @username in markdown fields on OSM, and link to their user page #1111

Open mikelmaron opened 8 years ago

mikelmaron commented 8 years ago

In changeset discussions, diary entries, or elsewhere, support github style @ link within markdown

emacsen commented 8 years ago

I think you mean display names (OSM usernames are technically numbers). But Display names can have spaces in them, which could lead to confusion, so you really need a way to override this behavior.

pnorman commented 8 years ago

I don't think this is possible, for the space reason. As an example, consider foo @bar baz foo where there exist users bar and bar baz. What do you link to? How do you explain this to users in a non-confusing way?

danstowell commented 8 years ago

FWIW the Taking Manager already has an approach to this. They use square brackets for names with spaces in, for example @[Jo Schmo]. So yes it's possible, though obviously the space thing makes it a bit clunkier. https://github.com/hotosm/osm-tasking-manager2/issues/369

mikelmaron commented 8 years ago

@danstowell that sounds like it would work.

emacsen commented 8 years ago

To do this, you may want to look at the work on the reporting branch, where I directed our GSoC student to do forward and reverse linking of OSM elements (node, way, relation) and changesets to markdown syntax.

tomhughes commented 8 years ago

@emacsen what is happening with that branch? am I ever getting a PR for it?

emacsen commented 8 years ago

@tomhughes that should have happened during the summer. I thought you were evaluating it. I'm fairly sure we discussed on IRC.

tomhughes commented 8 years ago

@emacsen I was asked for my comments on the branch yes, but no PR was ever opened as far as I can recall.

emacsen commented 8 years ago

@tomhughes this may be more appropriate for a separate issue, but yes I agree I'd love to see this code pulled into the main branch

andrewharvey commented 3 years ago

Plus send a notification to the user who was mentioned.

I'd like to do this when commenting on a suspicious changeset by user A, who changed something user B originally contributed. By doing @ B I can loop them in to make them aware of the change and ask for any further details.

mikelmaron commented 3 years ago

@andrewharvery yes I had that in mind when opening this ticket --- 5 years ago! changeset and diary comments are already set up to send notifications to the editor, and anyone subscribed to the comments, so that's not hard. main thing is parsing for the usernames (also not that hard). of course if it was so easy, it would be done...

danieldegroot2 commented 1 year ago

Related #693 / #844