[openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)
Emin Kocan
notifications at github.com
Sat Jul 13 20:30:11 UTC 2024
### Social Sharing Functionality:
**Description:**
This pull request enhances the social media sharing functionality for diary entries in the OpenStreetMap project, addressing issue #1391. The goal is to provide users with a seamless and reliable way to share their stories on various social media platforms.
#### Changes Made:
- **JavaScript Enhancements:** Added functionality to open share URLs in pop-up windows, ensuring compatibility with various screen sizes and handling pop-up blocking scenarios.
- **Ruby Helper Methods:** Introduced methods to filter and validate allowed social media sites for sharing, with error logging for invalid sites or missing icons.
- **Testing:** Expanded test coverage to ensure the correct rendering of social share buttons and proper functionality under different configurations.
#### Purpose:
The purpose of these changes is to improve the social sharing capabilities of the application, providing a more user-friendly experience. Enhanced error handling and validation aim to increase user engagement and usability for sharing content.
#### Request for Reviews:
I'm looking forward to reviews on this implementation. I aimed to make this feature reusable and intuitive, your suggestions on how to make this better are highly appreciated.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/4985
-- Commit Summary --
* add social sharing functionality
-- File Changes --
A app/assets/images/social_icons/email.svg (4)
A app/assets/images/social_icons/facebook.svg (4)
A app/assets/images/social_icons/linkedin.svg (4)
A app/assets/images/social_icons/mastodon.svg (5)
A app/assets/images/social_icons/telegram.svg (16)
A app/assets/images/social_icons/twitter.svg (4)
A app/assets/javascripts/social_share_button.js (58)
M app/helpers/application_helper.rb (42)
M app/views/diary_entries/_diary_entry.html.erb (10)
A lib/social_share_button_helper.rb (30)
A test/helpers/social_share_button_helper_test.rb (47)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/4985.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4985.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4985
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4985 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240713/fed36961/attachment.htm>
More information about the rails-dev
mailing list