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 attention from curators or moderators?
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 attention from curators or moderators?
You might want to add some details to your flag.

2 comment threads

Both? (1 comment)
General comments (2 comments)
Both?
Lux‭ wrote over 1 year ago · edited over 1 year ago

What about having both, I mean we can have something like a "Share" button which is a dropdown that has the following options but is not limited to:

1- Raw URL like https://unicorns.codidact.com/posts/123456.

2- URL in the format of [What kind of kibble should I get for my unicorn?](https://unicorns.codidact.com/posts/123456).

3- Even direct sharing to Twitter using something like a tweet button.

Models seem like an unproductive solution, dropdown will work better because we can copy it faster. And yeah, this should be implemented so it can save everyone's time. As well as other options than Markdown and Raw URL should be implemented so we can have the most basic ways to share a post.