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

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

Open
antonborgstrom opened this issue May 3, 2024 · 7 comments
Open

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

antonborgstrom opened this issue May 3, 2024 · 7 comments

Comments

@antonborgstrom
Copy link

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
Copy link
Member

losowsky commented May 3, 2024

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
Copy link
Member

losowsky commented May 4, 2024

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
Copy link
Author

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
Copy link
Member

losowsky commented May 6, 2024 via email

@antonborgstrom
Copy link
Author

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
Copy link
Member

losowsky commented May 7, 2024 via email

@antonborgstrom
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants