Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jidanni opened this issue Aug 27, 2020 · 10 comments · May be fixed by #4789
Open

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

jidanni opened this issue Aug 27, 2020 · 10 comments · May be fixed by #4789
Labels
changesets Related to the Changesets feature enhancement Improvements and new feature requests good first issue Issues that require little knowledge of the codebase

Comments

@jidanni
Copy link

jidanni commented Aug 27, 2020

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!

@lectrician1 lectrician1 added enhancement Improvements and new feature requests good first issue Issues that require little knowledge of the codebase labels Dec 17, 2020
@tuckerrc tuckerrc added the changesets Related to the Changesets feature label Feb 15, 2021
@GurminderSingh7
Copy link

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

@justharshal2023
Copy link

Is this Issue still present or resolved?

@jidanni
Copy link
Author

jidanni commented Oct 8, 2023

Yes, it is still present.

@pranshu-tomer
Copy link

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

@Dimitar5555
Copy link
Contributor

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
Copy link

gy-mate commented Apr 19, 2024

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
Copy link
Contributor

@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
Copy link
Collaborator

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! 😄

@gy-mate gy-mate linked a pull request May 14, 2024 that will close this issue
@gy-mate
Copy link

gy-mate commented May 14, 2024

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
Copy link
Collaborator

My bad!

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

Ah, so just like this: #4789?

More or less! 😄 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changesets Related to the Changesets feature enhancement Improvements and new feature requests good first issue Issues that require little knowledge of the codebase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants