Closed Bug 1435101 Opened 7 years ago Closed 7 years ago

Only show shipping (option & address) pickers in the payment request dialog when requestShipping is true

Categories

(Firefox :: WebPayments UI, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: MattN, Assigned: jaws)

References

()

Details

(Whiteboard: [webpayments])

Attachments

(2 files)

The visibility of the shipping option and shipping address pickers should be controlled by `state.request.paymentOptions.requestShipping` in the relevant render methods. Integration tests should ensure that a default shipping addresses isn't sent if one is in storage.
Assignee: nobody → jaws
Status: NEW → ASSIGNED
Comment on attachment 8952818 [details] Bug 1435101 - Only show the shipping options and shipping address if requestShipping is true. https://reviewboard.mozilla.org/r/222046/#review227952 ::: toolkit/components/payments/res/paymentRequest.xhtml:70 (Diff revision 2) > > <section> > - <div><label>&shippingAddressLabel;</label></div> > - <address-picker selected-state-key="selectedShippingAddress"></address-picker> > - <div><label>&shippingOptionsLabel;</label></div> > - <shipping-option-picker></shipping-option-picker> > + <div class="shippingRequested"><label>&shippingAddressLabel;</label></div> > + <address-picker class="shippingRequested" selected-state-key="selectedShippingAddress"></address-picker> > + <div class="shippingRequested"><label>&shippingOptionsLabel;</label></div> > + <shipping-option-picker class="shippingRequested"></shipping-option-picker> In some ways I think the render function of <shipping-option-picker> should set `this.hidden = true;` instead but since the label is separate and would also need to be hidden I guess we can try this. ::: toolkit/components/payments/test/browser/browser_request_shipping.js:4 (Diff revision 2) > + let onChanged = TestUtils.topicObserved("formautofill-storage-changed", > + (subject, data) => data == "add"); Nit: indentation seems off
Comment on attachment 8952818 [details] Bug 1435101 - Only show the shipping options and shipping address if requestShipping is true. https://reviewboard.mozilla.org/r/222046/#review228020
Attachment #8952818 - Flags: review?(MattN+bmo) → review+
Pushed by jwein@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6c2b9768775d Only show the shipping options and shipping address if requestShipping is true. r=MattN
Comment on attachment 8952872 [details] Bug 1435101 - Wrap some lines to under 100 characters to make eslint happy. https://reviewboard.mozilla.org/r/222110/#review228046
Attachment #8952872 - Flags: review?(MattN+bmo) → review+
Pushed by jwein@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/33318adf48fc Wrap some lines to under 100 characters to make eslint happy. r=MattN
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Whiteboard: [webpayments]
Product: Toolkit → Firefox
Target Milestone: mozilla60 → Firefox 60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: