[w3c/browser-payment-api] Remove special case handling for single shipping option. (#210)

We originally added special support for a single shipping option to allow a more streamlined user experience for the cases where you want to get a shipping address but you only have one shipping option. This means the user wouldn't have to select anything.

Since then, we added the `selected` field which allows you to indicate any shipping option should be the selected one. This means the special handling for a single option isn't really necessary any longer. If we remove this then it makes the mental model for developers easier. Developers are responsible for maintaining the selected state for shipping options. If they don't do this then an update to the shipping options causes the current option to be deselected and requires the user reselect.

One of the primary goals here is to ensure that a user never accepts a payment request with details they didn't expect. Another is that we should make it harder for web developer mistakes from misunderstanding the model to result in accepted payment requests with incorrect details. This proposal improves this by removing some of the magic from the API and making web developers be explicit.
You can view, comment on, or merge this pull request online at:

  https://github.com/w3c/browser-payment-api/pull/210

-- Commit Summary --

  * Remove special case handling for single shipping option.

-- File Changes --

    M index.html (18)

-- Patch Links --

https://github.com/w3c/browser-payment-api/pull/210.patch
https://github.com/w3c/browser-payment-api/pull/210.diff

---
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/browser-payment-api/pull/210

Received on Wednesday, 8 June 2016 16:10:24 UTC