Re: [w3c/payment-request] add redactList for PaymentAddress (Part 1) (#654)

domenic requested changes on this pull request.

Sorry, a crucial step still seems unclear to me (determining redactList).

>        <h2>
-        <dfn>PaymentAddress</dfn> interface
+        Physical Addresses

Section titles seem to use "Sentence case" so far, not "Title Case"

>          </p>
-        <ol data-link-for="PaymentAddress">
-          <li>Let <var>address</var> be a new instance of
-          <a>PaymentAddress</a>.
-          </li>
-          <li>Set <var>address</var>.<a>[[\addressLine]]</a> to the result of
-          splitting the user-provided address line into a <a data-cite=
+        <section>
+          <h2>
+            Internal Constructor

Lowercase "constructor"

> +                is false, throw a <a>RangeError</a> exception.
+                </li>
+                <li>Set <var>address</var>.<a>[[\languageCode]]</a> to
+                <a data-cite=
+                "ecma-402#sec-canonicalizelanguagetag">CanonicalizeLanguageTag</a>(<var>details</var>["<a>languageCode</a>"]).
+                </li>
+              </ol>
+            </li>
+            <li>Let <var>cleanAddressLines</var> be an emtpy list.
+            </li>
+            <li>If <var>details</var>["<a>addressLine</a>"] is present, then
+            for each <var>item</var> in
+            <var>details</var>["<a>addressLine</a>"]:
+              <ol>
+                <li>
+                  <a>strip leading and trailing ASCII whitespace</a> from

Uppercase "s"

> +                <li>Set <var>address</var>.<a>[[\languageCode]]</a> to
+                <a data-cite=
+                "ecma-402#sec-canonicalizelanguagetag">CanonicalizeLanguageTag</a>(<var>details</var>["<a>languageCode</a>"]).
+                </li>
+              </ol>
+            </li>
+            <li>Let <var>cleanAddressLines</var> be an emtpy list.
+            </li>
+            <li>If <var>details</var>["<a>addressLine</a>"] is present, then
+            for each <var>item</var> in
+            <var>details</var>["<a>addressLine</a>"]:
+              <ol>
+                <li>
+                  <a>strip leading and trailing ASCII whitespace</a> from
+                  <var>item</var> and append the result into
+                  <var>cleanAddressLines</var>

Missing period

> +                </li>
+              </ol>
+            </li>
+            <li>If <var>details</var>["<a>languageCode</a>"] is present:
+              <ol>
+                <li>If <a data-cite=
+                "ecma-402#sec-isstructurallyvalidlanguagetag">IsStructurallyValidLanguageTag</a>(<var>details</var>["<a>languageCode</a>"])
+                is false, throw a <a>RangeError</a> exception.
+                </li>
+                <li>Set <var>address</var>.<a>[[\languageCode]]</a> to
+                <a data-cite=
+                "ecma-402#sec-canonicalizelanguagetag">CanonicalizeLanguageTag</a>(<var>details</var>["<a>languageCode</a>"]).
+                </li>
+              </ol>
+            </li>
+            <li>Let <var>cleanAddressLines</var> be an emtpy list.

Misspelled "empty"

> +          <table>
+            <tr>
+              <th>
+                Internal slot
+              </th>
+              <th>
+                Description (<em>non-normative</em>)
+              </th>
+            </tr>
+            <tr>
+              <td>
+                <dfn>[[\country]]</dfn>
+              </td>
+              <td>
+                A <a>country</a> as an [[!ISO3166-1]] alpha-2 code or the empty
+                string stored in its canonical uppercase form. For example,

Move "or the empty string" to the end of the sentence.

> +        <h2>
+          Creating a <code>PaymentAddress</code> from user-provided input
+        </h2>
+        <p>
+          The steps to <dfn>create a <code>PaymentAddress</code> from
+          user-provided input</dfn> are given by the following algorithm. The
+          algorithm takes a <a>list</a> <var>redactList</var>, for which user
+          input will not be gathered.
+        </p>
+        <ol data-link-for="AddressInit">
+          <li>Let <var>details</var> be an <a>AddressInit</a> dictionary with
+          no members present.
+          </li>
+          <li>If "addressLine" is not in <var>redactList</var>, set
+          <var>details</var>["<a>addressLine</a>"] to the result of splitting
+          the user-provided address line into a <a data-cite=
           "!WEBIDL#dfn-frozen-array-type">frozen array</a>. If none was

This should just be a list, not a frozen array, since it's the dictionary.

> +                <p>
+                  For merchants, the resulting <a>PaymentAddress</a> object
+                  provides enough information to, for example, calculate
+                  shipping costs, but, in most cases, not enough information to
+                  physically locate and uniquely identify the recipient.
+                </p>
+                <p>
+                  Unfortunately, even with the <var>redactList</var>, recipient
+                  anonymity is cannot be assured. This is because in some
+                  countries postal codes are so fine-grained that they can
+                  uniquely identify a recipient.
+                </p>
+              </div>
+              <li>Let <var>redactList</var> be the empty list. Optionally,
+              append the following items to <var>redactList</var>: «
+              "organization", "phone", "recipient", "addressLine" ».

I still can't tell what this step is saying. Is it saying redactList must be either the empty list or this list? If so, please say `Optionally, set redactList to « "organization", "phone", "recipient", "addressLine" »`.

Or is it saying that a list like just « "phone" » is valid? If so, please say `Optionally append any or all of the following to redactList: "organization", "phone", "recipient", "addressLine"`

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/pull/654#pullrequestreview-103694155

Received on Wednesday, 14 March 2018 05:29:01 UTC