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 | 102 | qtdeclarative5-unity-notifications-plugin | unity-notifications-impl, | 102 | qtdeclarative5-unity-notifications-plugin | unity-notifications-impl, |
6 | 103 | ubuntu-thumbnailer-impl-0, | 103 | ubuntu-thumbnailer-impl-0, |
7 | 104 | unity-application-impl-2, | 104 | unity-application-impl-2, |
9 | 105 | unity-notifications-impl-2, | 105 | unity-notifications-impl-3, |
10 | 106 | unity-plugin-scopes | unity-scopes-impl, | 106 | unity-plugin-scopes | unity-scopes-impl, |
11 | 107 | unity-scopes-impl-0, | 107 | unity-scopes-impl-0, |
12 | 108 | unity8-fake-env | unity-application-impl, | 108 | unity8-fake-env | unity-application-impl, |
13 | 109 | 109 | ||
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 | 16 | 16 | ||
19 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
20 | 18 | import Ubuntu.Components 0.1 | 18 | import Ubuntu.Components 0.1 |
21 | 19 | import Unity.Notifications 1.0 as UnityNotifications | ||
22 | 20 | import Utils 0.1 | ||
23 | 19 | import "../Components" | 21 | import "../Components" |
24 | 20 | 22 | ||
25 | 21 | ListView { | 23 | ListView { |
26 | @@ -25,6 +27,15 @@ | |||
27 | 25 | interactive: false | 27 | interactive: false |
28 | 26 | 28 | ||
29 | 27 | property real margin | 29 | property real margin |
30 | 30 | property bool useModal: snapDecisionProxyModel.count > 0 | ||
31 | 31 | |||
32 | 32 | SortFilterProxyModel { | ||
33 | 33 | id: snapDecisionProxyModel | ||
34 | 34 | |||
35 | 35 | model: notificationList.model | ||
36 | 36 | filterRole: UnityNotifications.ModelInterface.RoleType | ||
37 | 37 | filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision) | ||
38 | 38 | } | ||
39 | 28 | spacing: delegate.fullscreen ? 0 : units.gu(.5) | 39 | spacing: delegate.fullscreen ? 0 : units.gu(.5) |
40 | 29 | 40 | ||
41 | 30 | currentIndex: (currentIndex < 1 && count > 1) ? 1 : -1 | 41 | currentIndex: (currentIndex < 1 && count > 1) ? 1 : -1 |
42 | 31 | 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 | 582 | } | 582 | } |
48 | 583 | } | 583 | } |
49 | 584 | 584 | ||
50 | 585 | Rectangle { | ||
51 | 586 | id: modalNotificationBackground | ||
52 | 587 | |||
53 | 588 | visible: notifications.useModal && !greeter.shown && (notifications.state == "narrow") | ||
54 | 589 | color: "#000000" | ||
55 | 590 | anchors.fill: parent | ||
56 | 591 | opacity: 0.5 | ||
57 | 592 | |||
58 | 593 | MouseArea { | ||
59 | 594 | anchors.fill: parent | ||
60 | 595 | } | ||
61 | 596 | |||
62 | 597 | InputFilterArea { | ||
63 | 598 | anchors.fill: parent | ||
64 | 599 | blockInput: modalNotificationBackground.visible | ||
65 | 600 | } | ||
66 | 601 | } | ||
67 | 602 | |||
68 | 585 | Notifications { | 603 | Notifications { |
69 | 586 | id: notifications | 604 | id: notifications |
70 | 587 | 605 | ||
71 | 588 | 606 | ||
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 | 211 | self.touch.tap_object(notification.select_single(objectName="button4")) | 211 | self.touch.tap_object(notification.select_single(objectName="button4")) |
77 | 212 | self.assert_notification_action_id_was_called("action_decline_4") | 212 | self.assert_notification_action_id_was_called("action_decline_4") |
78 | 213 | 213 | ||
79 | 214 | def test_modal_sd_without_greeter (self): | ||
80 | 215 | """A snap-decision on a phone should block input to shell beneath it when there's no greeter.""" | ||
81 | 216 | unity_proxy = self.launch_unity() | ||
82 | 217 | unlock_unity(unity_proxy) | ||
83 | 218 | |||
84 | 219 | summary = "Incoming file" | ||
85 | 220 | body = "Frank would like to send you the file: essay.pdf" | ||
86 | 221 | icon_path = "sync-idle" | ||
87 | 222 | hints = [ | ||
88 | 223 | ("x-canonical-snap-decisions", "true"), | ||
89 | 224 | ("x-canonical-non-shaped-icon", "true"), | ||
90 | 225 | ] | ||
91 | 226 | |||
92 | 227 | actions = [ | ||
93 | 228 | ('action_accept', 'Accept'), | ||
94 | 229 | ('action_decline_1', 'Decline'), | ||
95 | 230 | ] | ||
96 | 231 | |||
97 | 232 | self._create_interactive_notification( | ||
98 | 233 | summary, | ||
99 | 234 | body, | ||
100 | 235 | icon_path, | ||
101 | 236 | "NORMAL", | ||
102 | 237 | actions, | ||
103 | 238 | hints | ||
104 | 239 | ) | ||
105 | 240 | |||
106 | 241 | # verify that we cannot reveal the launcher (no longer interact with the shell) | ||
107 | 242 | time.sleep(1) | ||
108 | 243 | self.main_window.show_dash_swiping() | ||
109 | 244 | launcher = self.main_window.get_launcher() | ||
110 | 245 | self.assertThat(launcher.shown, Eventually(Equals(False))) | ||
111 | 246 | |||
112 | 247 | # verify and interact with the triggered snap-decision notification | ||
113 | 248 | notify_list = self._get_notifications_list() | ||
114 | 249 | get_notification = lambda: notify_list.wait_select_single( | ||
115 | 250 | 'Notification', objectName='notification1') | ||
116 | 251 | notification = get_notification() | ||
117 | 252 | self._assert_notification(notification, summary, body, True, False, 1.0) | ||
118 | 253 | self.touch.tap_object(notification.select_single(objectName="button0")) | ||
119 | 254 | self.assert_notification_action_id_was_called("action_accept") | ||
120 | 255 | |||
121 | 256 | def test_modal_sd_with_greeter (self): | ||
122 | 257 | """A snap-decision on a phone should not block input to the greeter beneath it.""" | ||
123 | 258 | unity_proxy = self.launch_unity() | ||
124 | 259 | |||
125 | 260 | summary = "Incoming file" | ||
126 | 261 | body = "Frank would like to send you the file: essay.pdf" | ||
127 | 262 | icon_path = "sync-idle" | ||
128 | 263 | hints = [ | ||
129 | 264 | ("x-canonical-snap-decisions", "true"), | ||
130 | 265 | ("x-canonical-non-shaped-icon", "true"), | ||
131 | 266 | ] | ||
132 | 267 | |||
133 | 268 | actions = [ | ||
134 | 269 | ('action_accept', 'Accept'), | ||
135 | 270 | ('action_decline_1', 'Decline'), | ||
136 | 271 | ] | ||
137 | 272 | |||
138 | 273 | self._create_interactive_notification( | ||
139 | 274 | summary, | ||
140 | 275 | body, | ||
141 | 276 | icon_path, | ||
142 | 277 | "NORMAL", | ||
143 | 278 | actions, | ||
144 | 279 | hints | ||
145 | 280 | ) | ||
146 | 281 | |||
147 | 282 | # verify that we can swipe away the greeter (interact with the "shell") | ||
148 | 283 | time.sleep(1) | ||
149 | 284 | self.main_window.show_dash_swiping() | ||
150 | 285 | greeter = self.main_window.get_greeter() | ||
151 | 286 | self.assertThat(greeter.shown, Eventually(Equals(False))) | ||
152 | 287 | |||
153 | 288 | # verify and interact with the triggered snap-decision notification | ||
154 | 289 | notify_list = self._get_notifications_list() | ||
155 | 290 | get_notification = lambda: notify_list.wait_select_single( | ||
156 | 291 | 'Notification', objectName='notification1') | ||
157 | 292 | notification = get_notification() | ||
158 | 293 | self._assert_notification(notification, summary, body, True, False, 1.0) | ||
159 | 294 | self.touch.tap_object(notification.select_single(objectName="button0")) | ||
160 | 295 | self.assert_notification_action_id_was_called("action_accept") | ||
161 | 296 | |||
162 | 214 | def _create_interactive_notification( | 297 | def _create_interactive_notification( |
163 | 215 | self, | 298 | self, |
164 | 216 | summary="", | 299 | 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://