Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Issue 2528503002: [WebPayments] Implement state transitions in desktop WebPayments dialog. (Closed)

Created:
4 years, 1 month ago by anthonyvd
Modified:
4 years ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[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. Committed: https://crrev.com/4069c4e1776b8ba44d3ddca2c2b4ce59a5fcdfc2 Cr-Commit-Position: refs/heads/master@{#438398}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Change ToggleInteractable to SetInteractable #

Total comments: 26

Patch Set 3 : Address comments. #

Patch Set 4 : Move views-specific files to c/b/ui/views #

Patch Set 5 : Make PaymentDialogState own the view returned through GetView #

Total comments: 36

Patch Set 6 : Address feedback #

Patch Set 7 : Factor out ViewStack and animations #

Total comments: 8

Patch Set 8 : Change the ViewStack interface to take std::unique_ptr<views::View> directly. #

Total comments: 12

Patch Set 9 : Address comments #

Total comments: 7

Patch Set 10 : Handle Layout while animating #

Unified diffs Side-by-side diffs Delta from patch set Stats (+456 lines, -16 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_dialog.h View 1 2 3 4 5 6 7 8 9 2 chunks +17 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_dialog.cc View 1 2 3 4 5 6 7 8 9 3 chunks +96 lines, -10 lines 0 comments Download
A chrome/browser/ui/views/payments/view_stack.h View 1 2 3 4 5 6 7 8 9 1 chunk +65 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/payments/view_stack.cc View 1 2 3 4 5 6 7 8 9 1 chunk +92 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/payments/view_stack_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +174 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 53 (20 generated)
anthonyvd
Hi Kevin and Rouslan, This CL is a basic implementation of the design I proposed ...
4 years, 1 month ago (2016-11-22 20:24:12 UTC) #2
Kevin Bailey
Can't be helped, but one of us will have some merging to do. https://codereview.chromium.org/2528503002/diff/1/chrome/browser/payments/ui/payment_dialog_state.h File ...
4 years, 1 month ago (2016-11-22 20:45:33 UTC) #3
anthonyvd
Yep unfortunately we'll have a non-trivial merge somewhere. I don't mind doing it, it'll mainly ...
4 years, 1 month ago (2016-11-22 20:52:19 UTC) #4
please use gerrit instead
https://codereview.chromium.org/2528503002/diff/20001/chrome/browser/payments/ui/order_summary_state.cc File chrome/browser/payments/ui/order_summary_state.cc (right): https://codereview.chromium.org/2528503002/diff/20001/chrome/browser/payments/ui/order_summary_state.cc#newcode26 chrome/browser/payments/ui/order_summary_state.cc:26: views::GridLayout* layout = new views::GridLayout(view_); Who owns this object? ...
4 years, 1 month ago (2016-11-22 21:39:33 UTC) #5
anthonyvd
Thanks a ton for the feedback, replied to all comments. Adding sky@ to reviewers as ...
4 years, 1 month ago (2016-11-22 22:11:19 UTC) #7
sky
owned_by_client (not the default), means you own the view and have to manually delete it. ...
4 years, 1 month ago (2016-11-22 23:30:10 UTC) #8
sky
Also, given your code is views specific I would expect your code to live under ...
4 years, 1 month ago (2016-11-22 23:30:31 UTC) #9
anthonyvd
On 2016/11/22 at 23:30:31, sky wrote: > Also, given your code is views specific I ...
4 years, 1 month ago (2016-11-23 03:23:39 UTC) #10
anthonyvd
Hello everyone. The latest 2 patchsets address the feedback regarding: - views-specific code living in ...
4 years ago (2016-12-07 22:24:33 UTC) #13
please use gerrit instead
lgtm % comment https://codereview.chromium.org/2528503002/diff/80001/chrome/browser/ui/views/payments/payment_dialog_state.cc File chrome/browser/ui/views/payments/payment_dialog_state.cc (right): https://codereview.chromium.org/2528503002/diff/80001/chrome/browser/ui/views/payments/payment_dialog_state.cc#newcode11 chrome/browser/ui/views/payments/payment_dialog_state.cc:11: PaymentDialogState::PaymentDialogState() Please initialize interactiable_ boolean here. ...
4 years ago (2016-12-07 23:29:19 UTC) #14
sky
+elly as she is making layout consistent and it's likely better to change it now ...
4 years ago (2016-12-08 03:58:17 UTC) #17
Kevin Bailey
lgtm
4 years ago (2016-12-08 16:27:47 UTC) #18
anthonyvd
Thanks for the feedback! Addressed all comments except the one about factoring out the stack ...
4 years ago (2016-12-08 20:31:23 UTC) #19
sky
I think you should do the refactoring here because that'll allow you to more easily ...
4 years ago (2016-12-08 20:46:47 UTC) #20
anthonyvd
Makes a lot of sense. I refactored the stack/animation logic into the ViewStack and ViewStackState ...
4 years ago (2016-12-09 21:26:13 UTC) #21
sky
I won't be able to get to this again until Monday. If this is urgent ...
4 years ago (2016-12-09 21:45:17 UTC) #24
anthonyvd
On 2016/12/09 at 21:45:17, sky wrote: > I won't be able to get to this ...
4 years ago (2016-12-09 21:48:55 UTC) #25
sky
https://codereview.chromium.org/2528503002/diff/120001/chrome/browser/ui/views/payments/payment_request_dialog.cc File chrome/browser/ui/views/payments/payment_request_dialog.cc (right): https://codereview.chromium.org/2528503002/diff/120001/chrome/browser/ui/views/payments/payment_request_dialog.cc#newcode35 chrome/browser/ui/views/payments/payment_request_dialog.cc:35: view_stack_.reset(new ViewStack(std::move(initial_state))); Can you elaborate on why ViewStack can't ...
4 years ago (2016-12-12 01:54:32 UTC) #28
anthonyvd
Thanks for the timely review, comments addressed. https://codereview.chromium.org/2528503002/diff/120001/chrome/browser/ui/views/payments/payment_request_dialog.cc File chrome/browser/ui/views/payments/payment_request_dialog.cc (right): https://codereview.chromium.org/2528503002/diff/120001/chrome/browser/ui/views/payments/payment_request_dialog.cc#newcode35 chrome/browser/ui/views/payments/payment_request_dialog.cc:35: view_stack_.reset(new ViewStack(std::move(initial_state))); ...
4 years ago (2016-12-12 17:01:56 UTC) #29
sky
https://codereview.chromium.org/2528503002/diff/140001/chrome/browser/ui/views/payments/view_stack.cc File chrome/browser/ui/views/payments/view_stack.cc (right): https://codereview.chromium.org/2528503002/diff/140001/chrome/browser/ui/views/payments/view_stack.cc#newcode14 chrome/browser/ui/views/payments/view_stack.cc:14: class SlideOutObserver : public views::BoundsAnimatorObserver { Is this class ...
4 years ago (2016-12-12 17:38:08 UTC) #30
anthonyvd
https://codereview.chromium.org/2528503002/diff/140001/chrome/browser/ui/views/payments/view_stack.cc File chrome/browser/ui/views/payments/view_stack.cc (right): https://codereview.chromium.org/2528503002/diff/140001/chrome/browser/ui/views/payments/view_stack.cc#newcode14 chrome/browser/ui/views/payments/view_stack.cc:14: class SlideOutObserver : public views::BoundsAnimatorObserver { On 2016/12/12 at ...
4 years ago (2016-12-12 18:47:57 UTC) #32
sky
https://codereview.chromium.org/2528503002/diff/140001/chrome/browser/ui/views/payments/view_stack.cc File chrome/browser/ui/views/payments/view_stack.cc (right): https://codereview.chromium.org/2528503002/diff/140001/chrome/browser/ui/views/payments/view_stack.cc#newcode58 chrome/browser/ui/views/payments/view_stack.cc:58: On 2016/12/12 17:38:07, sky wrote: > You should override ...
4 years ago (2016-12-12 20:30:56 UTC) #33
anthonyvd
https://codereview.chromium.org/2528503002/diff/140001/chrome/browser/ui/views/payments/view_stack.cc File chrome/browser/ui/views/payments/view_stack.cc (right): https://codereview.chromium.org/2528503002/diff/140001/chrome/browser/ui/views/payments/view_stack.cc#newcode58 chrome/browser/ui/views/payments/view_stack.cc:58: On 2016/12/12 at 20:30:56, sky wrote: > On 2016/12/12 ...
4 years ago (2016-12-12 22:20:48 UTC) #34
sky
https://codereview.chromium.org/2528503002/diff/180001/chrome/browser/ui/views/payments/view_stack_unittest.cc File chrome/browser/ui/views/payments/view_stack_unittest.cc (right): https://codereview.chromium.org/2528503002/diff/180001/chrome/browser/ui/views/payments/view_stack_unittest.cc#newcode80 chrome/browser/ui/views/payments/view_stack_unittest.cc:80: base::RunLoop().Run(); On 2016/12/12 22:20:48, anthonyvd wrote: > On 2016/12/12 ...
4 years ago (2016-12-12 23:57:00 UTC) #35
anthonyvd
On 2016/12/12 at 23:57:00, sky wrote: > https://codereview.chromium.org/2528503002/diff/180001/chrome/browser/ui/views/payments/view_stack_unittest.cc > File chrome/browser/ui/views/payments/view_stack_unittest.cc (right): > > https://codereview.chromium.org/2528503002/diff/180001/chrome/browser/ui/views/payments/view_stack_unittest.cc#newcode80 ...
4 years ago (2016-12-13 16:20:54 UTC) #36
anthonyvd
On 2016/12/13 at 16:20:54, anthonyvd wrote: > On 2016/12/12 at 23:57:00, sky wrote: > > ...
4 years ago (2016-12-13 17:32:22 UTC) #37
sky
A delay of 1 is fine by me. LGTM
4 years ago (2016-12-13 18:09:27 UTC) #38
anthonyvd
On 2016/12/13 at 18:09:27, sky wrote: > A delay of 1 is fine by me. ...
4 years ago (2016-12-13 20:34:10 UTC) #39
sky
You might try kylixrd@. That said, I'm fine with you landing this now. Adjustments for ...
4 years ago (2016-12-13 21:34:12 UTC) #40
anthonyvd
On 2016/12/13 at 21:34:12, sky wrote: > You might try kylixrd@. That said, I'm fine ...
4 years ago (2016-12-13 21:36:21 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2528503002/200001
4 years ago (2016-12-14 02:31:55 UTC) #48
commit-bot: I haz the power
Committed patchset #10 (id:200001)
4 years ago (2016-12-14 02:39:32 UTC) #51
commit-bot: I haz the power
4 years ago (2016-12-14 02:41:35 UTC) #53
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/4069c4e1776b8ba44d3ddca2c2b4ce59a5fcdfc2
Cr-Commit-Position: refs/heads/master@{#438398}

Powered by Google App Engine
This is Rietveld 408576698