Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to choose which link to use for the preview card #30802

Open
crisukbot opened this issue Jun 21, 2024 · 2 comments
Open

Allow user to choose which link to use for the preview card #30802

crisukbot opened this issue Jun 21, 2024 · 2 comments
Labels
area/web interface Related to the Mastodon web interface

Comments

@crisukbot
Copy link

crisukbot commented Jun 21, 2024

Steps to reproduce the problem

Create a post with two links, one that gives out nothing, and the other that, for example, should make a preview card of a video from YouTube.

Expected behaviour

The second link (for example, the YouTube preview card is not shown, only the first one, which has nothing in it)

Actual behaviour

Either you can choose for which link to make a preview card in the post, or Mastodon can check for the possibility of making a preview card, and if there is nothing in the first link, make a preview card from the second or third link in the post.

Detailed description

Here's an example of a problem, people posted two links, the first one is a torrent tracker that doesn't generate a preview card, and the second link is a YouTube video, and I would like Mastodon to display the second link and make a preview card for it. (Or at least to have a choice for which link to generate a preview card)

https://social.noleron.com/@melvoice/112650326481702141

Mastodon instance

social.noleron.com

Mastodon version

v4.3.0-alpha.4+chuckya

Browser name and version

Firefox 127.0

Operating system

Windows 11 and MacOS 15

Technical details

No response

copy from TheEssem#20

@crisukbot crisukbot added area/web interface Related to the Mastodon web interface bug Something isn't working status/to triage This issue needs to be triaged labels Jun 21, 2024
@renchap renchap added suggestion and removed bug Something isn't working labels Jun 21, 2024
@renchap renchap changed the title problem with the preview card Allow user to choose which link to use for the preview card Jun 21, 2024
@renchap renchap removed the status/to triage This issue needs to be triaged label Jun 21, 2024
@renchap
Copy link
Member

renchap commented Jun 21, 2024

This is not really a bug but the intended behaviour. I updated labels to feature request and the title accordingly.

We want to allow users to pick which link they want to generate a preview for. This is part of a larger effort to rework how link previews are handled.

@Swyter
Copy link

Swyter commented Sep 12, 2024

@renchap Kind of related, but I was looking into how to disable generating cards/previews altogether for when you only want a pure text post with links. Twitter has this whole card_uri='tombstone://card' functionality that happens when you press in the small X in their interface. Very similar to Discord previews, which you can also remove.

So far I haven't found any reliable way to mirror it here; cards are invariably generated for you by the server upon submission and attached to the status element without any kind of control. Only the sensitive tag does something, 1x1 transparent image hacks and the like just cause even bigger previews. So yeah, pretty limited.

https://stackoverflow.com/questions/65550090/how-to-prevent-automatic-link-preview-generation-for-status-update-in-twitter-ap

Would be nice to have more control over the cards, maybe just submit them client-side and make them optional. There are many types of posts where they just add noise and padding. Try posting a toot linking to any GitHub page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/web interface Related to the Mastodon web interface
Projects
None yet
Development

No branches or pull requests

3 participants