New issue
Advanced search Search tips

Issue 687601 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug

Blocked on:
issue 709776



Sign in to add a comment

[Payments] Implement native credit card editor on desktop

Project Member Reported by ma...@chromium.org, Feb 1 2017

Issue description

It should be possible to edit/add a credit card from within the PR dialog on desktop platforms.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/34728b5bf15dfb51a5206ac8a109096f28cc21e6

commit 34728b5bf15dfb51a5206ac8a109096f28cc21e6
Author: mathp <mathp@chromium.org>
Date: Mon Feb 06 19:14:32 2017

[Payments] Implements the credit card editor for Desktop UI

Creates the EditorViewController base class, which will handle events and UI that is common between the address, contact and credit card editors.

Introducing the CreditCardViewController as well, the first subclass possibly the most complex of the editors.

BUG= 687601 
TEST=PaymentRequest* interactive_ui_tests

Review-Url: https://codereview.chromium.org/2676663002
Cr-Commit-Position: refs/heads/master@{#448339}

[modify] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/app/generated_resources.grd
[modify] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/BUILD.gn
[add] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
[add] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/views/payments/credit_card_editor_view_controller.h
[add] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/views/payments/editor_view_controller.cc
[add] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/views/payments/editor_view_controller.h
[modify] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/views/payments/payment_method_view_controller.cc
[modify] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/views/payments/payment_method_view_controller.h
[add] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/views/payments/payment_request_credit_card_editor_interactive_uitest.cc
[modify] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
[modify] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/views/payments/payment_request_dialog_view.h
[modify] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h
[modify] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/views/payments/payment_request_interactive_uitest.cc
[modify] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.cc
[modify] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h
[modify] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/browser/ui/views/payments/view_stack.h
[modify] https://crrev.com/34728b5bf15dfb51a5206ac8a109096f28cc21e6/chrome/test/BUILD.gn

Project Member

Comment 2 by bugdroid1@chromium.org, Feb 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d4cfd8f80766dbadbbe6f04202304af5b4863e3d

commit d4cfd8f80766dbadbbe6f04202304af5b4863e3d
Author: mathp <mathp@chromium.org>
Date: Thu Feb 09 21:16:53 2017

[Payments] Basic validation in the credit card editor.

Introducting the ValidatingTextfield class, which will be used to validate only on first blur, and on every subsequent contents change.

Created validation methods in autofill code, which will return the proper error messages (to be displayed in a follow-up CL).

BUG= 687601 
TEST=ValidatingTextfieldTest unit_tests, PaymentRequest* interactive_ui_tests, AutofillValidation components_unittests

Review-Url: https://codereview.chromium.org/2673753005
Cr-Commit-Position: refs/heads/master@{#449409}

[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/chrome/app/generated_resources.grd
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/chrome/browser/ui/views/payments/credit_card_editor_view_controller.h
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/chrome/browser/ui/views/payments/editor_view_controller.cc
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/chrome/browser/ui/views/payments/editor_view_controller.h
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/chrome/browser/ui/views/payments/payment_request_credit_card_editor_interactive_uitest.cc
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.cc
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h
[add] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/chrome/browser/ui/views/payments/validating_textfield.cc
[add] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/chrome/browser/ui/views/payments/validating_textfield.h
[add] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/chrome/browser/ui/views/payments/validating_textfield_unittest.cc
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/chrome/test/BUILD.gn
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/components/autofill/core/browser/credit_card.cc
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/components/autofill/core/browser/credit_card.h
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/components/autofill/core/browser/validation.cc
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/components/autofill/core/browser/validation.h
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/components/autofill/core/browser/validation_unittest.cc
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/components/autofill_strings.grdp
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/components/payments/payment_request.cc
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/components/payments/payment_request.h
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/components/payments/payment_request_delegate.h
[modify] https://crrev.com/d4cfd8f80766dbadbbe6f04202304af5b4863e3d/components/payments_strings.grdp

Project Member

Comment 4 by bugdroid1@chromium.org, Feb 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5

commit 0e33868f81c5c8a299e14c96b1ce6b49ce325ee5
Author: mathp <mathp@chromium.org>
Date: Thu Feb 16 17:39:25 2017

[Payments] Add combobox support to editors.

* Refactored the ValidationDelegate to support Textfield and Combobox.
* Added the COMBOBOX type for editors to specify when returning field definitions.
* Added a constructor to Combobox which takes ownership of its model.
* Added new ValidatingCombobox type which validates on first blur and subsequent changes.
* Re-enable flaky interactive_ui_tests PaymentRequest*CreditCard*Valid

BUG= 687601 ,  691185 
TEST=CreditCardEditorViewController unit_tests, PaymentRequest* interactive_ui_tests

Review-Url: https://codereview.chromium.org/2689363004
Cr-Commit-Position: refs/heads/master@{#451005}

[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/app/generated_resources.grd
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/credit_card_editor_view_controller.h
[add] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/credit_card_editor_view_controller_unittest.cc
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/editor_view_controller.cc
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/editor_view_controller.h
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/payment_request_credit_card_editor_interactive_uitest.cc
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.cc
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc
[add] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/preselected_combobox_model.cc
[add] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/preselected_combobox_model.h
[add] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/validating_combobox.cc
[add] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/validating_combobox.h
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/validating_textfield.cc
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/validating_textfield.h
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/validating_textfield_unittest.cc
[add] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/browser/ui/views/payments/validation_delegate.h
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/chrome/test/BUILD.gn
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/ui/views/controls/combobox/combobox.cc
[modify] https://crrev.com/0e33868f81c5c8a299e14c96b1ce6b49ce325ee5/ui/views/controls/combobox/combobox.h

Project Member

Comment 5 by bugdroid1@chromium.org, Feb 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c2d07f96730f454ad72b9c35ddb98f93240b843c

commit c2d07f96730f454ad72b9c35ddb98f93240b843c
Author: mathp <mathp@chromium.org>
Date: Fri Feb 17 18:33:51 2017

[Payments] Add the "Cards accepted" row at the top of CC editor.

No actual validation done using this data.

BUG= 687601 
TEST=PaymentRequest*CreditCard* interactive_ui_tests

Review-Url: https://codereview.chromium.org/2698353002
Cr-Commit-Position: refs/heads/master@{#451343}

[modify] https://crrev.com/c2d07f96730f454ad72b9c35ddb98f93240b843c/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
[modify] https://crrev.com/c2d07f96730f454ad72b9c35ddb98f93240b843c/chrome/browser/ui/views/payments/credit_card_editor_view_controller.h
[modify] https://crrev.com/c2d07f96730f454ad72b9c35ddb98f93240b843c/chrome/browser/ui/views/payments/editor_view_controller.cc
[modify] https://crrev.com/c2d07f96730f454ad72b9c35ddb98f93240b843c/chrome/browser/ui/views/payments/editor_view_controller.h
[modify] https://crrev.com/c2d07f96730f454ad72b9c35ddb98f93240b843c/chrome/browser/ui/views/payments/payment_request_credit_card_editor_interactive_uitest.cc
[modify] https://crrev.com/c2d07f96730f454ad72b9c35ddb98f93240b843c/chrome/browser/ui/views/payments/payment_request_views_util.cc
[modify] https://crrev.com/c2d07f96730f454ad72b9c35ddb98f93240b843c/chrome/browser/ui/views/payments/payment_request_views_util.h
[modify] https://crrev.com/c2d07f96730f454ad72b9c35ddb98f93240b843c/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
[modify] https://crrev.com/c2d07f96730f454ad72b9c35ddb98f93240b843c/components/payments/payment_request.cc
[modify] https://crrev.com/c2d07f96730f454ad72b9c35ddb98f93240b843c/components/payments/payment_request.h

Project Member

Comment 6 by bugdroid1@chromium.org, Feb 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4ba9f702ce790f1a7a55cdf1ef1a7c6e00f43cf4

commit 4ba9f702ce790f1a7a55cdf1ef1a7c6e00f43cf4
Author: mathp <mathp@chromium.org>
Date: Sat Feb 18 16:19:37 2017

[Payments] Adjust the UI fit the mocks better

Also adds the leading footer view, used to add "* indicates a required
field" on editors.

Screenshot 1: https://drive.google.com/a/chromium.org/file/d/0B3xzZ-vFr2LRelhwQWtVZHdOblU/view?usp=sharing
Screenshot 2: https://drive.google.com/file/d/0B3xzZ-vFr2LRUkd2eHdNLXd2eFE/view?usp=sharing

BUG= 687601 
TEST=existing

Review-Url: https://codereview.chromium.org/2692923011
Cr-Commit-Position: refs/heads/master@{#451465}

[modify] https://crrev.com/4ba9f702ce790f1a7a55cdf1ef1a7c6e00f43cf4/chrome/browser/ui/views/payments/editor_view_controller.cc
[modify] https://crrev.com/4ba9f702ce790f1a7a55cdf1ef1a7c6e00f43cf4/chrome/browser/ui/views/payments/editor_view_controller.h
[modify] https://crrev.com/4ba9f702ce790f1a7a55cdf1ef1a7c6e00f43cf4/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc
[modify] https://crrev.com/4ba9f702ce790f1a7a55cdf1ef1a7c6e00f43cf4/chrome/browser/ui/views/payments/payment_request_sheet_controller.h
[modify] https://crrev.com/4ba9f702ce790f1a7a55cdf1ef1a7c6e00f43cf4/chrome/browser/ui/views/payments/payment_request_views_util.cc
[modify] https://crrev.com/4ba9f702ce790f1a7a55cdf1ef1a7c6e00f43cf4/chrome/browser/ui/views/payments/payment_request_views_util.h

Project Member

Comment 7 by bugdroid1@chromium.org, Feb 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6b35359be7e542dec28d4ae27ea83f861f6cc34a

commit 6b35359be7e542dec28d4ae27ea83f861f6cc34a
Author: mathp <mathp@chromium.org>
Date: Wed Feb 22 22:25:20 2017

[Payments] Add error messages to credit card editor.

Adjusts the UI to be closer to the mocks.
* No more border between rows.
* Added spacing between rows.
* New grid system to position an error label below the input field.

BUG= 687601 
TEST=manual

Review-Url: https://codereview.chromium.org/2715533002
Cr-Commit-Position: refs/heads/master@{#452235}

[modify] https://crrev.com/6b35359be7e542dec28d4ae27ea83f861f6cc34a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
[modify] https://crrev.com/6b35359be7e542dec28d4ae27ea83f861f6cc34a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.h
[modify] https://crrev.com/6b35359be7e542dec28d4ae27ea83f861f6cc34a/chrome/browser/ui/views/payments/editor_view_controller.cc
[modify] https://crrev.com/6b35359be7e542dec28d4ae27ea83f861f6cc34a/chrome/browser/ui/views/payments/editor_view_controller.h
[modify] https://crrev.com/6b35359be7e542dec28d4ae27ea83f861f6cc34a/chrome/browser/ui/views/payments/payment_request_credit_card_editor_interactive_uitest.cc
[modify] https://crrev.com/6b35359be7e542dec28d4ae27ea83f861f6cc34a/chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h
[modify] https://crrev.com/6b35359be7e542dec28d4ae27ea83f861f6cc34a/chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.cc
[modify] https://crrev.com/6b35359be7e542dec28d4ae27ea83f861f6cc34a/chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h

Comment 9 by ma...@chromium.org, Mar 8 2017

Status: Assigned (was: Started)

Comment 10 by mad@chromium.org, Apr 24 2017

Blockedon: 709776

Comment 11 by ma...@chromium.org, Apr 25 2017

Owner: mad@chromium.org
Over to mad for the missing piece :)

Comment 12 by mad@chromium.org, May 10 2017

Status: Fixed (was: Assigned)
Now that we have billing address support. Is anything else missing?

Comment 13 by ma...@chromium.org, May 10 2017

Attaching the mock, it looks like Expiration Date is a big one that's not quite up to spec. Now that we have ways to create a custom view for a given type (billing address), maybe we can extend the mechanism for expiration date?
Screen Shot 2017-05-10 at 11.30.58 AM.png
31.2 KB View Download

Comment 14 by mad@chromium.org, May 10 2017

Status: Started (was: Fixed)
OK, will do it once you are done with the UI refactoring.

Comment 15 by mad@chromium.org, May 19 2017

Owner: ma...@chromium.org
Since you are putting the finishing touch on the layout, you could mark this as fixed once you're done, or identify what else is missing.

Comment 16 by ma...@chromium.org, May 23 2017

Status: Fixed (was: Started)
Remaining issues are tracked. 
Components: -UI>Browser>Autofill>Payments UI>Browser>Payments

Sign in to add a comment