Comments on all pages should have anchor links available #44

Closed
opened 2024-06-04 15:03:49 +00:00 by ken_fallon · 5 comments
Owner

Links like this facilitate copy and paste for deep linking.

Currently
<h5 id="comment_xxx">Comment #1 posted on 2024-01-01 11:11:11 by John Doe</h5>

Should be
<h5 id="comment_xxx"><a href="https://hackerpublicradio.org/eps/hpr4109/index.html#comment_xxxx">Comment #1</a> posted on 2024-01-01 11:11:11 by John Doe</h5>

Links like this facilitate copy and paste for deep linking. Currently `<h5 id="comment_xxx">Comment #1 posted on 2024-01-01 11:11:11 by John Doe</h5>` Should be `<h5 id="comment_xxx"><a href="https://hackerpublicradio.org/eps/hpr4109/index.html#comment_xxxx">Comment #1</a> posted on 2024-01-01 11:11:11 by John Doe</h5>`
Contributor

I believe this is a change for hpr_generator?

Created Pull Request 199 to address this issue.

I believe this is a change for hpr_generator? Created [Pull Request 199 to address this issue](https://repo.anhonesthost.net/rho_n/hpr_generator/pulls/199).
Contributor

The following PRs were merged, which I think should close this issue

The following PRs were merged, which I think should close this issue - Generator Pull Request [199 - Added local anchor links for each individual comment](https://repo.anhonesthost.net/rho_n/hpr_generator/pulls/199) - Generator Pull Request [200 - Fixed relative link to include the episode number, not just the domain root.](https://repo.anhonesthost.net/rho_n/hpr_generator/pulls/200)
Author
Owner

@davmo you had issues with this one.

Can you review and close if necessary.

@davmo you had issues with this one. Can you review and close if necessary.
Owner

The problem with making a change from:

https://hackerpublicradio.org/eps/hpr4148/index.html#1

to

https://hackerpublicradio.org/eps/hpr4148/index.html#comment_4005

is that this has an historical effect.

Any historical show that references an historical comment will have used the old format, and this change will have invalidated the link because all comment links have been changed.

I use links to comments in the past month in the notes I generate for the Community News shows each month. I wasn't aware that the formats had changed until I happened to try and follow a comment link, which failed. Admittedly it fails "softly" in that it takes you to the show in question, but it is confusing.

I have adapted the template that generates these monthly notes to use the new format, but ideally we should be going back through the notes to show number 1 making adjustments to comment links.

To be realistic, I expect these will be few, and will be found mainly in Community News notes, but I think we should learn the lesson that future changes like these should be discussed, and their ramifications considered before they are implemented.

I propose closing this issue, but perhaps opening another which defines a retrospective 'fixup' for all comment links.

The problem with making a change from: ``` https://hackerpublicradio.org/eps/hpr4148/index.html#1 ``` to ``` https://hackerpublicradio.org/eps/hpr4148/index.html#comment_4005 ``` is that this has an historical effect. Any historical show that references an historical comment will have used the old format, and this change will have invalidated the link because **all** comment links have been changed. I use links to comments in the past month in the notes I generate for the Community News shows each month. I wasn't aware that the formats had changed until I happened to try and follow a comment link, which failed. Admittedly it fails "softly" in that it takes you to the show in question, but it is confusing. I have adapted the template that generates these monthly notes to use the new format, but ideally we should be going back through the notes to show number 1 making adjustments to comment links. To be realistic, I expect these will be few, and will be found mainly in Community News notes, but I think we should learn the lesson that future changes like these should be discussed, and their ramifications considered before they are implemented. I propose closing this issue, but perhaps opening another which defines a retrospective 'fixup' for all comment links.
davmo closed this issue 2024-07-08 09:56:50 +00:00
Owner

Sorry about that Dave, I don't specifically remember why I chose to change the naming convention for the comment ids. I obviously didn't think about the fact that they might be manually referenced somewhere else in the site. I think I wanted an ID that would be unique over the site and not just within the page. It would also make it easier to find the comment in the database itself.

I don't think it would too hard to change it back to the original format, but now you are referencing the new style in your latest Community news. We could have the template generate new style and old style based on a date. So any comments in an episode posted after the cut-off date gets the new format, any before get the old style.

Sorry about that Dave, I don't specifically remember why I chose to change the naming convention for the comment ids. I obviously didn't think about the fact that they might be manually referenced somewhere else in the site. I think I wanted an ID that would be unique over the site and not just within the page. It would also make it easier to find the comment in the database itself. I don't think it would too hard to change it back to the original format, but now you are referencing the new style in your latest Community news. We could have the template generate new style and old style based on a date. So any comments in an episode posted after the cut-off date gets the new format, any before get the old style.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: HPR/hpr_hub#44
No description provided.