-
Notifications
You must be signed in to change notification settings - Fork 290
feat: Flexible Social Links - Phase 2 Frontend Implementation #5262
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
Merged
+897
−972
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adds support for user profile social platforms to the platform detection utility: New platforms: - Threads (threads.net) - Bluesky (bsky.app) - Mastodon (common instances + URL pattern detection for /@username) - Roadmap (roadmap.sh) - CodePen (codepen.io) - Reddit (reddit.com) - Hashnode (hashnode.com, hashnode.dev) Also adds corresponding SocialMediaType enum values for the new platforms. Closes ENG-251
Updates TypeScript interfaces and GraphQL queries to support the new socialLinks array field: - Add UserSocialLink interface (platform, url) - Add socialLinks field to PublicProfile and UserProfile interfaces - Add socialLinks to USER_BY_ID_STATIC_FIELDS_QUERY - Add socialLinks to UPDATE_USER_PROFILE_MUTATION response - Add socialLinks to UPDATE_USER_INFO_MUTATION response - Mark individual social fields as @deprecated Legacy fields kept for backwards compatibility during migration. Closes ENG-252
Updates AboutMe components to render social links from the new array structure: - Add PLATFORM_CONFIG mapping for icons and labels - Add mapSocialLinksToDisplay() for converting socialLinks to display format - Add buildLegacySocialLinks() as deprecated fallback for legacy fields - Prefer user.socialLinks when available, fall back to legacy fields - Support all 13 platforms with proper icons - Unknown platforms fall back to generic LinkIcon Backwards compatible: existing users without socialLinks populated will still see their links from legacy fields. Closes ENG-253
Replace 13 individual social media input fields with a unified SocialLinksInput component that uses URL-based platform auto-detection. - Add SocialLinksInput component with platform detection and visual feedback - Update useUserInfoForm hook to manage socialLinks array - Update Profile settings page to use new SocialLinksInput - Add backwards compatibility for users with legacy individual fields
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
omBratteng
reviewed
Jan 8, 2026
omBratteng
reviewed
Jan 8, 2026
packages/shared/src/features/profile/components/ProfileWidgets/AboutMe.tsx
Outdated
Show resolved
Hide resolved
omBratteng
reviewed
Jan 8, 2026
Member
Author
|
@omBratteng haven't reviewed it yet. hence it's draft. there could be some hallucinations here |
- Create socialLink.tsx with shared PLATFORM_LABELS, PLATFORM_ICONS, and helper functions - Add SocialPlatform type for exhaustive type checking on platform configurations - Refactor SocialLinksInput, AboutMe components, and useUserInfoForm to use shared utilities - Add missing social media icons to jobs page SocialMediaIconMap - Reduce code duplication by ~400 lines across components
- Create generic platform system (platforms.tsx) with shared core and context-specific extensions for org/user profiles - Refactor socialLink.tsx and platformDetection.tsx to use generic platform system - Remove unused AboutMe widget component and spec file (dead code) - Add toast notifications for better user feedback in SocialLinksInput - Add code review guidelines to AGENTS.md for dead code cleanup
The settings page was showing different social links than the profile page because it relied on boot endpoint data which doesn't include socialLinks. Now fetches the full profile via GraphQL to ensure consistency with the public profile page.
Remove all legacy individual social link fields (twitter, github, linkedin, portfolio, youtube, stackoverflow, reddit, roadmap, codepen, mastodon, bluesky, threads, hashnode) in favor of the flexible socialLinks array. Changes: - Remove legacy field fallback logic from socialLink.tsx - Remove deprecated fields from PublicProfile and UserProfile interfaces - Remove legacy fields from GraphQL queries/mutations - Update ProfileLayout to extract Twitter handle from socialLinks - Update recruiter page to use socialLinks for LinkedIn - Remove Twitter field from registration forms - Simplify useProfileForm and useUserInfoForm (legacy social validation) - Update AboutMe tests to use socialLinks array format
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements Phase 2 of the Flexible Social Media Links refactor on the frontend. It replaces the 13 individual social media input fields with a unified, flexible
socialLinksarray that supports auto-detection of platforms from URLs.Changes
SocialLinksInputcomponent - Single URL input with platform auto-detection and visual feedback ("GitHub detected ✓")useUserInfoFormhook - ManagessocialLinksarray with backwards compatibility for legacy fieldsAboutMecomponents prefersocialLinksarray with fallback to legacy fieldsUserSocialLinktype andsocialLinksfield to user interfacessocialLinks { platform url }to relevant queriesRelated Issues
Test plan
Preview domain
https://flexible-links-phase-2.preview.app.daily.dev