[openstreetmap/openstreetmap-website] Make share buttons use Bootstrap icons (PR #6738)

Tom Hughes notifications at github.com
Sun Jan 25 09:44:08 UTC 2026


@tomhughes commented on this pull request.

Other than the one comment I've made this looks very nice.

> -      "mailto:?subject=#{title}&body=#{url}"
-    when :x
-      "https://x.com/intent/tweet?url=#{url}&text=#{title}"
-    when :linkedin
-      "https://www.linkedin.com/sharing/share-offsite/?url=#{url}"
-    when :facebook
-      "https://www.facebook.com/sharer/sharer.php?u=#{url}&t=#{title}"
-    when :mastodon
-      "https://mastodonshare.com/?text=#{title}&url=#{url}"
-    when :telegram
-      "https://t.me/share/url?url=#{url}&text=#{title}"
-    when :bluesky
-      "https://bsky.app/intent/compose?text=#{title}+#{url}"
-    else
-      raise ArgumentError, "Unsupported platform: #{platform}"
+        link_to tag.i(:class => "bi bi-#{share[:icon] || share[:site]}", :aria => { :label => I18n.t("application.share.#{share[:site]}.alt") }), share_url, link_options

I think this would be easier to read if we kept the icon creation split from the link as it was before?

```suggestion
        link_to share_url, link_options do
          tag.i(:class => "bi bi-#{share[:icon] || share[:site]}", :aria => { :label => I18n.t("application.share.#{share[:site]}.alt") })
        end
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6738#pullrequestreview-3703582763
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6738/review/3703582763 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260125/59678f00/attachment.htm>


More information about the rails-dev mailing list