Problem
Some properties have structured values with multiple components. Currently, these are treated as simple strings which may not correctly update all components.
Examples
VCARD.N (Name)
Format: Family;Given;Additional;Prefix;Suffix
N:Doe;John;Michael;Dr.;Jr.
VCARD.ADR (Address)
Format: ;;Street;City;Region;PostalCode;Country
ADR;TYPE=WORK:;;123 Main St;Berlin;;10115;Germany
Current Behavior
// May not handle structure correctly
updateFields(vcard, {
'N': 'Smith;Jane' // Missing components
});
Desired Behavior
// Option 1: Accept full structured string
updateFields(vcard, {
'N': 'Smith;Jane;Marie;;'
});
// Option 2: Accept object (more complex)
updateFields(vcard, {
'N': {
family: 'Smith',
given: 'Jane',
additional: 'Marie'
}
});
Philosophy Conflict
Option 2 adds semantic understanding which conflicts with field-agnostic approach. Option 1 keeps it simple but requires user to understand structure.
Workaround
Provide full structured value as string:
// User must know the format
updateFields(vcard, {
'N': 'Smith;Jane;Marie;;', // Family;Given;Additional;Prefix;Suffix
'ADR': ';;123 Main St;Berlin;;10115;Germany'
});
Recommendation
Document the structure in README, keep implementation simple. Users who need structured editing can use ical.js directly.
Related
- RFC 6350 Section 6.2.2 (N)
- RFC 6350 Section 6.3.1 (ADR)
- RFC 6350 Section 3.3 (Value Data Types)
Problem
Some properties have structured values with multiple components. Currently, these are treated as simple strings which may not correctly update all components.
Examples
VCARD.N (Name)
Format: Family;Given;Additional;Prefix;Suffix
VCARD.ADR (Address)
Format: ;;Street;City;Region;PostalCode;Country
Current Behavior
Desired Behavior
Philosophy Conflict
Option 2 adds semantic understanding which conflicts with field-agnostic approach. Option 1 keeps it simple but requires user to understand structure.
Workaround
Provide full structured value as string:
Recommendation
Document the structure in README, keep implementation simple. Users who need structured editing can use ical.js directly.
Related