openstreetmap-website
openstreetmap-website copied to clipboard
Explain to anonymous users they need to log in to comment on notes
I was surveying and looking looking at a nearby note on my phone. I was not logged in so all the note displayed was the description, created by user/date, and the location.
Since anonymous users cannot leave a comment or resolve notes, it should be explained to them that they need to log in to do so.
Something like "Log in to leave a comment on this note" could be added below - anonymous users may look at a note and have some local knowledge but it's not clear how to add a comment.
Especially as anonymous users can create notes but then not reply to any new comments that others may post.
I think everything on this topic has been discussed before in #1543 and #2303. Your requirement could probably be merged into #2303.
Not sure about that. I'm not asking for anonymous users to be allowed to comment as per #1543 (it's a long thread though so perhaps I missed something).
And maybe it's just not explained properly, but I didn't think #2303 covered my issue - anonymous users cannot even begin typing a comment to begin with as there's no comment box.
Didn't notice I was logged out until I looked at a note and saw the resolve/comment buttons were missing, which reminded me again of this issue.
If you view a changeset when logged out it says:
Discussion Log in to join the discussion
So why can't it say "Log in to comment on this note"?
Well of course it can say that - it can say anything we want it to.
That is just the text that the original implementer of the feature chose and nobody has ever opened a pull request to propose changing it.
Looking at the changeset page this seems to be the code which adds the log in text: https://github.com/openstreetmap/openstreetmap-website/blob/d3388abe51a946ae0abc645d831a93b1b2cc6749/app/views/browse/changeset.html.erb#L69
<% unless current_user %> <p class="notice"> <%= link_to(t(".join_discussion"), login_path(:referer => request.fullpath)) %> </p> <% end %>
Could the same be added to the note.html.erb file?
Guessing the .join_discussion text would need to be different - something like "Log in to comment or resolve this note" if the note is open, and "Log in to reactivate this note" if the note is closed?
It looks like this was implemented in #4449 so can be marked as closed?
Indeed it was.