This PR addresses "Please make contact information fields, how to contact the user, email address, telegrams, various social networks https://www.openstreetmap.org" issue mentioned in the https://github.com/openstreetmap/openstreetmap-website/issues/2245
### Description This PR adds: - DB: Social links table, which contains social links added by the user - Model: Parser to differentiate different kind of websites - Controller: Logic for CRUD operations for social links - View: Functionality to show, edit, add and delete social links - JS: Was only used for adding and removing fields on the user side when they interact to the social links fields Currently parser parses these websites and adds their icons which are taken from Bootstrap-Icons: - Discord - Facebook - Github - Gitlab - Instagram - Linkedin - Line - Mastodon - Medium - Quora - Reddit - Skype - Slack - Snapchat - Stack Overflow - Strava - Substack - Telegram - Threads - Tik-Tok - Twitch - X (Twitter) - Vimeo - WhatsApp - YouTube Discord, Line, Skype and Slack doesn't show username in the URL. To avoid showing some Id numbers on the profile page, for these cases instead of the Id only the name of the application is shown. Applications other than those mentioned in the list show their URL on the profile page and have general web icon (globe icon). If there is an idea that some of them should be removed or others should be added, feel free to share recommendations. Parser was done in the Ruby to avoid adding more JS client-side logic to the website. If it is preferable, it can be moved to JS. ### How has this been tested? There are validation and functional tests written to test the functionality. In addition to this, different kind of manual testing was done to ensure that all the icons, errors, fields and etc. were displayed correctly. ### Screenshots Logged out: ![image](https://github.com/user-attachments/assets/cbd7bb83-5363-463b-bbad-92695394fb77) ![image](https://github.com/user-attachments/assets/2254be01-be15-4c2a-a530-2e0617ad6638) Logged in: ![image](https://github.com/user-attachments/assets/c183b9b3-50e0-4ce7-888b-7a0228fc0547) Edit Profile page: ![image](https://github.com/user-attachments/assets/f7c14102-0d3f-4685-a243-1281ae9c8751) ![image](https://github.com/user-attachments/assets/aaf61af9-c3b2-4f7c-9118-3339dcbda6f3) You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5439 -- Commit Summary -- * Add social profile links -- File Changes -- A app/assets/images/social_icons/discord.svg (3) A app/assets/images/social_icons/facebook.svg (3) A app/assets/images/social_icons/github.svg (3) A app/assets/images/social_icons/gitlab.svg (3) A app/assets/images/social_icons/instagram.svg (3) A app/assets/images/social_icons/line.svg (3) A app/assets/images/social_icons/linkedin.svg (3) A app/assets/images/social_icons/mastodon.svg (3) A app/assets/images/social_icons/medium.svg (3) A app/assets/images/social_icons/other.svg (3) A app/assets/images/social_icons/quora.svg (3) A app/assets/images/social_icons/reddit.svg (4) A app/assets/images/social_icons/skype.svg (3) A app/assets/images/social_icons/slack.svg (3) A app/assets/images/social_icons/snapchat.svg (3) A app/assets/images/social_icons/stackoverflow.svg (4) A app/assets/images/social_icons/strava.svg (3) A app/assets/images/social_icons/substack.svg (3) A app/assets/images/social_icons/telegram.svg (3) A app/assets/images/social_icons/threads.svg (3) A app/assets/images/social_icons/tiktok.svg (3) A app/assets/images/social_icons/twitch.svg (4) A app/assets/images/social_icons/twitter_x.svg (3) A app/assets/images/social_icons/vimeo.svg (3) A app/assets/images/social_icons/whatsapp.svg (3) A app/assets/images/social_icons/youtube.svg (3) M app/assets/javascripts/user.js (23) M app/controllers/profiles_controller.rb (3) A app/models/social_link.rb (48) M app/models/user.rb (3) M app/views/profiles/edit.html.erb (15) A app/views/social_links/_show.html.erb (8) M app/views/users/show.html.erb (17) M config/locales/en.yml (8) A db/migrate/20241128070750_create_social_links.rb (10) M db/structure.sql (63) M test/controllers/profiles_controller_test.rb (9) A test/factories/social_link.rb (6) A test/models/social_link_test.rb (49) -- Patch Links -- https://github.com/openstreetmap/openstreetmap-website/pull/5439.patch https://github.com/openstreetmap/openstreetmap-website/pull/5439.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439 You are receiving this because you are subscribed to this thread. Message ID: <openstreetmap/openstreetmap-website/pull/5...@github.com>
_______________________________________________ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev