Skip to content

Add additional social media fields to vCard export with X- prefixes per RFC 2426#98

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-37
Draft

Add additional social media fields to vCard export with X- prefixes per RFC 2426#98
Copilot wants to merge 2 commits intomainfrom
copilot/fix-37

Conversation

Copy link

Copilot AI commented Jul 24, 2025

Summary

This PR implements support for exporting all available social media fields in vCard format using proper X- custom field prefixes as specified in RFC 2426.

Changes Made

Core Implementation

  • Extended vCard field support: Added 18 social media fields to vCard export including Twitter, GitHub, Facebook, LinkedIn, Instagram, YouTube, Twitch, and more
  • RFC 2426 compliance: All custom fields use proper X- prefixes (e.g., X-TWITTER:, X-GITHUB:, X-FACEBOOK:)
  • Backward compatibility: Existing vCard functionality remains unchanged

Technical Details

  • Updated VCardFields type to include all social media fields
  • Modified encodeVCardFields function to generate X- prefixed custom fields
  • Extended vCardFieldsFromAppData to include all available social media data
  • Added comprehensive tests to verify proper X- field generation

Files Modified

  • src/model/v-card-url.ts: Core vCard generation logic
  • src/model/v-card-url.test.ts: New tests for vCard field validation
  • cspell.json: Added test data to dictionary

Testing

Automated Tests

  • All existing tests continue to pass
  • New tests verify X- field generation for social media handles
  • Build and linting checks pass successfully

Manual Verification

Successfully tested vCard download with sample data containing all social media fields. The exported vCard properly includes:

BEGIN:VCARD
VERSION:3.0
X-TWITTER:johndoe
X-GITHUB:johndoe
X-FACEBOOK:john.doe
X-LINKEDIN:john-doe
X-INSTAGRAM:johndoe
X-YOUTUBE:johndoe
X-TWITCH:johndoe
X-XING:johndoe
X-PAYPAL:johndoe
X-PATREON:johndoe
X-PINTEREST:johndoe
X-NPM:johndoe
X-SOUNDCLOUD:johndoe
X-SNAPCHAT:johndoe
X-STEAM:johndoe
X-CPAN:johndoe
X-SIGNAL:johndoe
X-TELEGRAM:johndoe
N:John Doe
TITLE:Software Developer
TEL;TYPE=PREF:+1234567890
EMAIL;TYPE=PREF,INTERNET:john@example.com
URL:https://example.com
END:VCARD

Screenshot

vCard Implementation Result

The screenshot shows the Snappy Cards interface displaying all social media fields that are now properly exported in the vCard format.

Impact

  • Enhanced functionality: Users can now export complete contact information including all social media profiles
  • Standards compliance: Follows RFC 2426 specification for custom vCard fields
  • No breaking changes: Existing vCard exports continue to work as before
  • Improved user experience: One-click export of comprehensive contact information

Fixes #37.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: kirkone <15778270+kirkone@users.noreply.github.com>
Copilot AI changed the title [WIP] vCard should contain additional fields Add additional social media fields to vCard export with X- prefixes per RFC 2426 Jul 24, 2025
Copilot AI requested a review from kirkone July 24, 2025 17:43
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.

vCard should contain additional fields

2 participants