New issue
Advanced search Search tips

Issue 667872 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Desktop WebPayments dialog screens should slide in/out on top of one another

Project Member Reported by anthonyvd@chromium.org, Nov 22 2016

Issue description

The Desktop WebPayments design involves Material Design-style sliding animations between subsequent dialog states. A system implementing this stack of states and the transition between them should be implemented.

This functionality was designed in go/pr-desktop-ui
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 7 2016

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

commit 3d7f9727782b932937b4e031bc0d88ccceefe1f3
Author: anthonyvd <anthonyvd@chromium.org>
Date: Wed Dec 07 18:43:54 2016

[WebPayments] Move views-specific code to c/b/ui/views/

This CL moves the PaymentRequestDialog class to c/b/ui/views/.
Moving it is required because:

a) It's views-specific, so convention dictates it should live in
   c/b/ui/views/
b) It will consume views specific code, which is disallowed from c/b/*

This also means that PaymentRequestImpl can't directly instantiate
PaymentRequestDialog anymore. This is solved by adding the
ShowWebPaymentsDialog function to BrowserWindow.

This CL also fixes some lifetime and ownership issues that became
apparent during the move. Specifically:

a) payments::mojom::PaymentRequestClientPtr should be owned by
   PaymentRequestImpl rather than the dialog code. This way, a non-views
   implementation of the UI only has to know about PaymentRequestImpl
   and the code that interacts with the client doesn't have to be
   duplicated.
b) The dialog is now opened through
   constrained_window::ShowWebModalDialogViews(), constraining it to the
   triggering WebContents and closing it automatically when the tab is
   closed.

BUG= 667872 

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

[modify] https://crrev.com/3d7f9727782b932937b4e031bc0d88ccceefe1f3/chrome/browser/BUILD.gn
[delete] https://crrev.com/c64a96a44e5fcfdc8eb8b89cdd7e9d88e9dc8866/chrome/browser/payments/BUILD.gn
[modify] https://crrev.com/3d7f9727782b932937b4e031bc0d88ccceefe1f3/chrome/browser/payments/payment_request_impl.cc
[modify] https://crrev.com/3d7f9727782b932937b4e031bc0d88ccceefe1f3/chrome/browser/payments/payment_request_impl.h
[delete] https://crrev.com/c64a96a44e5fcfdc8eb8b89cdd7e9d88e9dc8866/chrome/browser/payments/ui/payment_request_dialog.h
[modify] https://crrev.com/3d7f9727782b932937b4e031bc0d88ccceefe1f3/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/3d7f9727782b932937b4e031bc0d88ccceefe1f3/chrome/browser/ui/browser_dialogs.h
[rename] https://crrev.com/3d7f9727782b932937b4e031bc0d88ccceefe1f3/chrome/browser/ui/views/payments/payment_request_dialog.cc
[add] https://crrev.com/3d7f9727782b932937b4e031bc0d88ccceefe1f3/chrome/browser/ui/views/payments/payment_request_dialog.h

Project Member

Comment 2 by bugdroid1@chromium.org, Dec 14 2016

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

commit 4069c4e1776b8ba44d3ddca2c2b4ce59a5fcdfc2
Author: anthonyvd <anthonyvd@chromium.org>
Date: Wed Dec 14 02:38:56 2016

[WebPayments] Implement state transitions in desktop WebPayments dialog.

This CL implements a crude version of the state stack and sliding
transitions in the desktop WebPayments dialog. The states do pretty much
nothing except navigating between one another but this is intended as a
skeleton to build all the screens from.

In particular, this CL adds:
1- PaymentDialogState base class that all states inherit from
2- PaymentSheetState and OrderSummaryState, 2 implementations of
   PaymentDialogState
3- PushState() and PopState() functions on PaymentRequestDialog
4- Slide in/out animations when states are pushed and popped

A document outlining this design is available at go/pr-desktop-ui

BUG= 667872 
TEST=
1. Enable experimental javascript features
2. Visit a page that uses WebPayments and trigger the WebPayments flow
3. The dialog should display with the "Payment Sheet" open and an
   "Order Summary" button
4. Clicking "Order Summary" should slide in an "Order Summary" view
   from the right. It should contain a "Back" button
5. Clicking "Back" should slide the "Order Summary" view to the right
   and out of view, making "Payment Sheet" available again.

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

[modify] https://crrev.com/4069c4e1776b8ba44d3ddca2c2b4ce59a5fcdfc2/chrome/app/generated_resources.grd
[modify] https://crrev.com/4069c4e1776b8ba44d3ddca2c2b4ce59a5fcdfc2/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/4069c4e1776b8ba44d3ddca2c2b4ce59a5fcdfc2/chrome/browser/ui/views/payments/payment_request_dialog.cc
[modify] https://crrev.com/4069c4e1776b8ba44d3ddca2c2b4ce59a5fcdfc2/chrome/browser/ui/views/payments/payment_request_dialog.h
[add] https://crrev.com/4069c4e1776b8ba44d3ddca2c2b4ce59a5fcdfc2/chrome/browser/ui/views/payments/view_stack.cc
[add] https://crrev.com/4069c4e1776b8ba44d3ddca2c2b4ce59a5fcdfc2/chrome/browser/ui/views/payments/view_stack.h
[add] https://crrev.com/4069c4e1776b8ba44d3ddca2c2b4ce59a5fcdfc2/chrome/browser/ui/views/payments/view_stack_unittest.cc
[modify] https://crrev.com/4069c4e1776b8ba44d3ddca2c2b4ce59a5fcdfc2/chrome/test/BUILD.gn

Project Member

Comment 3 by bugdroid1@chromium.org, Dec 16 2016

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

commit 9380084b03aa5c232c96c32ff66e5b4317a36d54
Author: anthonyvd <anthonyvd@chromium.org>
Date: Fri Dec 16 17:48:54 2016

[WebPayments] Factor out sheet-specific logic in Controllers.

This CL adds a mechanism to isolate sheet-specific code previously in
PaymentRequestDialog to Controller classes. This will allow for clearer
view creation and event handling as the different sheets in the dialog
are implemented.

BUG= 667872 

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

[modify] https://crrev.com/9380084b03aa5c232c96c32ff66e5b4317a36d54/chrome/browser/ui/BUILD.gn
[add] https://crrev.com/9380084b03aa5c232c96c32ff66e5b4317a36d54/chrome/browser/ui/views/payments/order_summary_view_controller.cc
[add] https://crrev.com/9380084b03aa5c232c96c32ff66e5b4317a36d54/chrome/browser/ui/views/payments/order_summary_view_controller.h
[modify] https://crrev.com/9380084b03aa5c232c96c32ff66e5b4317a36d54/chrome/browser/ui/views/payments/payment_request_dialog.cc
[modify] https://crrev.com/9380084b03aa5c232c96c32ff66e5b4317a36d54/chrome/browser/ui/views/payments/payment_request_dialog.h
[add] https://crrev.com/9380084b03aa5c232c96c32ff66e5b4317a36d54/chrome/browser/ui/views/payments/payment_request_sheet_controller.h
[add] https://crrev.com/9380084b03aa5c232c96c32ff66e5b4317a36d54/chrome/browser/ui/views/payments/payment_request_views_util.cc
[add] https://crrev.com/9380084b03aa5c232c96c32ff66e5b4317a36d54/chrome/browser/ui/views/payments/payment_request_views_util.h
[add] https://crrev.com/9380084b03aa5c232c96c32ff66e5b4317a36d54/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
[add] https://crrev.com/9380084b03aa5c232c96c32ff66e5b4317a36d54/chrome/browser/ui/views/payments/payment_sheet_view_controller.h
[modify] https://crrev.com/9380084b03aa5c232c96c32ff66e5b4317a36d54/chrome/browser/ui/views/payments/view_stack.cc

Status: Fixed (was: Assigned)

Sign in to add a comment