Element-web: Add syntax to force hide URL preview for a link you're posting

Created on 28 Apr 2018  路  8Comments  路  Source: vector-im/element-web

Discord has a feature where you can put < > around a link you're posting and it won't show the preview. It would be cool to have a similar feature in Riot.

feature p1 urlpreviews

Most helpful comment

Force is a strong word. I think this'd be a useful feature, if we changed it to _hint_. Let the sender hint that a link might not need a preview (useful if you're sending a bunch of links, for example), but also add a button for expanding the previews if the recipient wants to do so.

All 8 comments

Force is a strong word. I think this'd be a useful feature, if we changed it to _hint_. Let the sender hint that a link might not need a preview (useful if you're sending a bunch of links, for example), but also add a button for expanding the previews if the recipient wants to do so.

Echoing Lampholder:

I found myself wishing for this recently - the GDPR message text from the server notice room is particularly noisy with the URL previews.

Talking it through with @lukebarnard1 we concluded that perhaps this could be implemented (on the rendering side) by adding a custom attribute to the HTML of the link in the formattedBody, something like data-mx-preview=false.

This would allow any clients who submit a formatted body to supress the preview - the question then is how to provide the UX for this. Something like discord's could work, but it doesn't play very nicely with established markdown conventions.

(bumping prio as per other issue)

One question remains, is it acceptable that there'll be no way with plaintext (just body) to mark a URL as unwanting of a preview?

mixins would be a nice way to solve this :(

Would they though? You'd need a weird map[url]bool mixin to be able to specify per url in the event

yeah, it wouldn't help per-url, but would help per event.

this issue seems to be targeted per-url :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MurzNN picture MurzNN  路  3Comments

turt2live picture turt2live  路  3Comments

lukebarnard1 picture lukebarnard1  路  3Comments

richvdh picture richvdh  路  3Comments

turt2live picture turt2live  路  3Comments