owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.37k stars 230 forks source link

enhance(embed): explicitly `allow` share features in iframe snippet #3577

Closed marcelgerber closed 4 months ago

marcelgerber commented 4 months ago

This explicitly requests the web-share and clipboard-write permissions in our default iframe snippet.

If they are not set, two of our most-used Share menu interactions ("Share via OS share sheet" and "Copy URL to clipboard") will not work when in an iframe context. Or, well, the clipboard-write permission is currently only required in Chromium browsers, but that's still a vast majority of users.


If these permissions are not granted, we now do a pretty nice feature & permission detection, and will not display the Share menu items which are not working.

owidbot commented 4 months ago
Quick links (staging server): Site Admin Wizard

Login: ssh owid@staging-site-iframe-allow

SVG tester: Number of differences (default views): 0 Number of differences (all views): 0

Edited: 2024-05-06 09:49:06 UTC Execution time: 1.16 seconds