Merge lp:~unity-team/unity8/side-stage-redesign-tutorial into lp:unity8
- side-stage-redesign-tutorial
- Merge into trunk
Status: | Work in progress |
---|---|
Proposed branch: | lp:~unity-team/unity8/side-stage-redesign-tutorial |
Merge into: | lp:unity8 |
Prerequisite: | lp:~unity-team/unity8/side-stage-redesign |
Diff against target: |
817 lines (+470/-45) 13 files modified
qml/Components/Showable.qml (+2/-2) qml/Shell.qml (+2/-1) qml/Stages/SideStage.qml (+2/-1) qml/Stages/TabletSideStageTouchGesture.qml (+2/-0) qml/Stages/TabletStage.qml (+25/-0) qml/Tutorial/EdgesTutorial.qml (+8/-1) qml/Tutorial/EdgesTutorialContent.qml (+7/-6) qml/Tutorial/SideStageTutorial.qml (+63/-0) qml/Tutorial/SideStageTutorialPage.qml (+250/-0) qml/Tutorial/TutorialPage.qml (+8/-1) tests/qmltests/Stages/tst_TabletStage.qml (+12/-0) tests/qmltests/Tutorial/tst_Tutorial.qml (+74/-32) tests/qmltests/tst_Shell.qml (+15/-1) |
To merge this branch: | bzr merge lp:~unity-team/unity8/side-stage-redesign-tutorial |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity8 CI Bot | continuous-integration | Needs Fixing | |
Unity Team | Pending | ||
PS Jenkins bot | continuous-integration | Pending | |
Review via email: mp+288833@code.launchpad.net |
This proposal supersedes a proposal from 2016-01-04.
Commit message
Added progressive discovery tutorial for Side stage.
Renamed some of the tutorial pages.
Description of the change
* Are there any related MPs required for this MP to build/function as expected? Please list.
https:/
https:/
https:/
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes
* Did you make sure that your branch does not contain spurious tags?
Yes
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A
* If you changed the UI, has there been a design review?
Yes
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2040
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2040
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2040
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2041
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2041
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2042
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2042
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2277
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Albert Astals Cid (aacid) wrote : | # |
Path conflict: <deleted> / qml/Tutorial/
Path conflict: <deleted> / qml/Tutorial/
Path conflict: <deleted> / qml/Tutorial/
Path conflict: <deleted> / qml/Tutorial/
Text conflict in qml/Shell.qml
Text conflict in qml/Tutorial/
Text conflict in qml/Tutorial/
Text conflict in qml/Tutorial/
Text conflict in tests/qmltests/
Text conflict in tests/qmltests/
10 conflicts encountered.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2277
https:/
Executed test runs:
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Albert Astals Cid (aacid) wrote : | # |
Has had conflcits for over a month, moving over to WiP to clear the queue a bit.
Unmerged revisions
- 2277. By Michał Sawicz
-
Added progressive discovery tutorial for Side stage.
Renamed some of the tutorial pages.
Preview Diff
1 | === modified file 'qml/Components/Showable.qml' |
2 | --- qml/Components/Showable.qml 2016-03-11 20:21:04 +0000 |
3 | +++ qml/Components/Showable.qml 2016-03-11 20:21:06 +0000 |
4 | @@ -39,8 +39,8 @@ |
5 | |
6 | // automatically set the target on showAnimation and hideAnimation to be the |
7 | // showable itself |
8 | - onShowAnimationChanged: if (showAnimation) showAnimation["target"] = showable |
9 | - onHideAnimationChanged: if (hideAnimation) hideAnimation["target"] = showable |
10 | + onShowAnimationChanged: if (showAnimation && showAnimation.hasOwnProperty("target")) showAnimation["target"] = showable |
11 | + onHideAnimationChanged: if (hideAnimation && hideAnimation.hasOwnProperty("target")) hideAnimation["target"] = showable |
12 | |
13 | Component.onCompleted: required = shown; |
14 | |
15 | |
16 | === modified file 'qml/Shell.qml' |
17 | --- qml/Shell.qml 2016-03-11 20:21:04 +0000 |
18 | +++ qml/Shell.qml 2016-03-11 20:21:06 +0000 |
19 | @@ -354,10 +354,11 @@ |
20 | } |
21 | } |
22 | |
23 | - Tutorial { |
24 | + EdgesTutorial { |
25 | id: tutorial |
26 | objectName: "tutorial" |
27 | anchors.fill: parent |
28 | + usageScenario: shell.usageScenario |
29 | |
30 | // EdgeDragAreas don't work with mice. So to avoid trapping the user, |
31 | // we skip the tutorial on the Desktop to avoid using them. The |
32 | |
33 | === modified file 'qml/Stages/SideStage.qml' |
34 | --- qml/Stages/SideStage.qml 2016-03-11 20:21:04 +0000 |
35 | +++ qml/Stages/SideStage.qml 2016-03-11 20:21:06 +0000 |
36 | @@ -26,6 +26,7 @@ |
37 | property int panelWidth: units.gu(40) |
38 | readonly property alias dragging: hideSideStageDragArea.dragging |
39 | readonly property real progress: width / panelWidth |
40 | + property bool enableDrag: true |
41 | |
42 | width: 0 |
43 | shown: false |
44 | @@ -100,7 +101,7 @@ |
45 | |
46 | direction: Direction.Leftwards |
47 | rotation: 180 |
48 | - enabled: root.shown |
49 | + enabled: root.shown && enableDrag |
50 | anchors.right: root.left |
51 | width: sideStageDragHandle.width |
52 | height: root.height |
53 | |
54 | === modified file 'qml/Stages/TabletSideStageTouchGesture.qml' |
55 | --- qml/Stages/TabletSideStageTouchGesture.qml 2016-03-11 20:21:04 +0000 |
56 | +++ qml/Stages/TabletSideStageTouchGesture.qml 2016-03-11 20:21:06 +0000 |
57 | @@ -106,6 +106,8 @@ |
58 | } |
59 | |
60 | onDragStarted: { |
61 | + if (!dragComponent) return; |
62 | + |
63 | if (dragComponentProperties) { |
64 | priv.dragObject = dragComponent.createObject(root, dragComponentProperties); |
65 | } else { |
66 | |
67 | === modified file 'qml/Stages/TabletStage.qml' |
68 | --- qml/Stages/TabletStage.qml 2016-03-11 20:21:04 +0000 |
69 | +++ qml/Stages/TabletStage.qml 2016-03-11 20:21:06 +0000 |
70 | @@ -18,9 +18,11 @@ |
71 | import Ubuntu.Components 1.3 |
72 | import Ubuntu.Gestures 0.1 |
73 | import Unity.Application 0.1 |
74 | +import AccountsService 0.1 |
75 | import Utils 0.1 |
76 | import Powerd 0.1 |
77 | import "../Components" |
78 | +import "../Tutorial" |
79 | |
80 | AbstractStage { |
81 | id: root |
82 | @@ -603,6 +605,7 @@ |
83 | objectName: "sideStage" |
84 | height: priv.landscapeHeight |
85 | x: spreadView.width - width |
86 | + showHint: !priv.sideStageAppId |
87 | z: { |
88 | if (!priv.mainStageAppId) return 0; |
89 | |
90 | @@ -1101,4 +1104,26 @@ |
91 | } |
92 | } |
93 | } |
94 | + |
95 | + Loader { |
96 | + id: sideStageTutorialLoader |
97 | + anchors.fill: parent |
98 | + |
99 | + property bool doSideStageDemo: false |
100 | + Component.onCompleted: doSideStageDemo = AccountsService.demoEdges |
101 | + Connections { |
102 | + target: AccountsService |
103 | + onDemoEdgesChanged: { |
104 | + if (AccountsService.demoEdges) sideStageTutorialLoader.doSideStageDemo = true; |
105 | + } |
106 | + } |
107 | + active: doSideStageDemo && mainApp && (mainApp.supportedOrientations & (Qt.PortraitOrientation|Qt.InvertedPortraitOrientation)) |
108 | + |
109 | + sourceComponent: SideStageTutorial { |
110 | + Component.onCompleted: sideStage.hide(); |
111 | + onFinished: { |
112 | + sideStageTutorialLoader.doSideStageDemo = false; |
113 | + } |
114 | + } |
115 | + } |
116 | } |
117 | |
118 | === renamed file 'qml/Tutorial/TutorialBottomFinish.qml' => 'qml/Tutorial/BottomEdgeFinishTutorialPage.qml' |
119 | === renamed file 'qml/Tutorial/TutorialBottom.qml' => 'qml/Tutorial/BottomEdgeTutorialPage.qml' |
120 | === renamed file 'qml/Tutorial/Tutorial.qml' => 'qml/Tutorial/EdgesTutorial.qml' |
121 | --- qml/Tutorial/Tutorial.qml 2015-08-25 07:25:26 +0000 |
122 | +++ qml/Tutorial/EdgesTutorial.qml 2016-03-11 20:21:06 +0000 |
123 | @@ -23,6 +23,7 @@ |
124 | property alias active: loader.active |
125 | property bool paused |
126 | property real edgeSize |
127 | + property string usageScenario |
128 | |
129 | property Item launcher |
130 | property Item panel |
131 | @@ -44,7 +45,7 @@ |
132 | Loader { |
133 | id: loader |
134 | anchors.fill: parent |
135 | - source: "TutorialContent.qml" |
136 | + source: "EdgesTutorialContent.qml" |
137 | |
138 | Binding { |
139 | target: loader.item |
140 | @@ -70,6 +71,12 @@ |
141 | value: root.panel |
142 | } |
143 | |
144 | + Binding { |
145 | + target: loader.item |
146 | + property: "usageScenario" |
147 | + value: root.usageScenario |
148 | + } |
149 | + |
150 | Connections { |
151 | target: loader.item |
152 | onFinished: root.finished() |
153 | |
154 | === renamed file 'qml/Tutorial/TutorialContent.qml' => 'qml/Tutorial/EdgesTutorialContent.qml' |
155 | --- qml/Tutorial/TutorialContent.qml 2015-08-25 07:25:26 +0000 |
156 | +++ qml/Tutorial/EdgesTutorialContent.qml 2016-03-11 20:21:06 +0000 |
157 | @@ -22,6 +22,7 @@ |
158 | |
159 | property Item launcher |
160 | property Item panel |
161 | + property string usageScenario |
162 | |
163 | readonly property bool launcherEnabled: !running || |
164 | (!paused && tutorialLeft.shown) |
165 | @@ -61,7 +62,7 @@ |
166 | } |
167 | } |
168 | |
169 | - TutorialLeft { |
170 | + LeftEdgeTutorialPage { |
171 | id: tutorialLeft |
172 | objectName: "tutorialLeft" |
173 | anchors.fill: parent |
174 | @@ -71,7 +72,7 @@ |
175 | onFinished: tutorialLeftFinish.show() |
176 | } |
177 | |
178 | - TutorialLeftFinish { |
179 | + LeftEdgeFinishTutorialPage { |
180 | id: tutorialLeftFinish |
181 | objectName: "tutorialLeftFinish" |
182 | anchors.fill: parent |
183 | @@ -85,7 +86,7 @@ |
184 | } |
185 | } |
186 | |
187 | - TutorialRight { |
188 | + RightEdgeTutorialPage { |
189 | id: tutorialRight |
190 | objectName: "tutorialRight" |
191 | anchors.fill: parent |
192 | @@ -96,7 +97,7 @@ |
193 | onFinished: tutorialBottom.show() |
194 | } |
195 | |
196 | - TutorialBottom { |
197 | + BottomEdgeTutorialPage { |
198 | id: tutorialBottom |
199 | objectName: "tutorialBottom" |
200 | anchors.fill: parent |
201 | @@ -106,11 +107,11 @@ |
202 | onFinished: tutorialBottomFinish.show() |
203 | } |
204 | |
205 | - TutorialBottomFinish { |
206 | + BottomEdgeFinishTutorialPage { |
207 | id: tutorialBottomFinish |
208 | objectName: "tutorialBottomFinish" |
209 | anchors.fill: parent |
210 | - backgroundFadesOut: true |
211 | + backgroundFadesOut: usageScenario !== "tablet" |
212 | paused: !shown || root.paused |
213 | |
214 | onFinished: root.finish() |
215 | |
216 | === renamed file 'qml/Tutorial/TutorialLeftFinish.qml' => 'qml/Tutorial/LeftEdgeFinishTutorialPage.qml' |
217 | === renamed file 'qml/Tutorial/TutorialLeft.qml' => 'qml/Tutorial/LeftEdgeTutorialPage.qml' |
218 | === renamed file 'qml/Tutorial/TutorialRight.qml' => 'qml/Tutorial/RightEdgeTutorialPage.qml' |
219 | === added file 'qml/Tutorial/SideStageTutorial.qml' |
220 | --- qml/Tutorial/SideStageTutorial.qml 1970-01-01 00:00:00 +0000 |
221 | +++ qml/Tutorial/SideStageTutorial.qml 2016-03-11 20:21:06 +0000 |
222 | @@ -0,0 +1,63 @@ |
223 | +/* |
224 | + * Copyright (C) 2016 Canonical, Ltd. |
225 | + * |
226 | + * This program is free software; you can redistribute it and/or modify |
227 | + * it under the terms of the GNU General Public License as published by |
228 | + * the Free Software Foundation; version 3. |
229 | + * |
230 | + * This program is distributed in the hope that it will be useful, |
231 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
232 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
233 | + * GNU General Public License for more details. |
234 | + * |
235 | + * You should have received a copy of the GNU General Public License |
236 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
237 | + */ |
238 | + |
239 | +import QtQuick 2.4 |
240 | +import Ubuntu.Components 1.3 |
241 | + |
242 | +Item { |
243 | + id: root |
244 | + |
245 | + property bool paused: false |
246 | + readonly property alias running: d.running |
247 | + |
248 | + Component.onCompleted: { |
249 | + d.start(); |
250 | + } |
251 | + |
252 | + signal finished() |
253 | + |
254 | + function finish() { |
255 | + d.stop(); |
256 | + finished(); |
257 | + } |
258 | + |
259 | + QtObject { |
260 | + id: d |
261 | + |
262 | + property bool running |
263 | + |
264 | + function stop() { |
265 | + running = false; |
266 | + } |
267 | + |
268 | + function start() { |
269 | + running = true; |
270 | + tutorialSideStage.show(); |
271 | + } |
272 | + } |
273 | + |
274 | + SideStageTutorialPage { |
275 | + id: tutorialSideStage |
276 | + objectName: "tutorialSideStage" |
277 | + backgroundFadesIn: true |
278 | + backgroundFadesOut: true |
279 | + anchors.fill: parent |
280 | + paused: !shown || root.paused |
281 | + panel: root.panel |
282 | + |
283 | + onFinished: root.finish() |
284 | + } |
285 | +} |
286 | |
287 | === added file 'qml/Tutorial/SideStageTutorialPage.qml' |
288 | --- qml/Tutorial/SideStageTutorialPage.qml 1970-01-01 00:00:00 +0000 |
289 | +++ qml/Tutorial/SideStageTutorialPage.qml 2016-03-11 20:21:06 +0000 |
290 | @@ -0,0 +1,250 @@ |
291 | +/* |
292 | + * Copyright (C) 2016 Canonical, Ltd. |
293 | + * |
294 | + * This program is free software; you can redistribute it and/or modify |
295 | + * it under the terms of the GNU General Public License as published by |
296 | + * the Free Software Foundation; version 3. |
297 | + * |
298 | + * This program is distributed in the hope that it will be useful, |
299 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
300 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
301 | + * GNU General Public License for more details. |
302 | + * |
303 | + * You should have received a copy of the GNU General Public License |
304 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
305 | + */ |
306 | + |
307 | +import QtQuick 2.4 |
308 | +import Ubuntu.Components 1.3 |
309 | +import Ubuntu.Gestures 0.1 |
310 | +import "../Components" |
311 | +import "../Stages" |
312 | +import "." as LocalComponents |
313 | + |
314 | +TutorialPage { |
315 | + id: root |
316 | + |
317 | + property var panel |
318 | + |
319 | + title: i18n.tr("Open/Close side stage") |
320 | + text: i18n.tr("3 finger tap the screen.") |
321 | + fullTextWidth: true |
322 | + |
323 | + SequentialAnimation { |
324 | + id: teaseAnimation |
325 | + paused: running && root.paused |
326 | + running: true |
327 | + loops: Animation.Infinite |
328 | + |
329 | + property real scale: 1 |
330 | + |
331 | + UbuntuNumberAnimation { |
332 | + target: teaseAnimation |
333 | + property: "scale" |
334 | + to: 0.95 |
335 | + duration: UbuntuAnimation.FastDuration |
336 | + } |
337 | + UbuntuNumberAnimation { |
338 | + target: teaseAnimation |
339 | + property: "scale" |
340 | + to: 1 |
341 | + duration: UbuntuAnimation.SleepyDuration |
342 | + } |
343 | + } |
344 | + |
345 | + Behavior on textYOffset { UbuntuNumberAnimation {} } |
346 | + |
347 | + StateGroup { |
348 | + id: internalState |
349 | + states: [ |
350 | + State { |
351 | + name: "initial" |
352 | + StateChangeScript { |
353 | + script: { |
354 | + root.hideError(); |
355 | + overlayGesture.hide(); |
356 | + overlayFinish.hide(); |
357 | + sideStage.hide(); |
358 | + } |
359 | + } |
360 | + }, |
361 | + State { |
362 | + name: "overlayGesture" |
363 | + PropertyChanges { |
364 | + target: root |
365 | + title: i18n.tr("Load the sidestage") |
366 | + text: i18n.tr("3 finger drag from one window to the other") |
367 | + } |
368 | + PropertyChanges { target: root; textYOffset: -units.gu(15); } |
369 | + PropertyChanges { target: tapIcon; visible: false; } |
370 | + StateChangeScript { |
371 | + script: { |
372 | + root.hideError(); |
373 | + overlayGesture.show(); |
374 | + sideStage.show(); |
375 | + } |
376 | + } |
377 | + }, |
378 | + State { |
379 | + name: "overlayFinish" |
380 | + PropertyChanges { |
381 | + target: root |
382 | + title: i18n.tr("This is the loaded side stage") |
383 | + text: i18n.tr("Tap here to continue.") |
384 | + } |
385 | + PropertyChanges { target: tapIcon; visible: false; } |
386 | + StateChangeScript { |
387 | + script: { |
388 | + root.hideError(); |
389 | + overlayFinish.show(); |
390 | + } |
391 | + } |
392 | + PropertyChanges { target: gestureArea; enabled: false } |
393 | + } |
394 | + ] |
395 | + } |
396 | + |
397 | + foreground { |
398 | + children: [ |
399 | + Icon { |
400 | + id: tapIcon |
401 | + width: units.gu(20) |
402 | + anchors.verticalCenter: parent.verticalCenter |
403 | + anchors.left: parent.horizontalCenter |
404 | + source: "../Stages/graphics/sidestage_open.svg" |
405 | + scale: teaseAnimation.scale |
406 | + }, |
407 | + SideStage { |
408 | + id: sideStage |
409 | + height: parent.height |
410 | + x: parent.width - width |
411 | + showHint: false |
412 | + enableDrag: false |
413 | + |
414 | + Icon { |
415 | + name: "tick" |
416 | + anchors.verticalCenter: parent.verticalCenter |
417 | + x: Math.max(parent.width / 2 - width / 2, 0) |
418 | + width: units.gu(8) |
419 | + visible: overlayFinish.shown |
420 | + } |
421 | + |
422 | + DropArea { |
423 | + anchors.fill: parent |
424 | + onDropped: { |
425 | + root.hideError(); |
426 | + internalState.state = "overlayFinish"; |
427 | + } |
428 | + } |
429 | + }, |
430 | + Showable { |
431 | + id: overlayGesture |
432 | + objectName: "overlayGesture" |
433 | + anchors.fill: parent |
434 | + hides: [ overlayFinish ] |
435 | + |
436 | + opacity: 0 |
437 | + shown: false |
438 | + showAnimation: SequentialAnimation { |
439 | + PropertyAction { target: overlayGesture; property: "opacity"; value: 0 } |
440 | + ParallelAnimation { |
441 | + PropertyAction { target: overlayGesture; property: "visible"; value: true } |
442 | + UbuntuNumberAnimation { target: overlayGesture; property: "opacity"; to: 1 } |
443 | + } |
444 | + } |
445 | + Icon { |
446 | + width: units.gu(40) |
447 | + anchors.centerIn: parent |
448 | + source: "../Stages/graphics/sidestage_drag.svg" |
449 | + scale: teaseAnimation.scale |
450 | + } |
451 | + }, |
452 | + Showable { |
453 | + id: overlayFinish |
454 | + objectName: "overlayFinish" |
455 | + anchors.fill: parent |
456 | + hides: [ overlayGesture ] |
457 | + |
458 | + opacity: 0 |
459 | + shown: false |
460 | + showAnimation: SequentialAnimation { |
461 | + PropertyAction { target: overlayFinish; property: "opacity"; value: 0 } |
462 | + ParallelAnimation { |
463 | + PropertyAction { target: overlayFinish; property: "visible"; value: true } |
464 | + UbuntuNumberAnimation { target: overlayFinish; property: "opacity"; to: 1 } |
465 | + } |
466 | + } |
467 | + |
468 | + LocalComponents.Tick { |
469 | + objectName: "tickTap" |
470 | + anchors { |
471 | + left: parent.left |
472 | + leftMargin: root.textLeft |
473 | + top: parent.top |
474 | + topMargin: root.textBottom + units.gu(3) |
475 | + } |
476 | + onClicked: root.hide() |
477 | + } |
478 | + }, |
479 | + Label { |
480 | + anchors { |
481 | + left: parent.left |
482 | + leftMargin: root.textLeft |
483 | + bottom: parent.bottom |
484 | + bottomMargin: units.gu(3) |
485 | + } |
486 | + |
487 | + text: "Dismiss" |
488 | + font.underline: true |
489 | + fontSize: "medium" |
490 | + |
491 | + MouseArea { |
492 | + anchors { |
493 | + fill: parent |
494 | + margins: -units.gu(1) |
495 | + } |
496 | + onClicked: root.finished(); |
497 | + } |
498 | + } |
499 | + |
500 | + ] |
501 | + } |
502 | + |
503 | + TabletSideStageTouchGesture { |
504 | + id: gestureArea |
505 | + anchors { |
506 | + left: parent.left |
507 | + top: parent.top |
508 | + bottom: parent.bottom |
509 | + } |
510 | + width: parent.width - sideStage.width |
511 | + |
512 | + onClicked: { |
513 | + root.hideError(); |
514 | + if (internalState.state !== "overlayGesture") { |
515 | + internalState.state = "overlayGesture"; |
516 | + } else { |
517 | + internalState.state = "initial"; |
518 | + } |
519 | + } |
520 | + |
521 | + dragComponent: overlayGesture.shown ? dragComponent : null |
522 | + Component { |
523 | + id: dragComponent |
524 | + Icon { |
525 | + width: units.gu(20) |
526 | + source: "../Stages/graphics/sidestage_open.svg" |
527 | + } |
528 | + } |
529 | + |
530 | + onDropped: { |
531 | + // still in the gesture state after dropping? |
532 | + if (!overlayFinish.shown) { |
533 | + root.showError(); |
534 | + } |
535 | + } |
536 | + onCancelled: { |
537 | + root.showError(); |
538 | + } |
539 | + } |
540 | +} |
541 | |
542 | === modified file 'qml/Tutorial/TutorialPage.qml' |
543 | --- qml/Tutorial/TutorialPage.qml 2015-07-15 15:07:19 +0000 |
544 | +++ qml/Tutorial/TutorialPage.qml 2016-03-11 20:21:06 +0000 |
545 | @@ -45,6 +45,9 @@ |
546 | // The text label bottom, so you can position elements relative to it |
547 | readonly property real textBottom: Math.max(textLabel.y + textLabel.height, errorTextLabel.y + errorTextLabel.height) |
548 | |
549 | + // The text label bottom, so you can position elements relative to it |
550 | + readonly property real textLeft: Math.max(textLabel.x, errorTextLabel.x) |
551 | + |
552 | // The MouseArea that eats events (so you can adjust size as you will) |
553 | property alias mouseArea: mouseArea |
554 | |
555 | @@ -61,12 +64,16 @@ |
556 | errorTimer.start(); |
557 | } |
558 | |
559 | + function hideError() { |
560 | + errorTimer.stop(); |
561 | + } |
562 | + |
563 | //// |
564 | |
565 | visible: false |
566 | shown: false |
567 | |
568 | - property real _foregroundHideOpacity |
569 | + property real _foregroundHideOpacity: 1.0 |
570 | |
571 | showAnimation: StandardAnimation { |
572 | property: root.backgroundFadesIn ? "opacity" : "_foregroundHideOpacity" |
573 | |
574 | === modified file 'tests/qmltests/Stages/tst_TabletStage.qml' |
575 | --- tests/qmltests/Stages/tst_TabletStage.qml 2016-03-11 20:21:04 +0000 |
576 | +++ tests/qmltests/Stages/tst_TabletStage.qml 2016-03-11 20:21:06 +0000 |
577 | @@ -21,6 +21,7 @@ |
578 | import Unity.Application 0.1 |
579 | import Unity.Test 0.1 |
580 | import Utils 0.1 |
581 | +import AccountsService 0.1 |
582 | |
583 | import ".." |
584 | import "../../../qml/Stages" |
585 | @@ -34,6 +35,11 @@ |
586 | |
587 | property var greeter: { fullyShown: true } |
588 | |
589 | + Component.onCompleted: { |
590 | + theme.name = "Ubuntu.Components.Themes.SuruGradient" |
591 | + tabletStageLoader.active = true; |
592 | + } |
593 | + |
594 | Loader { |
595 | id: tabletStageLoader |
596 | |
597 | @@ -43,6 +49,7 @@ |
598 | height: units.gu(100*0.7) |
599 | |
600 | focus: true |
601 | + active: false |
602 | |
603 | property bool itemDestroyed: false |
604 | sourceComponent: Component { |
605 | @@ -91,6 +98,11 @@ |
606 | } |
607 | |
608 | Button { |
609 | + text: "Show Tutorial" |
610 | + onClicked: AccountsService.demoEdges = true |
611 | + } |
612 | + |
613 | + Button { |
614 | text: testCase.sideStage ? testCase.sideStage.shown ? "Hide Side-stage" : "Show Side-stage" : "" |
615 | enabled: testCase.sideStage |
616 | onClicked: { |
617 | |
618 | === modified file 'tests/qmltests/Tutorial/tst_Tutorial.qml' |
619 | --- tests/qmltests/Tutorial/tst_Tutorial.qml 2015-09-02 07:42:27 +0000 |
620 | +++ tests/qmltests/Tutorial/tst_Tutorial.qml 2016-03-11 20:21:06 +0000 |
621 | @@ -19,31 +19,18 @@ |
622 | import AccountsService 0.1 |
623 | import IntegratedLightDM 0.1 as LightDM |
624 | import Ubuntu.Components 1.3 |
625 | +import Ubuntu.Components.ListItems 1.3 as ListItem |
626 | import Unity.Application 0.1 |
627 | import Unity.Test 0.1 as UT |
628 | |
629 | import "../../../qml" |
630 | +import "../../../qml/Components" |
631 | |
632 | -Item { |
633 | +Rectangle { |
634 | id: root |
635 | - width: shellLoader.width + buttons.width |
636 | - height: shellLoader.height |
637 | - |
638 | - QtObject { |
639 | - id: applicationArguments |
640 | - |
641 | - function hasGeometry() { |
642 | - return false; |
643 | - } |
644 | - |
645 | - function width() { |
646 | - return 0; |
647 | - } |
648 | - |
649 | - function height() { |
650 | - return 0; |
651 | - } |
652 | - } |
653 | + color: "grey" |
654 | + width: units.gu(100) + controlRect.width |
655 | + height: units.gu(71) |
656 | |
657 | Component.onCompleted: { |
658 | // must set the mock mode before loading the Shell |
659 | @@ -52,38 +39,86 @@ |
660 | shellLoader.active = true; |
661 | } |
662 | |
663 | - Row { |
664 | - spacing: 0 |
665 | - anchors.fill: parent |
666 | - |
667 | + Item { |
668 | + id: shellContainer |
669 | + anchors.left: root.left |
670 | + anchors.right: controlRect.left |
671 | + anchors.top: root.top |
672 | + anchors.bottom: root.bottom |
673 | Loader { |
674 | id: shellLoader |
675 | + focus: true |
676 | + |
677 | + anchors.centerIn: parent |
678 | + |
679 | + property int shellOrientation: Qt.PortraitOrientation |
680 | + property int nativeOrientation: Qt.PortraitOrientation |
681 | + property int primaryOrientation: Qt.PortraitOrientation |
682 | + |
683 | + state: usageScenarioSelector.model[usageScenarioSelector.selectedIndex] |
684 | + states: [ |
685 | + State { |
686 | + name: "phone" |
687 | + PropertyChanges { |
688 | + target: shellLoader |
689 | + width: units.gu(40) |
690 | + height: units.gu(71) |
691 | + } |
692 | + }, |
693 | + State { |
694 | + name: "tablet" |
695 | + PropertyChanges { |
696 | + target: shellLoader |
697 | + width: units.gu(100) |
698 | + height: units.gu(71) |
699 | + shellOrientation: Qt.LandscapeOrientation |
700 | + nativeOrientation: Qt.LandscapeOrientation |
701 | + primaryOrientation: Qt.LandscapeOrientation |
702 | + } |
703 | + } |
704 | + ] |
705 | |
706 | active: false |
707 | - width: units.gu(40) |
708 | - height: units.gu(71) |
709 | - |
710 | property bool itemDestroyed: false |
711 | sourceComponent: Component { |
712 | Shell { |
713 | + id: __shell |
714 | property string indicatorProfile: "phone" |
715 | |
716 | + usageScenario: shellLoader.state |
717 | + nativeWidth: width |
718 | + nativeHeight: height |
719 | Component.onDestruction: { |
720 | shellLoader.itemDestroyed = true; |
721 | } |
722 | + orientation: shellLoader.shellOrientation |
723 | + orientations: Orientations { |
724 | + native_: shellLoader.nativeOrientation |
725 | + primary: shellLoader.primaryOrientation |
726 | + } |
727 | } |
728 | } |
729 | } |
730 | - |
731 | - Rectangle { |
732 | - id: buttons |
733 | - color: "white" |
734 | - width: units.gu(30) |
735 | - height: shellLoader.height |
736 | + } |
737 | + |
738 | + Rectangle { |
739 | + id: controlRect |
740 | + anchors.top: root.top |
741 | + anchors.bottom: root.bottom |
742 | + anchors.right: root.right |
743 | + width: units.gu(30) |
744 | + color: "darkgrey" |
745 | + |
746 | + Flickable { |
747 | + id: controls |
748 | + contentHeight: controlCol.height |
749 | + anchors.fill: parent |
750 | |
751 | Column { |
752 | + id: controlCol |
753 | anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) } |
754 | spacing: units.gu(1) |
755 | + |
756 | Row { |
757 | anchors { left: parent.left; right: parent.right } |
758 | Button { |
759 | @@ -97,6 +132,13 @@ |
760 | } |
761 | } |
762 | } |
763 | + ListItem.ItemSelector { |
764 | + id: usageScenarioSelector |
765 | + anchors { left: parent.left; right: parent.right } |
766 | + activeFocusOnPress: false |
767 | + text: "Usage scenario" |
768 | + model: ["phone", "tablet"] |
769 | + } |
770 | } |
771 | } |
772 | } |
773 | |
774 | === modified file 'tests/qmltests/tst_Shell.qml' |
775 | --- tests/qmltests/tst_Shell.qml 2016-03-11 20:21:04 +0000 |
776 | +++ tests/qmltests/tst_Shell.qml 2016-03-11 20:21:06 +0000 |
777 | @@ -141,11 +141,13 @@ |
778 | anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) } |
779 | spacing: units.gu(1) |
780 | |
781 | - Row { |
782 | + Column { |
783 | spacing: units.gu(1) |
784 | + anchors { left: parent.left; right: parent.right } |
785 | Button { |
786 | text: "Show Greeter" |
787 | activeFocusOnPress: false |
788 | + anchors { left: parent.left; right: parent.right } |
789 | onClicked: { |
790 | if (shellLoader.status !== Loader.Ready) |
791 | return; |
792 | @@ -159,6 +161,7 @@ |
793 | Button { |
794 | text: "Hide Greeter" |
795 | activeFocusOnPress: false |
796 | + anchors { left: parent.left; right: parent.right } |
797 | onClicked: { |
798 | if (shellLoader.status !== Loader.Ready) |
799 | return; |
800 | @@ -169,6 +172,17 @@ |
801 | } |
802 | } |
803 | } |
804 | + Button { |
805 | + text: "Restart Tutorial" |
806 | + anchors { left: parent.left; right: parent.right } |
807 | + onClicked: { |
808 | + if (shellLoader.status !== Loader.Ready) |
809 | + return; |
810 | + |
811 | + AccountsService.demoEdges = false; |
812 | + AccountsService.demoEdges = true; |
813 | + } |
814 | + } |
815 | } |
816 | ListItem.ItemSelector { |
817 | anchors { left: parent.left; right: parent.right } |
FAILED: Continuous integration, rev:2040 /unity8- jenkins. ubuntu. com/job/ lp-unity8- 1-ci/107/
https:/
Executed test runs:
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-unity8- 1-ci/107/ rebuild
https:/