damus-io / damus

iOS nostr client
GNU General Public License v3.0
2k stars 289 forks source link

Allow for multiple URL preview links in a post #1397

Open dmnyc opened 1 year ago

dmnyc commented 1 year ago

What currently happens:

Posts containing more than one URL only display a link preview for the first one.

What I think should happen:

All linked URLs appear below the post text as previews. Maybe set a limit so it doesn't get abused. Most users only post a few, so maybe set the limit to 4 or 5. They could also display as a gallery.

Perhaps even steal borrow the feature from the Bluesky app where the user is prompted to add a link card when a link is entered in the post editor.

image

jb55 commented 1 year ago

On Sat, Jul 29, 2023 at 06:18:56PM -0700, Maybe: Daniel ?️ wrote:

All linked URLs appear below the post text as previews. Perhaps set a limit so it doesn't get abused. Most users only post a few, so maybe set the limit to 4 or 5. They could also display as a gallery.

previews are pretty expensive to compute actually and their size is dynamic so it pops the views around. It would be difficult and annoying to make these a carousel like images. I'm ok with just one for now. Maybe we can have an option to choose which one to display as the main preview.

Perhaps even steal borrow the idea from the Bluesky app where the user is promoted to add a link card when a link is entered in the post editor.

yes we should do that

alltheseas commented 1 year ago

Somewhat related to multiple URLs in DM: https://github.com/damus-io/damus/issues/1074

idea from the Bluesky app where the user is promoted to add a link card when a link is entered in the post editor.

@dmnyc can you kindly share a screenrecord of this blue sky feature 🙏

dmnyc commented 1 year ago

Ugh, that means I have to login to Bluesky again. 😆

Here's an invite code if you need: bsky-social-ukact-dhpyk

https://github.com/damus-io/damus/assets/3638467/586d3d6d-1a28-401f-8c4c-6f6f68fa4d80

alltheseas commented 1 year ago

Ugh, that means I have to login to Bluesky again. 😆

Here's an invite code if you need: bsky-social-ukact-dhpyk

https://github.com/damus-io/damus/assets/3638467/586d3d6d-1a28-401f-8c4c-6f6f68fa4d80

Legend.

Tell me, what happens should there be multiple links? Multiple link cards? A single link card? How does the user work observe, and make the choice?

From Will's post sounds like there is a technical constraint to a single link card.

hodlrodeo commented 8 months ago

On Sat, Jul 29, 2023 at 06:18:56PM -0700, Maybe: Daniel ?️ wrote:

All linked URLs appear below the post text as previews. Perhaps set a limit so it doesn't get abused. Most users only post a few, so maybe set the limit to 4 or 5. They could also display as a gallery.

previews are pretty expensive to compute actually and their size is dynamic so it pops the views around. It would be difficult and annoying to make these a carousel like images. I'm ok with just one for now. Maybe we can have an option to choose which one to display as the main preview.

Perhaps even steal borrow the idea from the Bluesky app where the user is promoted to add a link card when a link is entered in the post editor.

yes we should do that

Could a swipeable gallery of link buttons above the preview where a user can select which link to preview be easier and still useful? The poster could pick which of the links to preview by default from this "button carousel", and users can see the other ones if they want. Also, all the links are collected in one place.

alltheseas commented 8 months ago

What do you think @robagreda ?