Repository navigation
feat(contacts): support pronouns property #5639
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -362,6 +362,16 @@ const properties = { | |
| ], | ||
| primary: false, | ||
| }, | ||
| pronouns: { | ||
| multiple: true, | ||
| readableName: t('contacts', 'Pronouns'), | ||
| icon: 'icon-gender', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This icon is already used for gender, @kra-mo , @nimishavijay (as vacation replacement) any recommendation on icon choice ? |
||
| force: 'text', | ||
| defaultValue: { | ||
| value: '', | ||
| }, | ||
| primary: false, | ||
| }, | ||
| tz: { | ||
| readableName: t('contacts', 'Time zone'), | ||
| force: 'select', | ||
|
|
@@ -420,6 +430,7 @@ const fieldOrder = [ | |
| 'x-phonetic-first-name', | ||
| 'x-phonetic-last-name', | ||
| 'gender', | ||
| 'pronouns', | ||
| 'cloud', | ||
| 'impp', | ||
| 'geo', | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |||||||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||||||||
| */ | ||||||||
|
|
||||||||
| import Contact from '../../../src/models/contact' | ||||||||
| import Contact, { MinimalContactProperties } from '../../../src/models/contact' | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
|
||||||||
| const getPropertyLines = (property, vcard) => { | ||||||||
| return vcard.match(new RegExp(`^${property}[;:].*`, 'gmi')) | ||||||||
|
|
@@ -62,6 +62,10 @@ describe('Test stripping quotes from TYPE', () => { | |||||||
| expect(contactWithEmails.hasEmail('third@example.com')).toBe(false) | ||||||||
| }) | ||||||||
|
|
||||||||
| test('Test pronouns are included in the lightweight property list', () => { | ||||||||
| expect(MinimalContactProperties).toContain('PRONOUNS') | ||||||||
| }) | ||||||||
|
|
||||||||
|
Comment on lines
+65
to
+68
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| test('Test stripping quotes from MULTIPLE SPLIT TYPES and MULTIPLE PROPERTIES', () => { | ||||||||
| const property2 = contact.vCard.addPropertyWithValue('TEl', '+99 876 543 210') | ||||||||
| property.setParameter('type', ['WORK,VOICE']) | ||||||||
|
|
||||||||
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 this line should be dropped. we don't want to search on Pronoun