Bug 216793 - [Contact Picker API] Introduce bindings for the Contact Picker API
Summary: [Contact Picker API] Introduce bindings for the Contact Picker API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aditya Keerthi
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-21 12:02 PDT by Aditya Keerthi
Modified: 2020-10-05 13:06 PDT (History)
18 users (show)

See Also:


Attachments
Patch (46.13 KB, patch)
2020-09-21 12:20 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch (46.13 KB, patch)
2020-09-21 12:22 PDT, Aditya Keerthi
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (46.15 KB, patch)
2020-09-21 12:43 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch (54.15 KB, patch)
2020-09-21 15:22 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch (61.08 KB, patch)
2020-09-22 07:46 PDT, Aditya Keerthi
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (60.88 KB, patch)
2020-09-22 08:51 PDT, Aditya Keerthi
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Attempt Windows fix (62.01 KB, patch)
2020-09-22 10:01 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch (62.02 KB, patch)
2020-09-22 12:40 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch (60.43 KB, patch)
2020-09-23 08:29 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch (68.58 KB, patch)
2020-10-02 14:11 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aditya Keerthi 2020-09-21 12:02:17 PDT
Work towards implementing the Contact Picker API.
Comment 1 Aditya Keerthi 2020-09-21 12:03:59 PDT
<rdar://problem/69317957>
Comment 2 Aditya Keerthi 2020-09-21 12:20:23 PDT
Created attachment 409296 [details]
Patch
Comment 3 Aditya Keerthi 2020-09-21 12:22:27 PDT
Created attachment 409298 [details]
Patch
Comment 4 Aditya Keerthi 2020-09-21 12:43:26 PDT
Created attachment 409301 [details]
Patch
Comment 5 Aditya Keerthi 2020-09-21 15:22:20 PDT
Created attachment 409328 [details]
Patch
Comment 6 Aditya Keerthi 2020-09-22 07:46:33 PDT
Created attachment 409359 [details]
Patch
Comment 7 Aditya Keerthi 2020-09-22 08:51:57 PDT
Created attachment 409364 [details]
Patch
Comment 8 Aditya Keerthi 2020-09-22 10:01:45 PDT
Created attachment 409373 [details]
Attempt Windows fix
Comment 9 Aditya Keerthi 2020-09-22 12:40:55 PDT
Created attachment 409391 [details]
Patch
Comment 10 Aditya Keerthi 2020-09-23 08:29:55 PDT
Created attachment 409476 [details]
Patch
Comment 11 Aditya Keerthi 2020-10-02 14:11:57 PDT
Created attachment 410369 [details]
Patch
Comment 12 Wenson Hsieh 2020-10-02 15:55:52 PDT
Comment on attachment 410369 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=410369&action=review

Looks good overall! I think we might need a clean build for Win EWS though.

> LayoutTests/contact-picker/contacts-interfaces.html:22
> +            shouldBeTrue("navigator.contacts.select(['name', 'email'], {multiple: true}) instanceof Promise");

I think it would be nice to test a few additional corner cases, like calling select with some strings that don’t map to enum values, or even non-strings, or an empty array, or passing in invalid ContactsSelectOptions.
Comment 13 Aditya Keerthi 2020-10-02 19:55:56 PDT
(In reply to Wenson Hsieh from comment #12)
> Comment on attachment 410369 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=410369&action=review
> 
> Looks good overall! I think we might need a clean build for Win EWS though.

There's no longer a way to force clean builds (the "[clean-build]" functionality was removed). However, I did verify that a clean build passes on Win EWS – see the most recent obsoleted patch for proof.
 
> > LayoutTests/contact-picker/contacts-interfaces.html:22
> > +            shouldBeTrue("navigator.contacts.select(['name', 'email'], {multiple: true}) instanceof Promise");
> 
> I think it would be nice to test a few additional corner cases, like calling
> select with some strings that don’t map to enum values, or even non-strings,
> or an empty array, or passing in invalid ContactsSelectOptions.

I was planning on adding those tests along with the full implementation of ContactsManager.select() if that's alright?
Comment 14 Wenson Hsieh 2020-10-02 21:16:38 PDT
Comment on attachment 410369 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=410369&action=review

>>> LayoutTests/contact-picker/contacts-interfaces.html:22
>>> +            shouldBeTrue("navigator.contacts.select(['name', 'email'], {multiple: true}) instanceof Promise");
>> 
>> I think it would be nice to test a few additional corner cases, like calling select with some strings that don’t map to enum values, or even non-strings, or an empty array, or passing in invalid ContactsSelectOptions.
> 
> I was planning on adding those tests along with the full implementation of ContactsManager.select() if that's alright?

Sounds good.
Comment 15 Aditya Keerthi 2020-10-05 11:41:47 PDT
Note: This will require a clean build on Windows bots once landed.
Comment 16 EWS 2020-10-05 11:56:18 PDT
Committed r267988: <https://trac.webkit.org/changeset/267988>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 410369 [details].