Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

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

+1
−3

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)
History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

Post
+4
−0

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


  1. Or somebody who wants to write a userscript or contribute a PR. ↩︎

History
Why does this post require moderator attention?
You might want to add some details to your flag.

2 comment threads

Both? (1 comment)
General comments (2 comments)
General comments
Lundin‭ wrote almost 3 years ago · edited almost 3 years ago

I'd assume that the most common place to share Codidact links would be on Codidact. So it would be nice if the site allowed for a way that's compatible with itself... That ought to be way more important than supporting some format for social media platforms. Now on Someplace Else when you paste a link https://unicorns.someplaceelse.com/posts/123456 it automatically gets replaced with a link based on question title. That's a somewhat new feature they added recently.

Monica Cellio‭ wrote almost 3 years ago

I don't know what's most common; people use Twitter and mailing lists and Facebook and wherever else to attract people who aren't already here, too. Improving how Codidact treats Codidact links is a good idea; if the renderer automatically generated the Markdown you're looking for that would address your use case.