Merge lp:~josharenson/unity8/greeter_mode into lp:unity8

Proposed by Josh Arenson on 2015-04-15
Status: Merged
Approved by: Michael Zanetti on 2015-06-16
Approved revision: 1719
Merged at revision: 1818
Proposed branch: lp:~josharenson/unity8/greeter_mode
Merge into: lp:unity8
Diff against target: 262 lines (+150/-43)
6 files modified
qml/Greeter/ShimGreeter.qml (+45/-0)
qml/Shell.qml (+56/-43)
qml/Stages/ShimStage.qml (+44/-0)
tests/qmltests/Tutorial/tst_Tutorial.qml (+1/-0)
tests/qmltests/tst_Shell.qml (+2/-0)
tests/qmltests/tst_ShellWithPin.qml (+2/-0)
To merge this branch: bzr merge lp:~josharenson/unity8/greeter_mode
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Abstain on 2015-06-16
Albert Astals Cid (community) Approve on 2015-05-18
Daniel d'Andrada (community) Abstain on 2015-04-27
Michael Terry 2015-04-15 Approve on 2015-04-24
PS Jenkins bot continuous-integration Needs Fixing on 2015-04-24
Review via email: mp+256385@code.launchpad.net

Commit Message

Implement bare-bones shellMode=greeter and shellMode=shell

For shellMode=greeter, the shell loads a shim stage and uses the integrated greeter
For shellMode=shell, the shell loads without a greeter. A shim greeter is loaded to satisfy the dependencies the shell has on the greeter.

Description of the Change

* Are there any related MPs required for this MP to build/function as expected? Please list.
No

 * 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?
N/A

Implement bare-bones shellMode=greeter and shellMode=shell

For shellMode=greeter, the shell loads a shim stage and uses the integrated greeter
For shellMode=shell, the shell loads without a greeter. A shim greeter is loaded to satisfy the dependencies the shell has on the greeter.

To post a comment you must log in.
Michael Terry (mterry) wrote :

Inline code review comments, will test on device shortly.

Michael Terry (mterry) :
Michael Terry (mterry) wrote :

Just to be on the same page, the ShimStage is a temporary thing, right? In the next phases, "greeter" will have a transparent background, letting you see the session behind it (in the no-password case).

I left a comment about indentation (line 123 of the diff).

Also, unity8.greeter.tests.test_args.GreeterArgsTest.test_shell_mode failed with:

autopilot.exceptions.StateNotFoundError: Object not found with name '*' and properties {'objectName': 'greeter'}.

And these other failures could be relevant? (I dunno, they say "greeter"):
unity8.application_lifecycle.tests.test_application_lifecycle.ApplicationLifecycleTests.test_greeter_hides_on_app_open
unity8.shell.tests.test_notifications.InteractiveNotificationBase.test_modal_sd_without_greeter(Native Device)

Michael Terry (mterry) wrote :

Works fine on the device!

Josh Arenson (josharenson) wrote :

> Just to be on the same page, the ShimStage is a temporary thing, right? In
> the next phases, "greeter" will have a transparent background, letting you see
> the session behind it (in the no-password case).
>
> I left a comment about indentation (line 123 of the diff).
>
> Also, unity8.greeter.tests.test_args.GreeterArgsTest.test_shell_mode failed
> with:
>
> autopilot.exceptions.StateNotFoundError: Object not found with name '*' and
> properties {'objectName': 'greeter'}.
>
> And these other failures could be relevant? (I dunno, they say "greeter"):
> unity8.application_lifecycle.tests.test_application_lifecycle.ApplicationLifec
> ycleTests.test_greeter_hides_on_app_open
> unity8.shell.tests.test_notifications.InteractiveNotificationBase.test_modal_s
> d_without_greeter(Native Device)

Should be ok now, but I want to see how CI handles it.

Michael Terry (mterry) wrote :

We talked about this on IRC, but just so it doesn't get lost. This CI run looks good, but introduces a new test failure (that isn't covered by the three known ones in bug 1446846):

unity8.shell.tests.test_notifications.InteractiveNotificationBase.test_modal_sd_without_greeter(Nexus 4)

Josh Arenson (josharenson) wrote :

> We talked about this on IRC, but just so it doesn't get lost. This CI run
> looks good, but introduces a new test failure (that isn't covered by the three
> known ones in bug 1446846):
>
> unity8.shell.tests.test_notifications.InteractiveNotificationBase.test_modal_s
> d_without_greeter(Nexus 4)

unity8.shell.tests.test_notifications.InteractiveNotificationBase.test_modal_sd_without_greeter fails on Arale with trunk. Seems unrelated to me.

Michał Sawicz (saviq) wrote :

I tried to reproduce on my mako, and this test passed just fine. I've retriggered the CI job to see if this persists.

Josh Arenson (josharenson) wrote :

> I tried to reproduce on my mako, and this test passed just fine. I've
> retriggered the CI job to see if this persists.

As stated on IRC this morning, it also works fine on desktop.

Michael Terry (mterry) :
review: Approve
Daniel d'Andrada (dandrader) wrote :

When I run "make tryShell" I get this warning:
qml/Shell.qml:83: ReferenceError: shellMode is not defined

Could you please fix this in this MP as well?

Daniel d'Andrada (dandrader) wrote :

> When I run "make tryShell" I get this warning:
> qml/Shell.qml:83: ReferenceError: shellMode is not defined
>
> Could you please fix this in this MP as well?

For the record. This MP solves it.

review: Abstain
Albert Astals Cid (aacid) wrote :

You have bad tags, clean them up

lp:~josharenson/unity8/greeter_mode: would delete 8.01.1+15.04.20141112.1~rtm-0ubuntu1,8.02+15.04.20150217~rtm-0ubuntu1,8.01.1+15.04.20141111~rtm-0ubuntu1,8.01.1+14.10.20141105.2~rtm-0ubuntu1,8.02+15.04.20150113~rtm-0ubuntu1,8.02+15.04.20141218~rtm-0ubuntu1,8.02+15.04.20150122.2~rtm-0ubuntu1,8.02+15.04.20150406~rtm-0ubuntu1,8.02+15.04.20141216~rtm-0ubuntu1,8.01.1+15.04.20141208~rtm-0ubuntu1,8.00+14.10.20141015.4~rtm-0ubuntu1,8.02+15.04.20150226~rtm-0ubuntu1,8.02+15.04.20150107~rtm-0ubuntu1,8.02+15.04.20150120~rtm-0ubuntu1,8.00+14.10.20141017-0ubuntu1

review: Needs Fixing
Albert Astals Cid (aacid) wrote :

Tags are gone \o/

review: Approve
Michael Zanetti (mzanetti) wrote :

Needs a merge with trunk

review: Needs Fixing
lp:~josharenson/unity8/greeter_mode updated on 2015-06-16
1719. By Josh Arenson on 2015-06-15

* No-change rebuild against Qt 5.4.2.
[ Michał Sawicz ]
* Implement full-shell rotation (LP: #1210199)
[ CI Train Bot ]
* New rebuild forced.
* Resync trunk.
[ Daniel d'Andrada ]
* Implemented autopilot-test and fake-sensors for shell-rotation.
[ Mirco Müller ]
* Implemented autopilot-test and fake-sensors for shell-rotation.
[ CI Train Bot ]
* New rebuild forced.
* Resync trunk.
[ Renato Araujo Oliveira Filho ]
* Set the device led color to green. (LP: #1450894)
[ Albert Astals Cid ]
* Add overrides to override functions
* Implement "rating-edit" preview widget (LP: #1318144)
* Make the DashContent::test_mainNavigation test more stable (LP:
  #1450809)
* Use art height as implicitHeight when the header is overlayed and
  there's no summary
[ CI Train Bot ]
* New rebuild forced.
* Resync trunk.
[ Daniel d'Andrada ]
* Introducing FloatingFlickable
* Make Ubuntu.Gestures components install TouchRegistry by themselves
[ Michael Terry ]
* Fix a possible crash in our PAM threading code. (LP: #1425362) (LP:
  #1425362)
* Fix the lockscreen becoming unresponsive after testing an app on the
  device from QtCreator. (LP: #1435364)
[ Nick Dedekind ]
* Fixed desktop stage app focus.
* Fixed issue in laggy indicator autpilot tests (LP: #1446846)
[ Albert Astals Cid ]
* Workarounds for concierge mode.
[ CI Train Bot ]
* New rebuild forced.
* Resync trunk.
[ Albert Astals Cid ]
* Make runtests fake a test error if make fails
* Make the test more stable
* Use dbus-test-runner instead of dbus-launch
[ Daniel d'Andrada ]
* DirectionalDragArea: improvements & API grooming (LP: #1417920)
* Fix EdgeDragEvaluator when a drag can happen both ways
  (Direction.Horizontal)
[ Josh Arenson ]
* Remove panelHeight property as it is unused.
[ Leo Arias ]
* Initial clean up of the autopilot tests set up. Removed the touch
  device from the test case. Moved the restart of unity to a fixture.
  Removed the unused DragMixin. Updated the setUpClass to use
  process_helpers. Removed the workaround for bug #1238417, already
  fixed. Use the toolkit helper to set the testability environment
  variable. Fixed the indicators base class that was restarting unity
  twice. (LP: #1238417, #1447206)
* Use the base class from the toolkit in autopilot tests.
[ Michael Zanetti ]
* emit application-stop when we're going down (LP: #1326513)
[ Michał Sawicz ]
* UNITY_SCOPES_LIST is no more
[ handsome_feng<email address hidden> ]
* When click the favorite scope in Dash Manager , it just return to
  the corresponding scope page. (LP: #1447056)
[ Albert Astals Cid ]
* Compile with Qt 5.5 (LP: #1437238)
* Different way of top aligning labels when the other one in the row
  is multiline (LP: #1442085)
* make pot_file
[ Andrea Cimitan ]
* Set sourceSize for DashBackground.qml Image
[ CI Train Bot ]
* New rebuild forced.
* Resync trunk. added: po/sk.po
[ Daniel d'Andrada ]
* Move handling of command line options to a separate class
* Refactor tst_PhysicalKeysMapper.qml
[ Leo Arias ]
* For autopilot tests, use the device simulation scenarios from the
  toolkit.
[ Leonardo Arias Fonseca ]
* For autopilot tests, use the device simulation scenarios from the
  toolkit.
[ Michael Zanetti ]
* Make sure dnd mode is ended properly when drag gesture is cancelled
  (LP: #1444949)
[ Michał Sawicz ]
* Fix flake8 warnings (LP: #1444170)
* Move mock indicator service to unity8-fake-env, as it's a binary-
  dependent package.
[ Nick Dedekind ]
* Use asynchronous dbus requests for property updates. (LP: #1436982)

Michael Zanetti (mzanetti) :
review: Abstain
Sebastien Bacher (seb128) wrote :

looks like those change regressed the desktop which is loading the phone greeter now, see bug #1469761

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'qml/Greeter/ShimGreeter.qml'
2--- qml/Greeter/ShimGreeter.qml 1970-01-01 00:00:00 +0000
3+++ qml/Greeter/ShimGreeter.qml 2015-06-16 02:23:55 +0000
4@@ -0,0 +1,45 @@
5+/*
6+ * Copyright (C) 2015 Canonical, Ltd.
7+ *
8+ * This program is free software; you can redistribute it and/or modify
9+ * it under the terms of the GNU General Public License as published by
10+ * the Free Software Foundation; version 3.
11+ *
12+ * This program is distributed in the hope that it will be useful,
13+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+ * GNU General Public License for more details.
16+ *
17+ * You should have received a copy of the GNU General Public License
18+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
19+ */
20+
21+import QtQuick 2.3
22+
23+/*
24+ * This is a shim greeter that is only used to provide a shell,
25+ * running without a greeter, the requisite information
26+ *
27+ */
28+
29+/* FIXME: this shuld be fine as a QtObject, but bug lp:1447391
30+ * dictates wrapping as an item instead
31+ */
32+Item {
33+ id: shimGreeter
34+
35+ readonly property bool active: false
36+ readonly property bool hasLockedApp: lockedApp !== ""
37+ readonly property bool locked: false
38+ readonly property bool shown: false
39+ readonly property bool waiting: false
40+
41+ property string lockedApp: ""
42+
43+ // Since ShimGreeter is never active, these can just return
44+ property var forceShow: (function() { return; })
45+ property var notifyAboutToFocusApp: (function(appId) { return; })
46+ property var notifyAppFocused: (function(appId) { return; })
47+ property var notifyShowingDashFromDrag: (function(appId) { return false; })
48+
49+}
50
51=== modified file 'qml/Shell.qml'
52--- qml/Shell.qml 2015-06-12 16:07:43 +0000
53+++ qml/Shell.qml 2015-06-16 02:23:55 +0000
54@@ -111,6 +111,8 @@
55 // This is _only_ used to expose the property to autopilot tests
56 readonly property string testShellMode: shellMode
57
58+ readonly property alias greeter: greeterLoader.item
59+
60 function activateApplication(appId) {
61 if (ApplicationManager.findApplication(appId)) {
62 ApplicationManager.requestFocusApplication(appId);
63@@ -262,7 +264,9 @@
64 ? "phone"
65 : shell.usageScenario
66 source: {
67- if (applicationsDisplayLoader.usageScenario === "phone") {
68+ if(shellMode === "greeter") {
69+ return "Stages/ShimStage.qml"
70+ } else if (applicationsDisplayLoader.usageScenario === "phone") {
71 return "Stages/PhoneStage.qml";
72 } else if (applicationsDisplayLoader.usageScenario === "tablet") {
73 return "Stages/TabletStage.qml";
74@@ -414,50 +418,59 @@
75 }
76 }
77
78- Greeter {
79- id: greeter
80- objectName: "greeter"
81-
82- hides: [launcher, panel.indicators]
83- tabletMode: shell.usageScenario !== "phone"
84- launcherOffset: launcher.progress
85- forcedUnlock: tutorial.running
86- background: shell.background
87-
88+ Loader {
89+ id: greeterLoader
90 anchors.fill: parent
91 anchors.topMargin: panel.panelHeight
92-
93- // avoid overlapping with Launcher's edge drag area
94- // FIXME: Fix TouchRegistry & friends and remove this workaround
95- // Issue involves launcher's DDA getting disabled on a long
96- // left-edge drag
97- dragHandleLeftMargin: launcher.available ? launcher.dragAreaWidth + 1 : 0
98-
99- onSessionStarted: {
100- launcher.hide();
101- }
102-
103- onTease: {
104- if (!tutorial.running) {
105- launcher.tease();
106- }
107- }
108-
109- onEmergencyCall: startLockedApp("dialer-app")
110-
111- Timer {
112- // See powerConnection for why this is useful
113- id: showGreeterDelayed
114- interval: 1
115- onTriggered: {
116- greeter.forceShow();
117- }
118- }
119-
120- Binding {
121- target: ApplicationManager
122- property: "suspended"
123- value: greeter.shown
124+ sourceComponent: shellMode != "shell" ? integratedGreeter :
125+ Qt.createComponent(Qt.resolvedUrl("Greeter/ShimGreeter.qml"));
126+ onLoaded: {
127+ item.objectName = "greeter"
128+ }
129+ }
130+
131+ Component {
132+ id: integratedGreeter
133+ Greeter {
134+
135+ hides: [launcher, panel.indicators]
136+ tabletMode: shell.sideStageEnabled
137+ launcherOffset: launcher.progress
138+ forcedUnlock: tutorial.running
139+ background: shell.background
140+
141+ // avoid overlapping with Launcher's edge drag area
142+ // FIXME: Fix TouchRegistry & friends and remove this workaround
143+ // Issue involves launcher's DDA getting disabled on a long
144+ // left-edge drag
145+ dragHandleLeftMargin: launcher.available ? launcher.dragAreaWidth + 1 : 0
146+
147+ onSessionStarted: {
148+ launcher.hide();
149+ }
150+
151+ onTease: {
152+ if (!tutorial.running) {
153+ launcher.tease();
154+ }
155+ }
156+
157+ onEmergencyCall: startLockedApp("dialer-app")
158+
159+ Binding {
160+ target: ApplicationManager
161+ property: "suspended"
162+ value: greeter.shown
163+ }
164+ }
165+ }
166+
167+ Timer {
168+ // See powerConnection for why this is useful
169+ id: showGreeterDelayed
170+ interval: 1
171+ onTriggered: {
172+ greeter.forceShow();
173 }
174 }
175
176
177=== added file 'qml/Stages/ShimStage.qml'
178--- qml/Stages/ShimStage.qml 1970-01-01 00:00:00 +0000
179+++ qml/Stages/ShimStage.qml 2015-06-16 02:23:55 +0000
180@@ -0,0 +1,44 @@
181+/*
182+ * Copyright (C) 2015 Canonical, Ltd.
183+ *
184+ * This program is free software; you can redistribute it and/or modify
185+ * it under the terms of the GNU General Public License as published by
186+ * the Free Software Foundation; version 3.
187+ *
188+ * This program is distributed in the hope that it will be useful,
189+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
190+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
191+ * GNU General Public License for more details.
192+ *
193+ * You should have received a copy of the GNU General Public License
194+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
195+ */
196+
197+import QtQuick 2.3
198+import Ubuntu.Components 0.1
199+
200+Rectangle {
201+ id: shimStage
202+
203+ anchors.fill: parent
204+ color: UbuntuColors.lightAubergine
205+
206+ Text {
207+ id: greeterModeText
208+
209+ anchors.horizontalCenter: parent.horizontalCenter
210+ anchors.top: parent.top
211+ anchors.topMargin: units.gu(10)
212+ font.bold: true
213+ horizontalAlignment: Text.AlignHCenter
214+ text: "Shell is in \"greeter\" mode"
215+ }
216+
217+ Text {
218+ anchors.centerIn: parent
219+ color: UbuntuColors.orange
220+ font.pointSize: units.gu(8)
221+ horizontalAlignment: Text.AlignHCenter
222+ text: "Shim \nStage"
223+ }
224+}
225
226=== modified file 'tests/qmltests/Tutorial/tst_Tutorial.qml'
227--- tests/qmltests/Tutorial/tst_Tutorial.qml 2015-05-18 23:04:12 +0000
228+++ tests/qmltests/Tutorial/tst_Tutorial.qml 2015-06-16 02:23:55 +0000
229@@ -73,6 +73,7 @@
230 sourceComponent: Component {
231 Shell {
232 property string indicatorProfile: "phone"
233+ property string shellMode: "full-greeter" /* default */
234
235 Component.onDestruction: {
236 shellLoader.itemDestroyed = true;
237
238=== modified file 'tests/qmltests/tst_Shell.qml'
239--- tests/qmltests/tst_Shell.qml 2015-06-12 16:07:43 +0000
240+++ tests/qmltests/tst_Shell.qml 2015-06-16 02:23:55 +0000
241@@ -81,6 +81,8 @@
242 property bool itemDestroyed: false
243 sourceComponent: Component {
244 Shell {
245+ property string shellMode: "full-greeter" /* default */
246+
247 usageScenario: "phone"
248 orientation: Qt.PortraitOrientation
249 primaryOrientation: Qt.PortraitOrientation
250
251=== modified file 'tests/qmltests/tst_ShellWithPin.qml'
252--- tests/qmltests/tst_ShellWithPin.qml 2015-05-11 14:36:03 +0000
253+++ tests/qmltests/tst_ShellWithPin.qml 2015-06-16 02:23:55 +0000
254@@ -69,6 +69,8 @@
255 property bool itemDestroyed: false
256 sourceComponent: Component {
257 Shell {
258+ property string shellMode: "full-greeter" /* default */
259+
260 Component.onDestruction: {
261 shellLoader.itemDestroyed = true
262 }

Subscribers

People subscribed via source and target branches