Merge lp:~diegosarmentero/unity8/processing-signal into lp:unity8

Proposed by Diego Sarmentero
Status: Merged
Approved by: Michał Sawicz
Approved revision: 1135
Merged at revision: 1189
Proposed branch: lp:~diegosarmentero/unity8/processing-signal
Merge into: lp:unity8
Diff against target: 86 lines (+46/-3)
2 files modified
qml/Dash/Previews/PreviewPayments.qml (+22/-3)
tests/qmltests/Dash/Previews/tst_PreviewPayments.qml (+24/-0)
To merge this branch: bzr merge lp:~diegosarmentero/unity8/processing-signal
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michał Sawicz Approve
Review via email: mp+230002@code.launchpad.net

Commit message

Show progress bar on payment button click

The payment process has a small delay before the UI comes up which might cause confusion. Show a progress bar with unknown value to indicate activity.

To post a comment you must log in.
1117. By Diego Sarmentero

changing property name

Revision history for this message
Alejandro J. Cura (alecu) wrote :

Please make sure to test this branch with the very latest change in the spinner (a cylon-like orange bar at the bottom of the screen)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1118. By Diego Sarmentero

[ Michal Hruby ]
* Work with the scopes-v4 branch + departments->navigation renaming
[ Michał Sawicz ]
* Hardcode art shape size for click scope local and predefined
  categories While at it, drop the fillmode of cards
* Use the correct API in PageHeader. (LP: #1353048)
* Refactor dash activity indicator. (LP: #1351539)
[ Albert Astals ]
* Dash Departments fixes Update maxHeight manually since it depends on
  the position of the item and its parents and it can't know when the
  binding has to be updated Make parent stuff non interactive when the
  department list is shown
* PageHeader: when on search clip y-coordinates otherwise the
  background spills out when on search (LP: #1350398)
* Dash: Implement OverlayColor support in Cards
* Hardcode art shape size for click scope local and predefined
  categories While at it, drop the fillmode of cards
* Make test_departments test more stable There's various
  DashDepartments on the dash, make sure we're working over the one
  that is on screen, otherwise clicks don't end up where they should
* Work with the scopes-v4 branch + departments->navigation renaming
* Fixes for dash as app Load i18n catalog Process command line options
  Add the posibility to have a mouse touch adaptor (LP: #1353351)
* Implement the Expandable Preview Widget Now TextSummary is not
  expandable by itself anymore, you have to use it inside an
  Expandable to get the behaviour
* Add test prefix to xml output, seems CI needs it
[ Antti Kaijanmäki ]
* Indicators: Adds new ModemInfoItem to be used with indicator-network
  (LP: #1329204)
[ Michael Terry ]
* When the edge demo is running, don't show the greeter if the screen
  is turned off. This avoids an odd interaction where parts of the
  greeter are disabled but the edge demo isn't visible until you slide
  the greeter away. (LP: #1283425)
* Don't hardcode the phablet password in our testing script.
[ Ying-Chun Liu ]
* Add divider dots.
[ Mirco Müller ]
* Make sure the TextField of a snap-decision notification has the
  active focus upon creation, thus the osk shows up right away. (LP:
  #1346867)
[ Andrea Cimitan ]
* Add touchdown effect to dash cards.
* Import Ubuntu.Components for preview image gallery to pick up
  default flicking speeds.

1119. By Diego Sarmentero

show processing feedback on action progress

1120. By Diego Sarmentero

fix attribute naming

1121. By Diego Sarmentero

fixing variable name

1122. By Diego Sarmentero

disable button on process action

1123. By Diego Sarmentero

link button enabled state to processActive attribute

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1124. By Diego Sarmentero

fix doc string

Revision history for this message
Michał Sawicz (saviq) wrote :

I think we should instead replace the button with

ProgressBar {
  indeterminate: true
}

This way we don't need the weird "Purchasing…" string, nor we have a button which is not really a button, in the UI. And then the bottom activity indicator is meant to convey that there's communication between the dash and the scope, so the whole page isn't ready, which isn't the case here.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1125. By Diego Sarmentero

show progress bar instead of spinner

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

See inline.

review: Needs Fixing
Revision history for this message
Michał Sawicz (saviq) wrote :

Also, could you add a test confirming this behaves as expected?

1126. By Diego Sarmentero

invert calls

1127. By Diego Sarmentero

improves requested

1128. By Diego Sarmentero

specific opacity

1129. By Diego Sarmentero

opacity fixed

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1130. By Diego Sarmentero

adding test

Revision history for this message
Michał Sawicz (saviq) wrote :

See inline.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1131. By Diego Sarmentero

fixing proposal

Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

> See inline.

Done

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Failed tests:
qmltestrunner.PreviewPaymentsTest::test_purchase_completed
qmltestrunner.PreviewPaymentsTest::test_purchase_error

Your new test leaves artifacts (the progress bar is on screen indefinitely).

You need to either recreate the widget in init() or somehow reset it in cleanup().

review: Needs Fixing
1132. By Diego Sarmentero

cleanup in test

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

I can see the pulsating text when going tryPreviewPayments, and the test below (please add it) supports that:

=== modified file 'tests/qmltests/Dash/Previews/tst_PreviewPayments.qml'
--- tests/qmltests/Dash/Previews/tst_PreviewPayments.qml 2014-08-15 18:03:55 +0000
+++ tests/qmltests/Dash/Previews/tst_PreviewPayments.qml 2014-08-19 12:32:44 +0000
@@ -88,6 +88,11 @@
             var button = findChild(root, "paymentButton");
             var progress = findChild(root, "loadingBar");

+ tryCompare(progress, "visible", false);
+ tryCompare(progress, "opacity", 0);
+ tryCompare(button, "visible", true);
+ tryCompare(button, "opacity", 1);
+
             mouseClick(button, button.width / 2, button.height / 2);

             spy.wait();

review: Needs Fixing
1133. By Diego Sarmentero

changing visibility link

1134. By Diego Sarmentero

[ CI bot ]
* Resync trunk
[ Michał Sawicz ]
* Fix dash overview test and prevent crash in mock ApplicationInfo's
  d'tor. tryCompareFunction didn't work because .item threw.
[ Michael Terry ]
* Bring dialer to front on incoming call even when device is locked
  (LP: #1354532)
[ CI bot ]
* Resync trunk
[ Michał Sawicz ]
* Use palette's baseText for text colour in dash.
* Update qmltypes definitions
* Move PageHeader out of qml/Components into qml/Dash
* Reshuffle and update dependencies
* Fix cardtool test and make card creator output debugging info on
  errors.
* Support previews for scopes in overview and hook up preview
  processing to activity indicator.
* Fix notifications indicator title
* Fix horizontal list activation and add test for it.
[ Ying-Chun Liu ]
* Add button colors and i18n for power off dialog. (LP: #1354506)
[ Mirco Müller ]
* Force plain-text rendering for summary- and body-text. (LP:
  #1335787)
[ Michael Terry ]
* Add --lightdm= argument to ./run.sh that lets developers choose
  which lightdm backend to use. Stop letting a user that is
  immediately denied via PAM into the shell by fixing some assumptions
  that a user which was not prompted was successfully authenticated.
  This is not a common situation, you'd have to manually change your
  PAM config. Fix a small console warning .
* Make wrong-password handling much nicer by showing a pretty spinner
  while we wait for PAM, by improving the prompt text to match
  designs, by forcing the user to wait five seconds after every five
  failed attemps, and by supporting (but not yet enabling) an opt-in
  "factory-reset your phone after X failed attemps" feature.
[ Michael Zanetti ]
* bring back network caching in dash (LP: #1355729)
[ Michał Sawicz ]
* Add --lightdm= argument to ./run.sh that lets developers choose
  which lightdm backend to use. Stop letting a user that is
  immediately denied via PAM into the shell by fixing some assumptions
  that a user which was not prompted was successfully authenticated.
  This is not a common situation, you'd have to manually change your
  PAM config. Fix a small console warning .
* Fix anchor in PreviewListView.qml.
* Make wrong-password handling much nicer by showing a pretty spinner
  while we wait for PAM, by improving the prompt text to match
  designs, by forcing the user to wait five seconds after every five
  failed attemps, and by supporting (but not yet enabling) an opt-in
  "factory-reset your phone after X failed attemps" feature.
* Add new horizontal list category layout. (LP: #1352226)
* Fix qml tests - loader around PageHeader, more retries for selecting
  a scope and undefined attributes in mock overview scope.
[ Leo Arias ]
* Added autopilot helpers and tests for the launcher and dash icon.
* Added an autopilot helper to click a scope item.
* Added an autopilot test for focusing an app clicking the icon on the
  launcher.
[ Mirco Müller ]
* Allow ENTER/RETURN in a TextField to accept a snap-decision
  notification. (LP: #1305885)
[ Andrea Cimitan ]
* Add emblem support in dash cards.
[ Michael Terry ]
* Fix a variety of design nits with the current lockscreen: * disable
  indicators and launcher when locked * when reversing the direction
  of a greeter flick, treat it as a cancel * don't animate dots when
  changing the infographic data source * make cancelling a login
  nicer: * reduce the delay before greeter starts animating * show the
  greeter from the same side of the screen that it hid to * don't re-
  animate the infographic (LP: #1351027)
[ Stephen M. Webb ]
* enables the unity8 upstart job for desktop sessions (LP: #1353041)
[ Albert Astals ]
* Dash Overview (LP: #1317683)
* GenericScopeView: On click only activate scope:// uris and
  clickscope items The rest of clicks result in a preview, also
  scope:// uris don't get a preview
* Pass the scope search hint up to the search line
[ CI bot ]
* Resync trunk
[ Nick Dedekind ]
* Added application prompt surfaces to allow prompting application
  which have not yet created a surface.

Revision history for this message
Michał Sawicz (saviq) wrote :

> I can see the pulsating text when going tryPreviewPayments, and the test below (please add it) supports that:

OK this was some temporary thing. Passes / works now. Please that part
of the test to verify.

1135. By Diego Sarmentero

checking before click

Revision history for this message
Michał Sawicz (saviq) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Y
 * Did CI run pass? If not, please explain why.
Y!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/Previews/PreviewPayments.qml'
2--- qml/Dash/Previews/PreviewPayments.qml 2014-06-30 14:43:01 +0000
3+++ qml/Dash/Previews/PreviewPayments.qml 2014-08-19 14:48:34 +0000
4@@ -37,9 +37,15 @@
5
6 color: Theme.palette.selected.foreground
7 text: paymentClient.formattedPrice
8- onClicked: paymentClient.start()
9+ onClicked: {
10+ paymentClient.start();
11+ paymentButton.opacity = 0;
12+ }
13 anchors.right: parent.right
14 width: (root.width - units.gu(1)) / 2
15+ opacity: 1
16+ visible: paymentButton.opacity == 0 ? false : true
17+ Behavior on opacity { PropertyAnimation { duration: UbuntuAnimation.FastDuration } }
18
19 Payments {
20 id: paymentClient
21@@ -49,8 +55,21 @@
22 price: source["price"]
23 currency: source["currency"]
24 storeItemId: source["store_item_id"]
25- onPurchaseCompleted: root.triggered(widgetId, "purchaseCompleted", source)
26- onPurchaseError: root.triggered(widgetId, "purchaseError", source)
27+ onPurchaseCompleted: {
28+ root.triggered(widgetId, "purchaseCompleted", source);
29+ }
30+ onPurchaseError: {
31+ root.triggered(widgetId, "purchaseError", source);
32+ }
33 }
34 }
35+
36+ ProgressBar {
37+ id: loadingBar
38+ objectName: "loadingBar"
39+ indeterminate: true
40+ anchors.fill: paymentButton
41+ opacity: 1 - paymentButton.opacity
42+ visible: !paymentButton.visible
43+ }
44 }
45
46=== modified file 'tests/qmltests/Dash/Previews/tst_PreviewPayments.qml'
47--- tests/qmltests/Dash/Previews/tst_PreviewPayments.qml 2014-07-01 14:36:25 +0000
48+++ tests/qmltests/Dash/Previews/tst_PreviewPayments.qml 2014-08-19 14:48:34 +0000
49@@ -52,6 +52,8 @@
50 function cleanup()
51 {
52 spy.clear();
53+ var button = findChild(root, "paymentButton");
54+ button.opacity = 1;
55 }
56
57 function test_purchase_text_display() {
58@@ -79,6 +81,28 @@
59 compare(args[2], jsonPurchase["source"]);
60 }
61
62+ function test_progress_show() {
63+ // Make sure the progress bar is shown.
64+ previewPayments.widgetData = jsonPurchase;
65+
66+ var button = findChild(root, "paymentButton");
67+ var progress = findChild(root, "loadingBar");
68+
69+ tryCompare(progress, "visible", false);
70+ tryCompare(progress, "opacity", 0);
71+ tryCompare(button, "visible", true);
72+ tryCompare(button, "opacity", 1);
73+
74+ mouseClick(button, button.width / 2, button.height / 2);
75+
76+ spy.wait();
77+
78+ tryCompare(progress, "visible", true);
79+ tryCompare(progress, "opacity", 1);
80+ tryCompare(button, "visible", false);
81+ tryCompare(button, "opacity", 0);
82+ }
83+
84 function test_purchase_error() {
85 // The mock Payments triggers an error when com.example.invalid is
86 // passed to it as store_item_id. Exercise it here

Subscribers

People subscribed via source and target branches