Skip to content

Airtable: ensure there is only one protocol when sync email/phone fields#364

Merged
triozer merged 4 commits intomainfrom
feature/airtable/strip-link-protocol
Aug 5, 2025
Merged

Airtable: ensure there is only one protocol when sync email/phone fields#364
triozer merged 4 commits intomainfrom
feature/airtable/strip-link-protocol

Conversation

@triozer
Copy link
Copy Markdown
Member

@triozer triozer commented Aug 5, 2025

Description

This pull request adds unit tests for the Airtable plugin's email and phone number field processing. It improves the handling of mailto: and tel: prefixes by normalizing them to ensure proper formatting regardless of input format. The implementation now correctly handles:

  • Adding appropriate prefixes when missing
  • Preserving single prefixes
  • Normalizing multiple prefixes to a single one
  • Supporting case-insensitive prefixes
  • Detecting email and phone formats via regex

The PR also sets up the testing infrastructure with Vitest and Happy-DOM for the Airtable plugin.

See https://framer-team.slack.com/archives/C06L5H5ADK2/p1754387147011229

QA

  • Email field processing
    • Verify mailto: prefix is added to emails without prefix
    • Verify single mailto: prefix is preserved
    • Verify multiple mailto: prefixes are normalized to one
    • Verify case-insensitive mailto: prefix handling works
    • Verify email detection by regex works for non-email field types
  • Phone field processing
    • Verify tel: prefix is added to phone numbers without prefix
    • Verify single tel: prefix is preserved
    • Verify multiple tel: prefixes are normalized to one
    • Verify case-insensitive tel: prefix handling works
    • Verify phone detection by regex works for non-phone field types

Copy link
Copy Markdown
Member Author

triozer commented Aug 5, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@triozer triozer requested a review from kaloyanvi August 5, 2025 10:49
@triozer triozer marked this pull request as ready for review August 5, 2025 10:50
@triozer triozer force-pushed the feature/airtable/strip-link-protocol branch from 6c41d70 to 3cc03e4 Compare August 5, 2025 10:51
Comment thread plugins/airtable/src/data.ts Outdated
Comment thread plugins/airtable/src/data.test.ts
@triozer triozer force-pushed the feature/airtable/strip-link-protocol branch from 0206a10 to c0e1fb6 Compare August 5, 2025 11:13
@triozer triozer changed the title Add tests for email and phone link formatting in Airtable plugin Strip protocols from link when importing email/phone from Airtable Aug 5, 2025
@triozer triozer changed the title Strip protocols from link when importing email/phone from Airtable Airtable: strip protocols from link when importing email/phone Aug 5, 2025
@triozer triozer changed the title Airtable: strip protocols from link when importing email/phone Airtable: ensure there is only one protocol when sync email/phone fields Aug 5, 2025
@triozer triozer requested a review from kaloyanvi August 5, 2025 11:24
Copy link
Copy Markdown
Collaborator

@kaloyanvi kaloyanvi left a comment

Choose a reason for hiding this comment

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

LGTM

@triozer triozer added this pull request to the merge queue Aug 5, 2025
Merged via the queue into main with commit 2f0b052 Aug 5, 2025
11 of 12 checks passed
@triozer triozer deleted the feature/airtable/strip-link-protocol branch August 5, 2025 16:21
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.

2 participants