Re: [w3c/manifest] Add id member to manifest (#988)

@mgiuca commented on this pull request.



> +          </li>
+          <li>If |id| is not same origin as |manifest|["start_url"], return.
+          </li>
+          <li>Otherwise, set |manifest|["id"] to |id|.</li>
+        </ol>
+        <aside class="example">
+          Below table shows some example cases of the |identity| processing algorithm.
+          <table class="data">
+            <tr>
+              <th>|json|["id"]</th>
+              <th>|manifest|["start_url"]</th>
+              <th>|manifest|["id"]</th>
+            </tr>
+            <tr>
+              <td><i>undefined</i></td>
+              <td>"https://example.com/resources/start"</td>

Yep, this table is fantastic for illustrating cases, but more cases would be better! I see on the [TAG review](https://github.com/w3ctag/design-reviews/issues/668) they asked about "What constitutes a valid ID?" -- I don't think this needs to be explicitly addressed in normative text, since the fact that it runs through the URL Parser is sufficient to specify that. But some examples would be helpful.

Maybe some Unicode characters. Some percent-encoded sequences to show that this is actually parsed as a URL (e.g. `%6D` should generate an id of ...`m`).

Also I would like to add an example with an input of "`/foo`" in addition to "`foo`", which should generate the same result. (As I have been saying in internal discussions, even though the leading slash is optional, I would very much like us to recommend using it in all examples, since having a URL without a leading slash be parsed relative to the origin is quite confunsing behaviour IMO and differs from how we parse all other URLs in the manifest.)

(Arguably, I would still like to see us parse the ID relative to the manifest URL for consistency with other URLs, and thus soft-mandate the leading slash, but that decision seems to have been made long ago and I'm not sure what the decision was based on.)

-- 
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/manifest/pull/988#discussion_r708754252

Received on Wednesday, 15 September 2021 00:43:46 UTC