Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Reddit share button to SocialShare component #374

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AkshitLakhera
Copy link

@AkshitLakhera AkshitLakhera commented Sep 23, 2024

Description

This PR adds a Reddit share button to the SocialShare component, allowing users to share content on Reddit alongside other social media platforms.

Changes Made

  • Imported the Reddit icon from react-icons
  • Updated SocialShareProps interface to include a reddit prop
  • Added a new RedditLink component
  • Integrated the Reddit share button into the main SocialShare component
  • Set the default value for the reddit prop to true

Related Issue

Fixes #317

Screenshots

Screenshot from 2024-09-23 13-00-44

Testing Steps

  1. Clone the branch
  2. Run npm install
  3. Start the development server
  4. Navigate to a page with the SocialShare component
  5. Verify that the Reddit share button appears and functions correctly

Additional Notes

This change improves the sharing capabilities of our platform by including one of the most popular social media sites, Reddit.

Checklist

  • I have read the CONTRIBUTING document
  • My code follows the code style of this project
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have checked that there aren't other open Pull Requests for the same update/change
  • My changes generate no new warnings
  • I have linked this PR to an open issue

Copy link

netlify bot commented Sep 23, 2024

Deploy Preview for opensauced-landing failed. Why did it fail? →

Name Link
🔨 Latest commit 548c67a
🔍 Latest deploy log https://app.netlify.com/sites/opensauced-landing/deploys/66fa251ad43ead00080f1fcd

@BekahHW
Copy link
Member

BekahHW commented Sep 23, 2024

Is it possible to autopopulate the link url with the blog post link? This is what I currently see:

image

This is what I would like to see:

image

@nickytonline
Copy link
Member

I haven't dug too much, but this appears to be the way to share a link to reddit, https://www.reddit.com/r/web_design/submit?url=https://example.com&title=Lorem%20ipsum. I tried with encoded and decoded URLs for the url querystring value, but no luck. Only the titlw populates @AkshitLakhera. I'm sure if you do a bit of digging, there is probably and updated URL oe way of doing this so the URL populates.

@AkshitLakhera
Copy link
Author

I haven't dug too much, but this appears to be the way to share a link to reddit, https://www.reddit.com/r/web_design/submit?url=https://example.com&title=Lorem%20ipsum. I tried with encoded and decoded URLs for the url querystring value, but no luck. Only the titlw populates @AkshitLakhera. I'm sure if you do a bit of digging, there is probably and updated URL oe way of doing this so the URL populates.

Thank you for the feedback. I noticed the same issue where the title populates correctly, but the URL doesn’t. I’m currently exploring alternative methods to ensure the URL auto-populates as intended. Once I find a reliable solution, I’ll push the update. I appreciate your patience, and I’ll keep you posted!

@AkshitLakhera
Copy link
Author

Is it possible to autopopulate the link url with the blog post link? This is what I currently see:
image

This is what I would like to see:
image

Hello @BekahHW ,

I have successfully implemented the Reddit share button in the SocialShare component, with title auto-population working as expected. However, after exploring several methods, Reddit restricts URL auto-population during submission.

Given this limitation, I wanted to check if there are any recommended workarounds or suggestions for handling this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Reddit share button to blog
3 participants