openstreetmap / openstreetmap-website

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

Changeset comments have individual links, but no button to grab them with #2796

Open jidanni opened 4 years ago

jidanni commented 4 years ago

Here I link directly to a changeset comment.

But how did I figure out how? With Chromium Inspector (F12). That's because I'm a computer wiz.

But for normal mappers, they should be able to get the link from somewhere in the Comment from Nuerdensfields 24 minutes ago sentence. But due to some bug, they can't!

GurminderSingh7 commented 1 year ago

i want to help with this issue, could you assign this to me

justharshal2023 commented 1 year ago

Is this Issue still present or resolved?

jidanni commented 1 year ago

Yes, it is still present.

pranshu-tomer commented 9 months ago

I can't understand this Issue. Can you give me more clear idea about issue.

Dimitar5555 commented 9 months ago

I can't understand this Issue. Can you give me more clear idea about issue.

When you hover over commented X time ago there is no link. On other platforms the same text is a link to that specific post/comment. For example in this issue, I can right click on commented X minutes ago, copy link and get https://github.com/openstreetmap/openstreetmap-website/issues/2796#issuecomment-1880081307.

gy-mate commented 5 months ago

As far as I understand the .comment_by_html translations should be changed in all ~90 languages from "Comment from %{user} %{time_ago}" to something like "%{comment} from %{user} %{time_ago}"¹ in order to be able to send the Comment word as a preformatted link from here somehow like this:

<%= t comment.visible ? ".comment_by_html" : ".hidden_comment_by_html",
                  :comment => link_to(xxxxxx, "https://www.openstreetmap.org/changeset/#{changeset.id}##{comment.id}"),
                  :time_ago => friendly_date_ago(comment.created_at),
                  :user => link_to(comment.author.display_name, comment.author) %>

¹ It's difficult because the word Comment should still be translated in each language, so somehow it should keep the translations and add links to them.

All in all, this seems a bit more complicated to me than a good first issue.

kleenkanteen commented 4 months ago

@tomhughes Can the "good first issue" label be removed from this because of the above explanation? I got baited into seeing this issue by it.

gravitystorm commented 4 months ago

translations should be changed in all ~90 languages

Yes and no. You don't have to consider how this works, you only need to make changes to en.yml and our translation team will take care of the rest.

something like "%{comment} from %{user} %{time_ago}"¹

I wouldn't do it quite like that, I would be more likely to make the time_ago into the permalink, just like here on github comments.

All in all, this seems a bit more complicated to me than a good first issue.

It's a reasonably isolated piece of code, it doesn't require any refactoring or other large-scale changes, so I still think it's reasonable as a good first issue. It might not be a good first issue for you, but that's no problem, there's plenty of other things to work on too! :smile:

gy-mate commented 4 months ago

you only need to make changes to en.yml and our translation team will take care of the rest.

My bad!

I would be more likely to make the time_ago into the permalink, just like here on github comments.

@gravitystorm Ah, so just like this: #4789?

gravitystorm commented 4 months ago

My bad!

No worries, we're here to help you get started and learn how everything works.

Ah, so just like this: https://github.com/openstreetmap/openstreetmap-website/pull/4789?

More or less! :smile: You'll want to use the path helpers rather than string interpolation into a fixed url, but we can cover this kind of thing in the PR review. Thanks for opening the PR.

msudipta888 commented 2 months ago

this issue is still open or close because i want to attempt it

gy-mate commented 2 months ago

@msudipta888 It's open (as you may see it at the top of the page).