Merge lp:~macslow/unity8/snap-decisions-states into lp:unity8

Proposed by Mirco Müller
Status: Merged
Approved by: Michael Zanetti
Approved revision: 556
Merged at revision: 787
Proposed branch: lp:~macslow/unity8/snap-decisions-states
Merge into: lp:unity8
Prerequisite: lp:~macslow/unity8/fix-object-name-of-notification-ap-test
Diff against target: 491 lines (+330/-17)
5 files modified
qml/Notifications/Notification.qml (+61/-4)
qml/Notifications/Notifications.qml (+4/-0)
tests/qmltests/CMakeLists.txt (+1/-0)
tests/qmltests/Notifications/tst_Notifications.qml (+27/-13)
tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml (+237/-0)
To merge this branch: bzr merge lp:~macslow/unity8/snap-decisions-states
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Michael Zanetti (community) Approve
Andrea Cimitan Pending
Review via email: mp+210618@code.launchpad.net

This proposal supersedes a proposal from 2013-11-15.

Commit message

Make visual queue of (up to five) snap-decisions contract and expand according to visual design-spec.

Description of the change

Make visual queue of (up to five) snap-decisions contract and expand according to visual design-spec.

* Are there any related MPs required for this MP to build/function as expected?
There are two prerequiste branches needed for this to work. lp:~macslow/unity8/fix-object-name-of-notification-ap-test for lp:unity8 and lp:~macslow/unity-notifications/dont-ignore-placeholder for lp:unity-notifications

* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes.

* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
Not applicable.

* If you changed the UI, has there been a design review?
Showed http://www.youtube.com/watch?v=LVryb_-gRR0 to Design and they are ok with it.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:535
http://jenkins.qa.ubuntu.com/job/unity8-ci/2289/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3105
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2805
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1160
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/811
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/813
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/813/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/811
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2728
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3107
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3107/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2807
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2807/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5219
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/3828

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2289/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:535
http://jenkins.qa.ubuntu.com/job/unity8-ci/2341/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3290
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2956
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1211
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/862
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/866
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/866/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/862
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2896
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3292
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3292/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2958
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2958/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5360
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4050

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2341/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:536
http://jenkins.qa.ubuntu.com/job/unity8-ci/2348/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3314
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2978
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1218/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/869
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/873
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/873/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/869
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2918
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3316
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3316/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2980
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2980/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5382
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4087

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2348/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:537
http://jenkins.qa.ubuntu.com/job/unity8-ci/2349/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3315
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2979/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1219
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/870
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/874
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/874/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/870
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2919
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3317
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3317/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2981
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2981/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5384/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4089

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2349/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:538
http://jenkins.qa.ubuntu.com/job/unity8-ci/2350/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3326
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2990/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1220
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/871
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/875
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/875/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/871/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2927
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3328
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3328/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2992
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2992/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5391/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4098

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2350/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:538
http://jenkins.qa.ubuntu.com/job/unity8-ci/2355/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3345/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3004
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1225
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/876
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/880
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/880/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/876
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2950/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3347
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3347/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3006
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3006/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5406
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4123

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2355/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:538
http://jenkins.qa.ubuntu.com/job/unity8-ci/2371/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3387
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3041
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1241
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/892
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/896
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/896/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/892
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2983
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3389
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3389/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3043
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3043/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5438
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4169

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2371/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:539
http://jenkins.qa.ubuntu.com/job/unity8-ci/2377/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3393
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3047
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1247
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/898
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/902
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/902/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/898
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2989
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3395
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3395/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3049
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3049/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5444
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4179

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2377/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:540
http://jenkins.qa.ubuntu.com/job/unity8-ci/2378/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3397
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3051
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1248
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/899
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/903
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/903/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/899
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2993
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3399
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3399/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3053
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3053/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5448
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4186

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2378/rebuild

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

FAILED: Continuous integration, rev:541
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~macslow/unity8/snap-decisions-states/+merge/210618/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity8-ci/2474/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3854
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3439/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1344
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/995
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/999
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/999/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/995
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3379
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3880
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3880/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3441
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3441/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5797/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4716

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2474/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

15 + var result = "undefined";

I think this should be "" instead of "undefined" otherwise leaving a state might not reset stuff correctly.

===

18 + if (notificationList.currentIndex == index) {
and following lines...

You shouldn't reach out of scope here (Can break if someone. Please either user ListView.view instead of notificationList or move the logic out into the containing ListView.

===
 small coding style nitpick

70 anchors.fill: parent
71 - anchors.margins: notification.margins
72 + anchors.leftMargin: notification.margins
73 + anchors.rightMargin: notification.margins

anchors { fill: parent; ... }

===

117 + Component.onCompleted: {
118 + if (fullscreen) {
119 + notificationList.spacing = 0
120 + } else {
121 + notificationList.spacing = units.gu(.5)
122 + }
123 + }

Why can't this be a binding in the ListView? Not sure why this needs to be called every time a new delegate is created.
===

Not sure if related to this branch (and if its a real issue after all), but if I trigger sd-example-incoming-call.py and then decline the incoming call the notification doesn't go away (it works fine if I accept the call)

===

I'm calling this in a script:

./sd-example-incoming-call-canceled.py &
./sd-example-incoming-call.py &
./sd-example-incoming-file.py &
./sd-example-morning-alarm.py &
./sd-example-much-body-text.py &
./sd-example-password-entry.py &
./sd-example-simunlock.py &
./sd-example-user-auth.py &
./sd-example-using-button-tint-hint.py &

=> unity crashes.

After that I added a sleep 1 in between the lines, it still causes issues and at some point an empty rectangle appears.

===

If the first notification is expanded, and a new one comes in at position 0, the new one shows up expanded and then quickly collapses. I think that might be related to this:

125 + ListView.onAdd: {
126 + if (notificationList.currentIndex < 1 && notificationList.count > 1) {
127 + notificationList.currentIndex = 1
128 + }

The problem here is that you only correct the currentIndex after everything is built up. If you make it a binding it should work better.

===

207 + wait(500);

Is that a leftover from testing?

===

tests look good. Maybe rename them to give it a more meaningful name? make testVisualQueue does not really tell its notifications.

review: Needs Fixing
Revision history for this message
Mirco Müller (macslow) wrote :

"15 + var result = "undefined";"
fixed

" small coding style nitpick"
fixed

"Why can't this be a binding in the ListView?..."
fixed

"Not sure if related to this branch (and if its a real issue after all), but if I trigger sd-example-incoming-call.py and then decline the incoming call the notification doesn't go away (it works fine if I accept the call)"
In that example "Decline" is really only for expanding the fake ComboButton to reveal the several real declining options. This will be less confusing once we finally can use the real ComboButton-element from the SDK.

Still working on the other bits.

542. By Mirco Müller

Fixed the first set of issues from the MP-comments.

543. By Mirco Müller

More MP-comment fixes.

544. By Mirco Müller

Fixing more MP-comments... moving more control to bindings.

545. By Mirco Müller

Rename qml-test for visual snap-decision queue to make it more obvious what it is about.

546. By Mirco Müller

Typo

Revision history for this message
Mirco Müller (macslow) wrote :

"If the first notification is expanded, and a new one comes in at position 0..."
fixed

"make testVisualQueue does not really tell its notifications."
fixed

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 :

FAILED: Continuous integration, rev:546
http://jenkins.qa.ubuntu.com/job/unity8-ci/2522/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3986
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3571/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1392
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1043
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1047
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1047/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1043
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3480
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4021
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4021/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3573
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3573/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5905/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4862

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2522/rebuild

review: Needs Fixing (continuous-integration)
547. By Mirco Müller

Merged mzanetti's wait()-crushing power :)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:547
http://jenkins.qa.ubuntu.com/job/unity8-ci/2523/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3988
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3573/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1393
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1044
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1048
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1048/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1044
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3482
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4023
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4023/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3575
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3575/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5907/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4867

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2523/rebuild

review: Needs Fixing (continuous-integration)
548. By Mirco Müller

Got rid of the last wait(), but now have to fight the initialHeight assertion again... :/

549. By Mirco Müller

Added another WaitForRendering() to make the test pass again... most of the time :/

550. By Mirco Müller

This second waitForRendering() seems to help fix the issue.

551. By Mirco Müller

That didn't really help either.

552. By Mirco Müller

Rather use implicitHeight then height to get the correct value.

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 :

FAILED: Continuous integration, rev:549
http://jenkins.qa.ubuntu.com/job/unity8-ci/2530/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4007
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3592/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1400
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1051
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1055
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1055/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1051
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3498
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4048
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4048/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3594
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3594/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5923/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4896

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2530/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Mirco Müller (macslow) wrote :

Wait() are all gone and the qml-test passes again. Now it's time to look into the crash.

Revision history for this message
Mirco Müller (macslow) wrote :

The crash no longer happens. But the edge-case of the fullscreen sim-unlock snap-decision needs to be handled in special way. Since there's no UX-design for this, I will suppress it if there are already snap-decisions in queue or avoid new snap-decisions getting displayed, if there's still a fullscreen snap-decision displayed. That has to happen on the backend though.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:552
http://jenkins.qa.ubuntu.com/job/unity8-ci/2534/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4012
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3597/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1404
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1055
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1059
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1059/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1055
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3503
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4053
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4053/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3599
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3599/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5928/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4903

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2534/rebuild

review: Needs Fixing (continuous-integration)
553. By Mirco Müller

Forgot to also use the renamed test in the cmakefile.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:552
http://jenkins.qa.ubuntu.com/job/unity8-ci/2539/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4025
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3610/console
    None: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1409/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1060
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1064
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1064/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1060
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3515
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4066
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4066/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3612
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3612/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5940/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4916

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2539/rebuild

review: Needs Fixing (continuous-integration)
554. By Mirco Müller

Possible fix for segfault in notification-qmltest

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:553
http://jenkins.qa.ubuntu.com/job/unity8-ci/2544/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4033
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3618
    None: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1414/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1065
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1069
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1069/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1065
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3520
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4076
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4076/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3620
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3620/artifact/work/output/*zip*/output.zip
    None: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5946/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4923

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2544/rebuild

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

FAILED: Continuous integration, rev:554
http://jenkins.qa.ubuntu.com/job/unity8-ci/2546/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4037
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3622
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1416
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1067
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1071
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1071/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1067
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3524
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4080
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4080/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3624
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3624/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5950
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4930

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2546/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

> The crash no longer happens. But the edge-case of the fullscreen sim-unlock
> snap-decision needs to be handled in special way. Since there's no UX-design
> for this, I will suppress it if there are already snap-decisions in queue or
> avoid new snap-decisions getting displayed, if there's still a fullscreen
> snap-decision displayed. That has to happen on the backend though.

Not sure I understand correctly, what do you mean with suppressing it? Does that mean delaying it or dropping it? I'm not sure we should just drop it while I guess I'm fine with delaying it until the other notifications have been handled.

review: Needs Information
Revision history for this message
Mirco Müller (macslow) wrote :

With suppressing I mean "avoid the fullscreen/pinpad notification move from the internal snap-decisions queue into the displayed queue" until the displayed queue is empty again, thus the fullscreen/pinpad notification would be the only notification being shown.

The other case would apply as well... "don't let any notification move from an internal queue to the displayed-queue until the the fullscreen/pinpad notification is no longer displayed".

Revision history for this message
Michael Zanetti (mzanetti) wrote :

518 + if (mockModel.count > 5) {
537 + if (mockModel.count > 5) {
551 + if (mockModel.count > 5) {

Why is this? You basically disable the whole test for the first 4 runs. Can't just initialize the model with 5+ notifications if you really require them for the test?

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> With suppressing I mean "avoid the fullscreen/pinpad notification move from
> the internal snap-decisions queue into the displayed queue" until the
> displayed queue is empty again, thus the fullscreen/pinpad notification would
> be the only notification being shown.
>
> The other case would apply as well... "don't let any notification move from an
> internal queue to the displayed-queue until the the fullscreen/pinpad
> notification is no longer displayed".

ack, so effectively delaying it. works for me.

555. By Mirco Müller

Add the five test Snap-Decisions for the visual-queue test in one go.

Revision history for this message
Mirco Müller (macslow) wrote :

As discussed on IRC, the initial idea was to add all five snap-decisions in one go, but I didn't know how QML-test's data-concept worked with this. So now the test snap-decisions are added in one step and the data-concept is not used at all.

556. By Mirco Müller

Using the fill-model function from the interactive test.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?

yes

 * Did CI run pass? If not, please explain why.

unrelated mediumtests fail

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

FAILED: Continuous integration, rev:555
http://jenkins.qa.ubuntu.com/job/unity8-ci/2554/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4063/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3648
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1424
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1075
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1079
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1079/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1075
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3547/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4115
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4115/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3650
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3650/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5974
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4977

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2554/rebuild

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

FAILED: Continuous integration, rev:556
http://jenkins.qa.ubuntu.com/job/unity8-ci/2560/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4073/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3658
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1430/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1081
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1085
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1085/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1081
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3556/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4125
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4125/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3660
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3660/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5982
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4987

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2560/rebuild

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Notifications/Notification.qml'
2--- qml/Notifications/Notification.qml 2014-01-03 10:29:25 +0000
3+++ qml/Notifications/Notification.qml 2014-03-19 11:24:40 +0000
4@@ -39,20 +39,72 @@
5
6 fullscreen: false
7 objectName: "background"
8- implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 4) : 0
9+ implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
10
11 color: Qt.rgba(0.132, 0.117, 0.109, 0.97)
12 opacity: 0
13
14+ state: {
15+ var result = "";
16+
17+ if (type == Notification.SnapDecision) {
18+ if (ListView.view.currentIndex == index) {
19+ result = "expanded";
20+ } else {
21+ if (ListView.view.count > 2) {
22+ if (ListView.view.currentIndex == -1 && index == 1) {
23+ result = "expanded";
24+ } else {
25+ result = "contracted";
26+ }
27+ } else {
28+ result = "expanded";
29+ }
30+ }
31+ }
32+
33+ return result;
34+ }
35+
36+ Behavior on height {
37+ id: normalHeightBehavior
38+
39+ //enabled: menuItemFactory.progress == 1
40+ enabled: true
41+ SequentialAnimation {
42+ PauseAnimation {
43+ duration: UbuntuAnimation.SnapDuration
44+ }
45+ UbuntuNumberAnimation {
46+ duration: UbuntuAnimation.SnapDuration
47+ }
48+ }
49+ }
50+
51+ states:[
52+ State {
53+ name: "contracted"
54+ PropertyChanges {target: notification; height: units.gu(8)}
55+ },
56+ State {
57+ name: "expanded"
58+ PropertyChanges {target: notification; height: implicitHeight}
59+ }
60+ ]
61+
62 clip: fullscreen ? false : true
63+
64 visible: type != Notification.PlaceHolder
65
66 UbuntuShape {
67 id: shapedBack
68
69 visible: !fullscreen
70- anchors.fill: parent
71- anchors.margins: notification.margins
72+ anchors {
73+ fill: parent
74+ leftMargin: notification.margins
75+ rightMargin: notification.margins
76+ }
77 color: parent.color
78 opacity: parent.opacity
79 radius: "medium"
80@@ -104,17 +156,20 @@
81 MouseArea {
82 id: interactiveArea
83
84- anchors.fill: contentColumn
85+ anchors.fill: parent
86 objectName: "interactiveArea"
87 onClicked: {
88 if (notification.type == Notification.Interactive) {
89 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
90+ } else {
91+ notificationList.currentIndex = index;
92 }
93 }
94 }
95
96 Column {
97 id: contentColumn
98+ objectName: "contentColumn"
99
100 anchors {
101 left: parent.left
102@@ -207,6 +262,8 @@
103 model: unityMenuModel
104
105 NotificationMenuItemFactory {
106+ id: menuItemFactory
107+
108 anchors.left: parent.left; anchors.right: parent.right
109
110 menuModel: unityMenuModel
111
112=== modified file 'qml/Notifications/Notifications.qml'
113--- qml/Notifications/Notifications.qml 2013-12-18 12:50:55 +0000
114+++ qml/Notifications/Notifications.qml 2014-03-19 11:24:40 +0000
115@@ -25,6 +25,9 @@
116 interactive: false
117
118 property real margin
119+ spacing: delegate.fullscreen ? 0 : units.gu(.5)
120+
121+ currentIndex: (currentIndex < 1 && count > 1) ? 1 : -1
122
123 delegate: Notification {
124 objectName: "notification" + index
125@@ -75,6 +78,7 @@
126 displaced: Transition {
127 UbuntuNumberAnimation {
128 properties: "x,y"
129+ duration: UbuntuAnimation.SnapDuration
130 }
131 }
132 }
133
134=== modified file 'tests/qmltests/CMakeLists.txt'
135--- tests/qmltests/CMakeLists.txt 2014-03-14 12:08:44 +0000
136+++ tests/qmltests/CMakeLists.txt 2014-03-19 11:24:40 +0000
137@@ -82,6 +82,7 @@
138 add_qml_test(Hud Result)
139 add_qml_test(Launcher Launcher IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
140 add_qml_test(Notifications Notifications IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins)
141+add_qml_test(Notifications VisualSnapDecisionsQueue IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins)
142 add_qml_test(Panel IndicatorRow)
143 add_qml_test(Panel Indicators IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
144 add_qml_test(Panel MenuContent IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
145
146=== modified file 'tests/qmltests/Notifications/tst_Notifications.qml'
147--- tests/qmltests/Notifications/tst_Notifications.qml 2014-01-03 10:29:25 +0000
148+++ tests/qmltests/Notifications/tst_Notifications.qml 2014-03-19 11:24:40 +0000
149@@ -43,6 +43,21 @@
150 function getRaw(id) {
151 return mockNotification.createObject(mockModel)
152 }
153+
154+ // add the default/PlaceHolder notification to the model
155+ Component.onCompleted: {
156+ var n = {
157+ type: Notification.PlaceHolder,
158+ hints: {},
159+ summary: "",
160+ body: "",
161+ icon: "",
162+ secondaryIcon: "",
163+ actions: []
164+ }
165+
166+ append(n)
167+ }
168 }
169
170 function addSnapDecisionNotification() {
171@@ -376,6 +391,8 @@
172 var notification = findChild(notifications, "notification" + (mockModel.count - 1))
173 verify(notification !== undefined, "notification wasn't found");
174
175+ waitForRendering(notification);
176+
177 var icon = findChild(notification, "icon")
178 var shapedIcon = findChild(notification, "shapedIcon")
179 var nonShapedIcon = findChild(notification, "nonShapedIcon")
180@@ -384,7 +401,6 @@
181 var summaryLabel = findChild(notification, "summaryLabel")
182 var bodyLabel = findChild(notification, "bodyLabel")
183 var buttonRow = findChild(notification, "buttonRow")
184- waitForRendering(buttonRow)
185
186 compare(icon.visible, data.iconVisible, "avatar-icon visibility is incorrect")
187 compare(shapedIcon.visible, data.shapedIcon, "shaped-icon visibility is incorrect")
188@@ -407,12 +423,9 @@
189 var buttonCancel = findChild(buttonRow, "button1")
190 var buttonAccept = findChild(buttonRow, "button0")
191
192- waitForRendering(notification)
193-
194 // only test the left/cancel-button if two actions have been passed in
195 if (data.actions.length == 2) {
196- mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
197- actionSpy.wait()
198+ tryCompareFunction(function() { mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2); return actionSpy.signalArguments.length > 0; }, true);
199 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
200 actionSpy.clear()
201 }
202@@ -421,38 +434,39 @@
203 verify(buttonAccept.gradient === data.buttonTinted ? UbuntuColors.orangeGradient : UbuntuColors.greyGradient, "button has the wrong color-tint")
204
205 // click the positive/right button
206- mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2)
207- actionSpy.wait()
208+ tryCompareFunction(function() { mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2); return actionSpy.signalArguments.length > 0; }, true);
209 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id positive action")
210 actionSpy.clear()
211+ waitForRendering(notification)
212
213 // check if there's more than one negative choice
214 if (data.actions.length > 2) {
215- var initialHeight = notification.height
216+ var initialHeight = notification.implicitHeight
217
218 // click to expand
219 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
220- waitForRendering(notification)
221+ var contentColumn = findChild(notification, "contentColumn")
222+ var collapsedContentColumnHeight = contentColumn.height;
223+ // Waiting for the inner column to change height because buttons appear
224+ tryCompareFunction(function() { return collapsedContentColumnHeight != contentColumn.height; }, true);
225+ // Waiting for notification to reach its target size
226+ tryCompare(notification, "height", contentColumn.height + contentColumn.spacing * 2)
227 actionSpy.clear()
228
229 // test the additional buttons
230 for (var i = 2; i < data.actions.length; i++) {
231- waitForRendering(notification)
232 var buttonColumn = findChild(notification, "buttonColumn")
233 var button = findChild(buttonColumn, "button" + i)
234 mouseClick(button, button.width / 2, button.height / 2)
235- actionSpy.wait()
236 compare(actionSpy.signalArguments[0][0], data.actions[i]["id"], "got wrong id for additional negative action")
237 actionSpy.clear()
238 }
239
240 // click to collapse
241 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
242- waitForRendering(notification)
243 tryCompare(notification, "height", initialHeight)
244 } else {
245 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
246- actionSpy.wait()
247 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
248 }
249 }
250
251=== added file 'tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml'
252--- tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml 1970-01-01 00:00:00 +0000
253+++ tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml 2014-03-19 11:24:40 +0000
254@@ -0,0 +1,237 @@
255+/*
256+ * Copyright (C) 2014 Canonical, Ltd.
257+ *
258+ * This program is free software; you can redistribute it and/or modify
259+ * it under the terms of the GNU General Public License as published by
260+ * the Free Software Foundation; version 3.
261+ *
262+ * This program is distributed in the hope that it will be useful,
263+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
264+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
265+ * GNU General Public License for more details.
266+ *
267+ * You should have received a copy of the GNU General Public License
268+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
269+ */
270+
271+import QtQuick 2.0
272+import QtTest 1.0
273+import ".."
274+import "../../../qml/Notifications"
275+import Ubuntu.Components 0.1
276+import Unity.Test 0.1
277+import Unity.Notifications 1.0
278+
279+Row {
280+ id: rootRow
281+
282+ Component {
283+ id: mockNotification
284+
285+ QtObject {
286+ function invokeAction(actionId) {
287+ mockModel.actionInvoked(actionId)
288+ }
289+ }
290+ }
291+
292+ ListModel {
293+ id: mockModel
294+
295+ signal actionInvoked(string actionId)
296+
297+ function getRaw(id) {
298+ return mockNotification.createObject(mockModel)
299+ }
300+
301+ // add the default/PlaceHolder notification to the model
302+ Component.onCompleted: {
303+ var n = {
304+ type: Notification.PlaceHolder,
305+ hints: {},
306+ summary: "",
307+ body: "",
308+ icon: "",
309+ secondaryIcon: "",
310+ actions: []
311+ }
312+
313+ append(n)
314+ }
315+ }
316+
317+ function addSomeSnapDecisionNotifications() {
318+ var n = [{
319+ type: Notification.SnapDecision,
320+ hints: {"x-canonical-private-button-tint": "true"},
321+ summary: "Incoming call",
322+ body: "Frank Zappa\n+44 (0)7736 027340",
323+ icon: "../graphics/avatars/funky.png",
324+ secondaryIcon: "../graphics/applicationIcons/phone-app.png",
325+ actions: [{ id: "pickup_id", label: "Pick up"},
326+ { id: "decline_1_id", label: "Decline"},
327+ { id: "decline_2_id", label: "Can't talk now, what's up?"},
328+ { id: "decline_3_id", label: "I call you back."},
329+ { id: "decline_4_id", label: "Send custom message..."}]
330+ },
331+ {
332+ type: Notification.SnapDecision,
333+ hints: {"x-canonical-private-button-tint": "true",
334+ "x-canonical-non-shaped-icon": "true"},
335+ summary: "Incoming file",
336+ body: "Frank would like to send you the file: essay.pdf.",
337+ icon: "image://theme/search",
338+ actions: [{ id: "accept_id", label: "Accept"},
339+ { id: "reject_id", label: "Reject"}]
340+ },
341+ {
342+ type: Notification.SnapDecision,
343+ hints: {"x-canonical-private-button-tint": "true",
344+ "x-canonical-non-shaped-icon": "true"},
345+ summary: "Authentication error",
346+ body: "Please authorise Ubuntu to access your Google account.",
347+ icon: "image://theme/search",
348+ actions: [{ id: "settings_id", label: "Settings..."},
349+ { id: "cancel_id", label: "Cancel"}]
350+ },
351+ {
352+ type: Notification.SnapDecision,
353+ hints: {"x-canonical-private-button-tint": "true",
354+ "x-canonical-non-shaped-icon": "true"},
355+ summary: "Morning alarm",
356+ body: "It's 6:30... time to get up!",
357+ icon: "image://theme/search",
358+ actions: [{ id: "ok_reply", label: "Ok"},
359+ { id: "snooze_id", label: "Snooze"}]
360+ },
361+ {
362+ type: Notification.SnapDecision,
363+ hints: {"x-canonical-private-button-tint": "true"},
364+ summary: "Jenny Sample",
365+ body: "Hey there! Have you been watching the latest episode of that TV-show I told you about last week?",
366+ icon: "../graphics/avatars/amanda.png",
367+ secondaryIcon: "../graphics/applicationIcons/messages-app.png",
368+ actions: [{ id: "reply_id", label: "Reply"},
369+ { id: "ignore_id", label: "Ignore"}]
370+ }]
371+
372+ mockModel.append(n)
373+ }
374+
375+ function clearNotifications() {
376+ // remove all but the first (PlaceHolder) notification
377+ mockModel.remove(1, mockModel.count - 1)
378+ }
379+
380+ function removeTopMostNotification() {
381+ // leave real/first (PlaceHolder) notification untouched
382+ if (mockModel.count > 1)
383+ mockModel.remove(1)
384+ }
385+
386+ Rectangle {
387+ id: notificationsRect
388+
389+ width: units.gu(40)
390+ height: units.gu(71)
391+
392+ MouseArea{
393+ id: clickThroughCatcher
394+
395+ anchors.fill: parent
396+ }
397+
398+ Notifications {
399+ id: notifications
400+
401+ margin: units.gu(1)
402+
403+ anchors.fill: parent
404+ model: mockModel
405+ }
406+ }
407+
408+ Rectangle {
409+ id: interactiveControls
410+
411+ width: units.gu(30)
412+ height: units.gu(81)
413+ color: "grey"
414+
415+ Column {
416+ spacing: units.gu(1)
417+ anchors.fill: parent
418+ anchors.margins: units.gu(1)
419+
420+ Button {
421+ width: parent.width
422+ text: "add some snap-decisions"
423+ onClicked: addSomeSnapDecisionNotifications()
424+ }
425+
426+ Button {
427+ width: parent.width
428+ text: "remove top-most notification"
429+ onClicked: removeTopMostNotification()
430+ }
431+
432+ Button {
433+ width: parent.width
434+ text: "clear model"
435+ onClicked: clearNotifications()
436+ }
437+ }
438+ }
439+
440+ UnityTestCase {
441+ id: root
442+ name: "VisualQueueTest"
443+ when: windowShown
444+
445+ function test_VisualSnapDecisionsQueue() {
446+ // populate model with some mock notifications
447+ addSomeSnapDecisionNotifications();
448+
449+ // make sure the view is properly updated before going on
450+ waitForRendering(notifications);
451+
452+ var snap_decision = [findChild(notifications, "notification1"),
453+ findChild(notifications, "notification2"),
454+ findChild(notifications, "notification3"),
455+ findChild(notifications, "notification4"),
456+ findChild(notifications, "notification5")]
457+
458+ for (var index = 0; index < snap_decision.length; index++) {
459+ verify(snap_decision[index] !== undefined, index + ". snap-decision wasn't found");
460+ }
461+
462+ // check initial states once all five snap-decisions were appended to the model
463+ compare(snap_decision[0].state, "expanded", "state of first snap-decision is not expanded");
464+ for (var index = 1; index < snap_decision.length; index++) {
465+ compare(snap_decision[index].state, "contracted", "state of "+ index + ".snap-decision is not contracted");
466+ }
467+
468+ // click/tap on each snap-decision and verify only one is in expanded-state at any time
469+ for (var index = 0; index < snap_decision.length; index++) {
470+ mouseClick(snap_decision[index], snap_decision[index].width / 2, snap_decision[index].height / 2)
471+ for (var kindex = 0; kindex < snap_decision.length; kindex++) {
472+ if (kindex == index) {
473+ compare(snap_decision[kindex].state, "expanded", "state of "+ kindex + ".snap-decision is not expanded");
474+ } else {
475+ compare(snap_decision[kindex].state, "contracted", "state of "+ kindex + ".snap-decision is not contracted");
476+ }
477+ }
478+ }
479+
480+ // remove top-most and verify one of the remaining ones is still getting expanded
481+
482+ // make first snap-decision expand
483+ mouseClick(snap_decision[0], snap_decision[0].width / 2, snap_decision[0].height / 2);
484+
485+ for (var index = 1; index < snap_decision.length; index++) {
486+ removeTopMostNotification();
487+ compare(snap_decision[index].state, "expanded", "state of " + index + ". snap-decision is not expanded");
488+ }
489+ }
490+ }
491+}

Subscribers

People subscribed via source and target branches