-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need to specify behavior for Clients.openWindow #73
Comments
* Edited specification to remove notions of open/proprietary Issue 67 was about lack of definitions of proprietary and open; #67 Those terms were not necessary for the specification, so it was edited to remove the concepts. * Issue 59 edit: UA should support config to not display recommended payment apps * Add a note about whether displayItems is missing and also about top-level transaction ID * Editorial changes based on AHB comments * Add link to two issues -issue 224 re push payments -issue 37 re cancelation (and discussion of UA retry) * Update manifest data for consistent with Web App Manifest - Per discussion 30 Nov 2016 [1], alignment of manifest members with Web App Manifest, a link to issue 69, and a note about needing further discussion about the alignment. [1] https://www.w3.org/2016/11/30-apps-minutes#item03 * Updates to options based on 30 nov 2016 discussion See minutes: https://www.w3.org/2016/11/30-apps-minutes#item05 * Support for selection of options is now required. * Changed language from “display” to “enable selection” * Added link to issue 73 #73
@ianbjacobs: I think the comment that you added to the specification along with the link to this issue, is spot on. There are some open questions here that we should answer, and while it's not great to have the specification dictating how the UI should be implemented, I think it needs to say something more than just leaving everything up to the User Agent implementors. My impression, after having talked with potential Payment App implementors, is that just calling It seems necessary for User Agents, then, to supply a specialized implementation of One potential outcome of this, could be that Payment App implementors, in an attempt to keep things under control, start filtering clients on User Agent Strings, only allowing registration and payments by User Agents that have been tested and proven to have an acceptable implementation of So, is it possible for us to say something about the expectations of the implementation of |
Hi Tommy, Let's discuss this at tomorrow's call: Ian |
I'll be on a plane tomorrow and can't make the call, but I am very much in favor of this! |
At the 4 January call, Rouslan took an action to find out to what extent discussion of progressive web apps here could be useful: Ian |
I see this issue is on the agenda for today's meeting. I'm not sure if Rouslan's efforts have been fruitful, but I just want to make sure we consider the option of resurrecting the PaymentWindow API that existed in the very first versions of the service worker payment apps text. Although there's added spec complexity in defining this API, which necessarily needs to copy a lot of the spec text from clients.openWindow(), I believe it does address very well the current uncertainty w.r.t. the suitability of clients.openWindow(). It can also help us solve another problem which we haven't yet discussed, but which I have had feedback about from a payment app implementor; namely the difficulty of closing a window opened by clients.openWindow(). See this and this stackoverflow post for more information. Basically, if a window has been opened by a serviceworker using clients.openWindow(), it may be tricky to close it again programmatically. If we have a specialized API for opening and closing payment windows, we can sidestep all of these potential problems. |
As a follow up to this morning's call: a new tab is not going to be sufficient for payment app implementors. I think the spec needs to be strong enough on this point to let payment apps feel confident that they can build an "Apple Pay on the Web"-like interaction (at the very least). That is, it needs to be capable of overlaying the current page. On mobile, new tabs have historically had some issues with certain UAs (e.g. SFSafariViewController does not work with tabs). Payment apps will want to be full frame and ideally be capable of building a partial-height UI with the host page visible in the background. On desktop, new tabs are a jarring user experience and force payment apps to render a full screen of UI even if all they want a small frame. As a payment app implementor, here is what I would need to feel comfortable building against this spec:
Ex desktop: Ex mobile: |
Thanks, Jenan. I updated the spec after today's call: The new text in 10.4 says: "To support scenarios that involve visual display and user interaction, user agents MUST allow payment apps to call the clients.openWindow() method defined in [SERVICE-WORKERS]. Because user agents can determine from event type that the window is part of a payment flow, the user agent SHOULD render the window in a way that is consistent with the flow and not confusing to the user. For example, we recommend that the payment app not be opened in a new browser tab, as this is too dissociated from the checkout context." How does that sound? Would you suggest we amend it to mention "full or partial frame" as a sort of good practice hint? Regarding origin: We do not currently have a requirement that the payment app must display its own origin to hte user. Do you think that should be a requirement or strong suggestion? Thanks! |
Some notes:
Ian |
👍 Excited about the updates. Strong rec for displaying origin sounds reasonable. |
This is a possible duplicate of #97 |
Update: Marcos and Tommy have agreed to work together on a proposal for a new openClientWindow method. |
Duplication of 97 so closing |
The spec currently raises an issue that a ServiceWorker should be able to open a window for the payment app webpage, so the user can interact with the payment app to complete the transaction. Let's write the spec language for this, so we can have interoperable implementations.
The text was updated successfully, but these errors were encountered: