-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Mastodon and bluesky to user profiles #1696
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…b.com/aaerhart/maple into mastodon-and-bluesky-to-user-profiles
There was a problem hiding this 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" |
There was a problem hiding this comment.
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 atpublic/images/facebook.svg
. - The root of the image path for these components is
public/
, so these components are trying to getpublic/bluesky.svg
when we only addedpublic/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 ofpublic/images/
topublic/
components/db/profile/urlCleanup.ts
Outdated
@@ -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) === "@" |
There was a problem hiding this comment.
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)
}
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