- From: Matt Giuca <notifications@github.com>
- Date: Thu, 26 Apr 2018 21:53:46 -0700
- To: w3ctag/design-reviews <design-reviews@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3ctag/design-reviews/issues/221/384863663@github.com>
Note: A concern was raised on WICG/web-share-target#38 that the new syntax would not allow composing fields into the same query parameter (with delimiters). For example, they wanted to do this (using the old syntax): ```json "url_template": "?title={title}&body={text}%0A%0A{url}" ``` The "body" parameter is supposed to be populated with both the text and URL, separated by 2 newlines. Under the new syntax proposed above, you cannot make a templated parameter, you can only assign each ShareData field to one query parameter. This shouldn't strictly be necessary, if you are in control of both the manifest and the receiver endpoint, you can just have the receiver receive all the fields individually and concatenate them in JS or on the server side. However, part of the appeal of the URL based approach is that you can just add it to the manifest without having to change an existing share endpoint (which may be much easier to adopt if you don't have to modify the syntax of your share endpoint). Perhaps we should use a template syntax still, but per-parameter: ```json "params": {"title": "{title}", "body": "{text}%0A%0A{url}"} ``` Counter-argument: The new scheme is modelled off HTML form submission. HTML forms don't let you compose a string from a template, you just pass along the fields as query parameters. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3ctag/design-reviews/issues/221#issuecomment-384863663
Received on Friday, 27 April 2018 04:54:10 UTC