Welcome to Codidact Meta!
Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.
Comments on Improving the "copy link" button
Parent
Improving the "copy link" button
I'd like to have the "copy link" button below questions improved so that it gives something more useful. Currently when clicking on it, you just get a raw URL like:
https://unicorns.codidact.com/posts/123456
That's not really meaningful, I could as well just copy the URL from my browser. So I'm not really sure what the button was meant for, easier copy/paste when browsing from a phone or something?
Instead of the above I'd like to get a formatted link with the question title in the following form:
[What kind of kibble should I get for my unicorn?](https://unicorns.codidact.com/posts/123456)
Which I can then paste and get this: What kind of kibble should I get for my unicorn?
Rather than this: https://unicorns.codidact.com/posts/123456
Because currently if I want to share a Codidact link either here or Someplace Else, I have to do the following cumbersome ritual, which is annoying:
- Copy the URL.
- Paste it inside parenthesis:
(https://unicorns.codidact.com/posts/123456)
- Manually add brackets:
[](https://unicorns.codidact.com/posts/123456)
. - Manually copy paste the question title:
[What kind of kibble should I get for my unicorn? ](https://unicorns.codidact.com/posts/123456)
- Find out that the link I just wrote is a mess because all Codidact titles end with a space.
- Manually remove the space:
[What kind of kibble should I get for my unicorn?](https://unicorns.codidact.com/posts/123456)
Post
"Copy Link" is on top-level posts for consistency with answers. On an answer the URL takes you straight to that answer, which isn't what would be in your URL bar. (I think the work on the threaded-comments branch will add comment links, too -- same idea.)
Your proposal works smoothly if where you want to share the link expects Markdown, but would mean that somebody who wants to share it on a platform that expects a raw link (Twitter, Discord, etc) would have to strip it out again, and somebody who wants to use the link in HTML would have to rewrite the markdown as an HTML href (which expects the text and link in the other order). This is why we went with just a raw link -- it's clear what you're getting and it works everywhere.
In principle we[1] could modify "Copy Link" to give you a modal where you can choose the formatting (raw, markdown, HTML), but I don't think we should bake in any specific formatting.
I don't know why titles end with a space. That sounds like a bug. Thanks for the report.
-
Or somebody who wants to write a userscript or contribute a PR. ↩︎
0 comment threads