openstreetmap-website icon indicating copy to clipboard operation
openstreetmap-website copied to clipboard

Explain to anonymous users they need to log in to comment on notes

Open boothym opened this issue 4 years ago • 5 comments

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.

Screenshot_2020-09-13 Note 1982902 OpenStreetMap

boothym avatar Aug 08 '20 13:08 boothym

I think everything on this topic has been discussed before in #1543 and #2303. Your requirement could probably be merged into #2303.

mmd-osm avatar Aug 09 '20 11:08 mmd-osm

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.

boothym avatar Aug 11 '20 16:08 boothym

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"?

boothym avatar Aug 06 '21 10:08 boothym

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.

tomhughes avatar Aug 06 '21 11:08 tomhughes

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?

boothym avatar Aug 24 '22 14:08 boothym

It looks like this was implemented in #4449 so can be marked as closed?

dankarran avatar Jan 30 '24 09:01 dankarran

Indeed it was.

tomhughes avatar Jan 30 '24 10:01 tomhughes