Merge lp:~macslow/unity8/modal-snap-decisions into lp:unity8
- modal-snap-decisions
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Albert Astals Cid |
Approved revision: | 779 |
Merged at revision: | 874 |
Proposed branch: | lp:~macslow/unity8/modal-snap-decisions |
Merge into: | lp:unity8 |
Diff against target: |
164 lines (+113/-1) 4 files modified
debian/control (+1/-1) qml/Notifications/Notifications.qml (+11/-0) qml/Shell.qml (+18/-0) tests/autopilot/unity8/shell/tests/test_notifications.py (+83/-0) |
To merge this branch: | bzr merge lp:~macslow/unity8/modal-snap-decisions |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Albert Astals Cid (community) | Approve | ||
Michał Sawicz | Approve | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Jouni Helminen (community) | Approve | ||
Review via email: mp+210988@code.launchpad.net |
Commit message
Implemented feature-request from Design for modal snap-decision notifications on the phone. See LP #1285712
Description of the change
Implemented feature-request from Design for modal snap-decision notifications on the phone. See LP #1285712
* Are there any related MPs required for this MP to build/function as expected?
Yes, lp:~macslow/unity-notifications/modal-snap-decisions and lp:~macslow/unity-api/version-bump-to-0.1.3 is needed for this to work.
* 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?
Yes.
* If you changed the UI, has there been a design review?
Since this is a Design-feature request, they are certainly aware and expecting this change. Still waiting on Design-feedback on screencast of implementation shown here: https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:766
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:766
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michał Sawicz (saviq) wrote : | # |
8 + Component.
9 + if (type == Notification.
10 + notificationLis
11 + }
12 + }
13 +
14 + Component.
15 + if (type == Notification.
16 + notificationLis
17 + }
18 + }
19 +
That will be racy. Use a SortFilterProxy
Mirco Müller (macslow) wrote : | # |
Fixed with r767.
Mirco Müller (macslow) wrote : | # |
Please note the added requirement for lp:~macslow/unity-notifications/modal-snap-decisions now.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:767
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
Text conflict in qml/Notificatio
Mirco Müller (macslow) wrote : | # |
Merged with trunk and fixed resulting merge-conflict.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:768
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:768
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:770
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Jouni Helminen (jounihelminen) wrote : | # |
Looks good! approved
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:770
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Michał Sawicz (saviq) wrote : | # |
Too quick, we still need code reviews ;)
Albert Astals Cid (aacid) wrote : | # |
Can you collapse this two lines in one?
+ property bool useModal
+
+ useModal: snapDecisionPro
Look a bit weird this way
Mirco Müller (macslow) wrote : | # |
Done
Albert Astals Cid (aacid) wrote : | # |
I'm having two autopilot tests when running this+dependencies on the phone. Please have a look.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:771
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:772
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
Code looks good. Tests pass.
* 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.
No, otto is a bit broken.
Michał Sawicz (saviq) wrote : | # |
Please strip tags, you can use the script:
http://
Pass lp:~macslow/unity8/modal-snap-decisions as an argument.
Mirco Müller (macslow) wrote : | # |
The tag-wiping has been kicked off... taking its time :)
Mirco Müller (macslow) wrote : | # |
All tags cleaned up.
Michał Sawicz (saviq) wrote : | # |
A few things I noticed here:
- unity-notificat
- I can still interact with apps behind the darkening
- using ./sd-example-
Michał Sawicz (saviq) wrote : | # |
Actually the last item from above is a bug in trunk: bug #1308011
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:774
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 775. By Mirco Müller
-
Make sure input is also blocked for apps when snap-decisions show up.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:775
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 776. By Mirco Müller
-
Make sure to depend on unity-notificat
ions-impl- 3. - 777. By Mirco Müller
-
Make sure build depends on unity-notificat
ions-impl- 3 (unity-api 0.1.3).
Mirco Müller (macslow) wrote : | # |
The requested version-bump is done. See...
https:/
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:777
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Michał Sawicz (saviq) wrote : | # |
8 + unity-notificat
Don't add that in build-dependencies. We already have libunity-api-dev (>= 0.1.3)
16 - qtdeclarative5-
17 + qtdeclarative5-
Leave that be.
21 - unity-notificat
22 + unity-notificat
Only this needs to happen.
Michał Sawicz (saviq) wrote : | # |
(>= 7.80.6) that is, and that's fine - we don't rely on the changes for our *mocks*, for which this would be necessary.
- 778. By Mirco Müller
-
Only bump the run-time dependency regarding the unity-notificat
ions.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:778
http://
Executed test runs:
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
Text conflict in debian/control
1 conflicts encountered.
- 779. By Mirco Müller
-
Merged with trunk and resolved merge-conflicts.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:779
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michał Sawicz (saviq) wrote : | # |
Packaging looks good.
Albert Astals Cid (aacid) wrote : | # |
Talking with Saviq over IRC he agrees the issues he raised are now fixed.
Preview Diff
1 | === modified file 'debian/control' |
2 | --- debian/control 2014-04-29 15:08:05 +0000 |
3 | +++ debian/control 2014-04-30 08:42:30 +0000 |
4 | @@ -102,7 +102,7 @@ |
5 | qtdeclarative5-unity-notifications-plugin | unity-notifications-impl, |
6 | ubuntu-thumbnailer-impl-0, |
7 | unity-application-impl-2, |
8 | - unity-notifications-impl-2, |
9 | + unity-notifications-impl-3, |
10 | unity-plugin-scopes | unity-scopes-impl, |
11 | unity-scopes-impl-0, |
12 | unity8-fake-env | unity-application-impl, |
13 | |
14 | === modified file 'qml/Notifications/Notifications.qml' |
15 | --- qml/Notifications/Notifications.qml 2014-03-17 15:31:06 +0000 |
16 | +++ qml/Notifications/Notifications.qml 2014-04-30 08:42:30 +0000 |
17 | @@ -16,6 +16,8 @@ |
18 | |
19 | import QtQuick 2.0 |
20 | import Ubuntu.Components 0.1 |
21 | +import Unity.Notifications 1.0 as UnityNotifications |
22 | +import Utils 0.1 |
23 | import "../Components" |
24 | |
25 | ListView { |
26 | @@ -25,6 +27,15 @@ |
27 | interactive: false |
28 | |
29 | property real margin |
30 | + property bool useModal: snapDecisionProxyModel.count > 0 |
31 | + |
32 | + SortFilterProxyModel { |
33 | + id: snapDecisionProxyModel |
34 | + |
35 | + model: notificationList.model |
36 | + filterRole: UnityNotifications.ModelInterface.RoleType |
37 | + filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision) |
38 | + } |
39 | spacing: delegate.fullscreen ? 0 : units.gu(.5) |
40 | |
41 | currentIndex: (currentIndex < 1 && count > 1) ? 1 : -1 |
42 | |
43 | === modified file 'qml/Shell.qml' |
44 | --- qml/Shell.qml 2014-04-17 15:43:16 +0000 |
45 | +++ qml/Shell.qml 2014-04-30 08:42:30 +0000 |
46 | @@ -582,6 +582,24 @@ |
47 | } |
48 | } |
49 | |
50 | + Rectangle { |
51 | + id: modalNotificationBackground |
52 | + |
53 | + visible: notifications.useModal && !greeter.shown && (notifications.state == "narrow") |
54 | + color: "#000000" |
55 | + anchors.fill: parent |
56 | + opacity: 0.5 |
57 | + |
58 | + MouseArea { |
59 | + anchors.fill: parent |
60 | + } |
61 | + |
62 | + InputFilterArea { |
63 | + anchors.fill: parent |
64 | + blockInput: modalNotificationBackground.visible |
65 | + } |
66 | + } |
67 | + |
68 | Notifications { |
69 | id: notifications |
70 | |
71 | |
72 | === modified file 'tests/autopilot/unity8/shell/tests/test_notifications.py' |
73 | --- tests/autopilot/unity8/shell/tests/test_notifications.py 2014-04-29 15:21:20 +0000 |
74 | +++ tests/autopilot/unity8/shell/tests/test_notifications.py 2014-04-30 08:42:30 +0000 |
75 | @@ -211,6 +211,89 @@ |
76 | self.touch.tap_object(notification.select_single(objectName="button4")) |
77 | self.assert_notification_action_id_was_called("action_decline_4") |
78 | |
79 | + def test_modal_sd_without_greeter (self): |
80 | + """A snap-decision on a phone should block input to shell beneath it when there's no greeter.""" |
81 | + unity_proxy = self.launch_unity() |
82 | + unlock_unity(unity_proxy) |
83 | + |
84 | + summary = "Incoming file" |
85 | + body = "Frank would like to send you the file: essay.pdf" |
86 | + icon_path = "sync-idle" |
87 | + hints = [ |
88 | + ("x-canonical-snap-decisions", "true"), |
89 | + ("x-canonical-non-shaped-icon", "true"), |
90 | + ] |
91 | + |
92 | + actions = [ |
93 | + ('action_accept', 'Accept'), |
94 | + ('action_decline_1', 'Decline'), |
95 | + ] |
96 | + |
97 | + self._create_interactive_notification( |
98 | + summary, |
99 | + body, |
100 | + icon_path, |
101 | + "NORMAL", |
102 | + actions, |
103 | + hints |
104 | + ) |
105 | + |
106 | + # verify that we cannot reveal the launcher (no longer interact with the shell) |
107 | + time.sleep(1) |
108 | + self.main_window.show_dash_swiping() |
109 | + launcher = self.main_window.get_launcher() |
110 | + self.assertThat(launcher.shown, Eventually(Equals(False))) |
111 | + |
112 | + # verify and interact with the triggered snap-decision notification |
113 | + notify_list = self._get_notifications_list() |
114 | + get_notification = lambda: notify_list.wait_select_single( |
115 | + 'Notification', objectName='notification1') |
116 | + notification = get_notification() |
117 | + self._assert_notification(notification, summary, body, True, False, 1.0) |
118 | + self.touch.tap_object(notification.select_single(objectName="button0")) |
119 | + self.assert_notification_action_id_was_called("action_accept") |
120 | + |
121 | + def test_modal_sd_with_greeter (self): |
122 | + """A snap-decision on a phone should not block input to the greeter beneath it.""" |
123 | + unity_proxy = self.launch_unity() |
124 | + |
125 | + summary = "Incoming file" |
126 | + body = "Frank would like to send you the file: essay.pdf" |
127 | + icon_path = "sync-idle" |
128 | + hints = [ |
129 | + ("x-canonical-snap-decisions", "true"), |
130 | + ("x-canonical-non-shaped-icon", "true"), |
131 | + ] |
132 | + |
133 | + actions = [ |
134 | + ('action_accept', 'Accept'), |
135 | + ('action_decline_1', 'Decline'), |
136 | + ] |
137 | + |
138 | + self._create_interactive_notification( |
139 | + summary, |
140 | + body, |
141 | + icon_path, |
142 | + "NORMAL", |
143 | + actions, |
144 | + hints |
145 | + ) |
146 | + |
147 | + # verify that we can swipe away the greeter (interact with the "shell") |
148 | + time.sleep(1) |
149 | + self.main_window.show_dash_swiping() |
150 | + greeter = self.main_window.get_greeter() |
151 | + self.assertThat(greeter.shown, Eventually(Equals(False))) |
152 | + |
153 | + # verify and interact with the triggered snap-decision notification |
154 | + notify_list = self._get_notifications_list() |
155 | + get_notification = lambda: notify_list.wait_select_single( |
156 | + 'Notification', objectName='notification1') |
157 | + notification = get_notification() |
158 | + self._assert_notification(notification, summary, body, True, False, 1.0) |
159 | + self.touch.tap_object(notification.select_single(objectName="button0")) |
160 | + self.assert_notification_action_id_was_called("action_accept") |
161 | + |
162 | def _create_interactive_notification( |
163 | self, |
164 | summary="", |
FAILED: Continuous integration, rev:765 jenkins. qa.ubuntu. com/job/ unity8- ci/2492/ jenkins. qa.ubuntu. com/job/ generic- mediumtests- trusty/ 3903/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- trusty- touch/3488/ console jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- trusty/ 1362/console jenkins. qa.ubuntu. com/job/ unity8- trusty- amd64-ci/ 1013/console jenkins. qa.ubuntu. com/job/ unity8- trusty- armhf-ci/ 1017/console jenkins. qa.ubuntu. com/job/ unity8- trusty- i386-ci/ 1013/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- amd64/3936/ console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- armhf/3490/ console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity8- ci/2492/ rebuild
http://