Allowing people to easier link to/reference posts in their own posts

A quick reply from me. Perhaps I’ll come up with a longer answer, but for now some quick points that I feel saying right away.

I was thinking about building a inline-preview like we do for YouTube videos or tweets to show a post preview. However, as I now have slept a night and thought about this idea, I don’t think it is necessary. Instead of showing the URL, we could replace the URL with something like “Post ‘Foo’ by Alice”, and maybe prefix the link with a diaspora icon or something, so we have a clear visual identification that this is “more than a link”.

I think that we actually need embedding previews for referenced posts. Otherwise it won’t feel like we have implemented “reshares with own notes” or “private reshares”. Linking posts is actually possible right now using links without hostname [text](/post/:guid), and without the preview it doesn’t feel like anything similar to reshare. I can imagine someone will still want to use “weird userscripts” if we don’t implement proper embedding for linked post. If we are afraid of posts view getting messy, we can make it foldable, similar to like it works for #NSFW posts right now.

What happens if someone uses markdown to link to a post? How do we display it?

Just a short note: if you’re talking about []() markdown, then markdown-it parser which we use for rendering actually doesn’t make difference between plain links and []() links (it creates the same types and set of tokens), so that how we should parse it everywhere, I think.

Thank you @denschub for taking care of writing this up!

2 Likes

Spread was about the clean reshare without like or comment. What about Quote?

I don’t like “quote” ether, since, depending on the implementation, we might not end up quoting the post at all. We may show an excerpt, just a link, …

I agree with senya here, the original/linked/referenced post should be embedded similar to how it currently is with reshares.

I think we should do it the same way as we do it for youtube link, or any other link: Only embed the first referenced post.

In my opinion that wouldn’t feel like a finished solution again. I think opening a popup with the publisher with already the link in it is better. People can still copy/paste the link to another publisher where they already wrote text or when they don’t like to write the post in a popup.

That shouldn’t be a problem, at least normal diaspora:// links should work with markdown like http:// links do. It needs to be discussed/decided if we only embed it when the link is on it’s own line. When we only embed it when it’s on it’s own line we can maybe also embed it inplace (like discourse does it when you post a link that is “oneboxed”). That would also solve the problem when somebody posts multiple links.

By displaying the embedded post in the preview? Or what do you mean?

I don’t understand that question? You mean if we should disallow to link to a post? Or if the author who references a post should disable if it’s embedded? I don’t think we can disallow to link to something.

I think that’s simple, just check if the current user is allowed to see the linked post?

I think we should just call the “spread” case “reshare”, because that’s what it is, and that’s what people already know?

For the new case: If we use diaspora:// links then I think “reference” is OK.

I also thought about using a new message for federating it, that would be similar to the current reshare message. I would have used “quote” then. But that would be much less flexible than diaspora:// links. You could only quote one post, and add a text to it. The only advantage of this would be, that it’s much easier to migrate legacy reshares (with comments and likes) to them, because it would really be similar.

But when using diaspora:// links I think we can just convert all legacy reshares to status messages and set the text to just the link to the original post.

Maybe we could actually use oEmbed to fetch the representation for embedding diaspora:// links? This way it would be easily reusable by other services.

1 Like

+1 for embedding, but why do it similar to reshares? I would go for the oEmbed way with embed in place, like for tweets:

That way we can have a rich embedding, with post interactions etc.

No, I think we should render it ourselves. oEmbed fetches html from remote servers, so we would display html from every pod, that would end in XSS problems (we currently only support oEmbed from trusted domains). And we can render it uniform (so referenced posts look always the same), and we can just render friendica posts like our posts instead of needing to fetch the rendering from friendica.

What is the problem with it? With similar I mean that is should be embedded (instead of only displaying the title), with this gray line at the side, so it’s clear it’s “quoted”, and with avatar and timestamp to link to the original.

Tweets are not embedded in place, they are embedded at the bottom of the post, like everything else that we currently embed.

But as written, we could embed it in place, but only if it’s a plain link on it’s own line (like it is done with onebox here on discourse).

No, I think that would overload the embedding. Like would maybe work, but where do you display comments? How do you handle writing a comment to the referenced post? And having only the possibility to like looks weird.

I also wouldn’t embed oEmbed stuff from the referenced post, that would overload it too. Only the avatar of the author, the name of the author, the timestamp and the content … Everything else can be done on the SPV of the referenced post.

1 Like