coralproject / talk

A better commenting experience from Vox Media
https://coralproject.net
Other
1.88k stars 355 forks source link

Add FEATURE flag to show/hide images by default #4610

Open antonborgstrom opened 3 months ago

antonborgstrom commented 3 months ago

Search Terms

images, embeds, UserMediaSettings, unfurlEmbeds

Suggestion

It would be nice to have an additional feature-flag to show or hide images and embeds (i.e. unfurlEmbeds) in comments by default. Currently the hardcoded default is false.

This could also be added as a parameter when calling Coral.createStreamEmbed.

Use Cases

When customizing the looks and behavior of comment streams it would be useful to be able to set the default behavior to automatically show embeds. Especially for Q&A-streams where images are an vital part of both questions and answers.

losowsky commented 3 months ago

Thanks for this suggestion. Adding a configurable option for GIF/YouTube/X embeds is an interesting idea. I'm intrigued to know who else here would find this valuable.

losowsky commented 3 months ago

Also just fyi, here's why we keep it off by default: autoloading images from third parties is a very bad experience for people with low data plans, as it forces them into downloading potentially large amounts of data without their consent. It also slows down the performance/loading of the stream for everyone, as all the third party images/videos are being called.

antonborgstrom commented 3 months ago

Thanks for the reply! Yes, I understand the reason and think it should continue to be false by default. But it would be valuable to be able to change the default in some cases where we for instance explicitly ask readers to contribute with their images. Or when editors use the stream to report live from news events.

losowsky commented 3 months ago

Oh I see - are you suggesting it’s configurable for a single article?

Also, because of the moderation challenges, we don’t currently include image uploads, though readers/journalists can always use third parties for image storage, is that how you do it?

antonborgstrom commented 3 months ago

Preferably it would be configurable both for single articles when calling Coral.createStreamEmbed and for setting a general default through a feature flag. But for our needs per article would be enough.

We hide the option to include image uploads for regular users and only display the button for moderators and staff (i.e journalists). For those staff users we also add a link above the coral stream that opens a modal with an external (password protected) service to upload images to a public bucket.

losowsky commented 3 months ago

That’s interesting - can you share a link to an example of the public callout? You can email coralsupport@voxmedia.com if you prefer not to share publicly 

antonborgstrom commented 2 months ago

We are not live with this feature just yet, but are planning to use Coral to enable live reporting, with pre-moderation enabled for everyone except staff users and with custom CSS to style staff comments as in attached screenshot.

We are also adding some minor custom javascript to hide the "embed image"-field and others for regular users: Skärmavbild 2024-05-23 kl  14 53 36

For staff users there are additional links to upload images through external service and to administrate the stream: Skärmavbild 2024-05-23 kl  14 53 47

antonborgstrom commented 1 month ago

@losowsky as mentioned, this feature would perhaps be best implemented in the Coral.createStreamEmbed function, to be able to control whether to show images on a per article bassis. Maybe this wouldn't be as complicated to implement as well?

losowsky commented 1 month ago

Thanks! It means touching a lot of pieces but it should be doable. We've added to our backlog to look at some time in the next few weeks. More soon!