Intent to deprecate and remove: PaymentAddress.careOf

146টি ভিউ
প্রথম অপঠিত মেসেজটিতে চলে আসুন

Jinho Bang

পড়া হয়নি,
১৮ সেপ্টেম্বর, ২০১৬ ১০:০৯:১১ AM১৮/৯/১৬
প্রাপক blink-dev

Primary eng (and PM emails)

jinho...@samsung.com, rou...@chromium.org


Summary

The attribute was removed from the payment request API spec.


Motivation

The PaymentAddress interface has a careOf field which is non-standard (no well-known address

standards support it, see below). The careOf field is unnecessary, the recipient and organization fields

sufficiently support all necessary use cases. Adding careOf poses significant issues in terms of

interoperability with existing postal address schemas and APIs.

(From spec discussion: https://github.com/w3c/browser-payment-api/issues/244)


Compatibility Risk

Low; Chrome 53 for android is a first browser to support the payment request.

(It was release two days ago.)

User and JS author can’t handle the attribute anyway because current implementation doesn't provide

any UI to set the attribute yet.


Alternative implementation suggestion for web developers

Unnecessary;

Current implementation doesn't provide any UI for inputting the attribute.


Usage information from UseCounter

There is no public UseCounter but Chrome 53 for android(including PaymentRequest API) was

release on 09/16. Also, user and JS author can’t handle the attribute anyway because current

implementation doesn't provide any UI to set the attribute yet.


OWP launch tracking bug

http://crbug.com/648049


Entry on the faeture dashboard

https://www.chromestatus.com/features/5639348045217792


Requesting approval to remove too?

Yes

Philip Jägenstedt

পড়া হয়নি,
১৯ সেপ্টেম্বর, ২০১৬ ৪:৪৩:১৫ AM১৯/৯/১৬
প্রাপক Jinho Bang,blink-dev
The attribute is mentioned in the Payment Request API integration guide, can you get in touch with the right people to make sure it's removed from there and any other documentation that might mention it?

BTW, that the toDict helper is needed at all seems weird, is it a workaround for the fact that Blink's PaymentAddress.idl is missing serializer = {attribute}? PaymentResponse is also missing it.

I took a look in cs.chromium.org, but it's not clear to me how PaymentAddress is populated. Is "any UI for inputting the attribute" the only way it could be non-empty? If so I think removal without deprecation makes sense given how new it is, but an example of how PaymentAddress would be used in the wild would be nice.

Jinho Bang

পড়া হয়নি,
১৯ সেপ্টেম্বর, ২০১৬ ৬:৫১:২০ AM১৯/৯/১৬
প্রাপক blink-dev,jinho...@samsung.com


2016년 9월 19일 월요일 오후 5시 43분 15초 UTC+9, Philip Jägenstedt 님의 말:
The attribute is mentioned in the Payment Request API integration guide, can you get in touch with the right people to make sure it's removed from there and any other documentation that might mention it?

zkoch@ is one of the authors. I'll request it to him.
 

BTW, that the toDict helper is needed at all seems weird, is it a workaround for the fact that Blink's PaymentAddress.idl is missing serializer = {attribute}? PaymentResponse is also missing it.

The serializer was added to the spec three days ago.
Also, I already started to work on this yesterday. (WIP CL: https://codereview.chromium.org/2349133002)
 

I took a look in cs.chromium.org, but it's not clear to me how PaymentAddress is populated. Is "any UI for inputting the attribute" the only way it could be non-empty? If so I think removal without deprecation makes sense given how new it is, but an example of how PaymentAddress would be used in the wild would be nice.

Exactly. "any UI for inputting the attribute" is the only way it could be non-empty.
I can't show you any example in code level because there is no way to populate PaymentAddress.

Instead I'll explain the payment request process in code level.

// create payment request
var pr = new PaymentRequest(..., ..., { requestShipping: true });

// Show payment sheet UI and then collect some information for payment. (e.g. address, card number and so on)
var uiPromise = pr.show();

// If the UI is closed, uiPromise will be resolved with PaymentResponse.
// The response has non-null shippingAddress attribute if requestShipping is true.
// The shippingAddress is only populated from the user input at UI.
// There is no way to create PaymentAddress object in code level.
uiPromise.then((response) => {
    // Currently, Chrome doesn't support any input field for 'careOf' attribute on AddressEditor UI.
    // So, response.shippingAddress.careOf is always empty string.
    assert response.shippingAddress.careOf == "";
});

Philip Jägenstedt

পড়া হয়নি,
১৯ সেপ্টেম্বর, ২০১৬ ৭:০৪:৩৮ AM১৯/৯/১৬
প্রাপক Jinho Bang,blink-dev
Thanks Jinho for taking care of all that, the code example was helpful.

Given that the attribute is always empty, would there be any harm in deprecating now and removing in M56? For anyone who has copied from the article, that might save them the effort of later understanding why { careOf: undefined } is in their dict.

I'm also curious if there are any other attributes on PaymentAddress which are always empty?

PhistucK

পড়া হয়নি,
১৯ সেপ্টেম্বর, ২০১৬ ৯:৫৬:১৭ AM১৯/৯/১৬
প্রাপক Philip Jägenstedt,Jinho Bang,blink-dev


PhistucK

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Rouslan Solomakhin

পড়া হয়নি,
১৯ সেপ্টেম্বর, ২০১৬ ১১:২৬:০৫ AM১৯/৯/১৬
প্রাপক blink-dev,jinho...@samsung.com
On Monday, September 19, 2016 at 12:04:38 PM UTC+1, Philip Jägenstedt wrote:
I'm also curious if there are any other attributes on PaymentAddress which are always empty?

Nope. 

Philip Jägenstedt

পড়া হয়নি,
১৯ সেপ্টেম্বর, ২০১৬ ১১:৩৬:৪০ AM১৯/৯/১৬
প্রাপক Rouslan Solomakhin,blink-dev,jinho...@samsung.com
Excellent! Any thoughts on the ideal number of deprecation milestones?

Rouslan Solomakhin

পড়া হয়নি,
১৯ সেপ্টেম্বর, ২০১৬ ১১:৪১:৫৪ AM১৯/৯/১৬
প্রাপক Philip Jägenstedt,blink-dev,jinho...@samsung.com
Merchants are in holiday freeze now, so it would be best to avoid such a breaking change until January. Let's start warning about deprecation now (in console log), but actually remove it in January, after the shopping season.

Philip Jägenstedt

পড়া হয়নি,
১৯ সেপ্টেম্বর, ২০১৬ ১২:০৯:২৯ PM১৯/৯/১৬
প্রাপক Rouslan Solomakhin,blink-dev,jinho...@samsung.com
M56 will reach stable at the end of January, does that seem OK, or would it be best if it stays in dev/beta as well until January?

If merchants are extra risk averse now it also seems important that the deprecation message answer the question "is our stuff going to break" as plainly as possible, highlighting that it currently always returns the empty string, and that not using it is the only action required.

Rouslan Solomakhin

পড়া হয়নি,
১৯ সেপ্টেম্বর, ২০১৬ ১২:২০:০০ PM১৯/৯/১৬
প্রাপক Philip Jägenstedt,blink-dev,jinho...@samsung.com
M56 sounds OK.

Chris Harrelson

পড়া হয়নি,
১৯ সেপ্টেম্বর, ২০১৬ ১২:২৪:৩২ PM১৯/৯/১৬
প্রাপক Rouslan Solomakhin,Philip Jägenstedt,blink-dev,Jinho Bang
Ok. LGTM1. It would be nice to merge a deprecation to M53 also.

In addition, please add UseCounters for the overall PaymentRequest API so that in the future we'll have data in hand to make decisions.

M56 sounds OK.

Philip Jägenstedt

পড়া হয়নি,
১৯ সেপ্টেম্বর, ২০১৬ ১২:২৭:৩০ PM১৯/৯/১৬
প্রাপক Rouslan Solomakhin,blink-dev,jinho...@samsung.com
OK, LGTM1 to deprecate now and remove in M56.

TAMURA, Kent

পড়া হয়নি,
১৯ সেপ্টেম্বর, ২০১৬ ৯:৪৯:২৭ PM১৯/৯/১৬
প্রাপক Chris Harrelson,Rouslan Solomakhin,Philip Jägenstedt,blink-dev,Jinho Bang
LGTM3

--
TAMURA Kent
Software Engineer, Google


Rouslan Solomakhin

পড়া হয়নি,
২৭ অক্টোবর, ২০১৬ ১:৪৩:০৫ PM২৭/১০/১৬
প্রাপক blink-dev,chri...@chromium.org,foo...@chromium.org,jinho...@samsung.com
M56 is here. I am starting the removal of the careOf field. Use counters show 3 uses of careOf in the last 28 days. Do we need to remove the UseCounter and the histogram as well?

Philip Jägenstedt

পড়া হয়নি,
২৭ অক্টোবর, ২০১৬ ৩:৪৯:৪৫ PM২৭/১০/১৬
প্রাপক Rouslan Solomakhin,blink-dev,chri...@chromium.org,jinho...@samsung.com
You can remove the entry from UseCounter.h when it's unused. But leave it in histograms.xml, since it may keep getting hits for a long time after removal. (I've never tried removing it, not sure what, if anything, would break.)
সকলকে উত্তর দিন
লেখককে লিখে পাঠান
ফরওয়ার্ড করুন
0টি নতুন মেসেজ