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

Mastodon and bluesky to user profiles #1696

Merged

Conversation

aaerhart
Copy link
Collaborator

@aaerhart aaerhart commented Feb 5, 2025

Summary

Mastodon and Bluesky added as user profile features; users can add their urls for their accounts for those two platforms.

Known issues

Unknown if images display due to general image bug in the codebase. If they do, size might need to be adjusted.

Steps to test/reproduce

Check if the two platforms are mentioned in the edit profile

Copy link

vercel bot commented Feb 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
maple-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2025 1:04am

Copy link
Collaborator

@Mephistic Mephistic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good - just a few small comments to address and we should be ready to merge!

label={t("socialLinks.bluesky")}
defaultValue={social?.blueSky}
className="col-sm-12 col-md-6 mb-1"
iconSrc="./bluesky.svg"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the images issue here is related to the path:

  • We currently have two images each for Facebook/Twitter/LinkedIn, one at public/facebook.svg and another at public/images/facebook.svg.
  • The root of the image path for these components is public/, so these components are trying to get public/bluesky.svg when we only added public/images/bluesky.svg in the PR.
  • This will still work for Facebook/Twitter/etc. because they also have an image under just public/, so it seems inconsistent
  • To make this load consistently, we should just move the bluesky.svg/mastodon.svg out of public/images/ to public/

@@ -7,6 +7,15 @@ export function cleanSocialLinks(network: keyof SocialLinks, link: string) {
const index: number = path.indexOf(".com/") + 5
path = path.substring(index)
}
if (
network === "mastodon" &&
path.substring(path.indexOf("@") + 1).charAt(0) === "@"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This might be a bit easier to read as:

if (network === "mastodon" && path.startsWith("@")) {
  path = path.substring(1)
}

@mertbagt mertbagt merged commit a77ae69 into codeforboston:main Feb 12, 2025
7 checks passed
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.

3 participants