[openstreetmap/openstreetmap-website] Alternatives to popup windows for social sharing (Issue #5414)

Emin Kocan notifications at github.com
Wed Dec 18 22:58:41 UTC 2024


Popups were chosen initially, inspired by [rails-social-share-button](https://github.com/Bunlong/rails-social-share-button), which is now deprecated. I didn't thought too much about alternatives at the time. 

To be honest,  I’m not a fan of popups either. Refactoring to open links in new tabs would probably simplify the code and make maintenance easier.

For the other alternatives, using Bootstrap modals with iframes likely won’t work due to CSP restrictions on most websites. While the [Web Share API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Share_API#browser_compatibility) is promising, it’s not yet widely supported.

Opening links in new tabs seems like the cleanest and most maintainable solution in my opinion. I would be eager to do a refactor if there is agreement on the approach. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5414#issuecomment-2552426298
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/5414/2552426298 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241218/aaf1c036/attachment-0001.htm>


More information about the rails-dev mailing list